Function at 0x40af10
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x439554
push eax
mov dword fs:[0], esp
sub esp, 0x244
push ebp
mov ebp, dword [esp + 0x258]
test ebp, ebp
push esi
mov esi, ecx
jne 0x40af41
xor al, al
jmp 0x40b8ab
push edi
mov edi, dword [esi + 0x80]
inc edi
push str.CSFSocket
lea ecx, [esp + 0x5c]
mov dword [esi + 0x80], edi
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
mov eax, dword [str.KTNet.txt]
push eax
lea ecx, [esp + 0x104]
mov dword [esp + 0x25c], 0
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
mov ecx, dword [esi + 0x108]
mov edx, dword [ebp + 0x410]
movzx eax, word [ebp + 0xe]
mov edi, dword [sym.imp.KwLogSvr.dll_void___cdecl_YL_Log_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___int__class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const__]
push ecx
mov ecx, dword [ebp + 4]
push edx
mov edx, dword [ebp + 8]
push eax
mov eax, dword [esi + 0xc8]
push ecx
push edx
push eax
push str.CSFSocket::recvACK__ruid:_u__ack:_u__seq:_u__win:_u__datalen:_d__m_state:_d
lea ecx, [esp + 0x74]
push ecx
lea edx, [esp + 0x120]
push 0
push edx
mov byte [esp + 0x280], 1
call edi
add esp, 0x28
lea ecx, [esp + 0x100]
mov byte [esp + 0x258], 0
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [esp + 0x58]
mov dword [esp + 0x258], 0xffffffff
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov eax, dword [esi + 0x108]
dec eax
cmp eax, 6
ja case.default.0x40b000
push ebx
jmp dword [eax*4 + 0x40b8c4]
mov eax, dword [esi + 0xd8]
mov ecx, dword [ebp + 8]
cmp ecx, dword [eax + 0xc0]
jb 0x40b530
mov edx, dword [eax + 0x54]
inc edx
cmp ecx, edx
ja 0x40b530
movzx ecx, word [ebp + 0xe]
mov ebx, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [eax + 0xbc], ecx
mov eax, dword [esi + 0xd8]
add eax, 0x3c
push eax
call ebx
mov eax, dword [esi + 0xd8]
mov ecx, dword [eax + 0x38]
test ecx, ecx
jne 0x40b0f9
push str.CSFSocket
lea ecx, [esp + 0x98]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
mov edx, dword [str.KTNet.txt]
push edx
lea ecx, [esp + 0x220]
mov dword [esp + 0x260], 4
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
push str.CSFSocket::recvACK_
lea eax, [esp + 0x98]
push eax
lea ecx, [esp + 0x224]
push 0
push ecx
mov byte [esp + 0x26c], 5
call edi
add esp, 0x10
lea ecx, [esp + 0x21c]
mov byte [esp + 0x25c], 4
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [esp + 0x94]
mov dword [esp + 0x25c], 0xffffffff
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov edx, dword [esi + 0xd8]
add edx, 0x3c
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [esi + 0xd8]
push 1
call fcn.004062b0
jmp case.0x40b000.4
add eax, 0x3c
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [esi + 0xd8]
mov eax, dword [ebp + 8]
cmp eax, dword [ecx + 0xc0]
jbe 0x40b123
mov dword [ecx + 0xc0], eax
mov dword [esi + 0x78], 0
jmp 0x40b15f
mov edx, dword [esi + 0x78]
inc edx
mov eax, edx
cmp eax, 3
mov dword [esi + 0x78], edx
jl 0x40b158
mov eax, dword [esi + 0x40]
mov edx, dword [ebp + 8]
push eax
push edx
call fcn.004063e0
test al, al
je 0x40b15f
mov eax, dword [esi + 0xa0]
inc eax
mov dword [esi + 0x78], 0
mov dword [esi + 0xa0], eax
jmp 0x40b15f
push 0
call fcn.004062b0
mov eax, dword [esi + 0xd8]
add eax, 0x9c
push eax
call ebx
mov eax, dword [esi + 0xd8]
add eax, 0x3c
push eax
call ebx
mov eax, dword [esi + 0xd8]
mov ecx, dword [eax + 0x34]
mov ebx, dword [ecx]
cmp ebx, ecx
mov dword [esp + 0x10], 0
je 0x40b432
mov edi, dword [ebx + 8]
mov eax, dword [edi + 4]
cmp eax, dword [ebp + 8]
jae 0x40b289
mov edx, dword [esp + 0x10]
mov ecx, dword [ebp + 4]
inc edx
cmp eax, ecx
mov dword [esp + 0x10], edx
jne 0x40b1d0
cmp dword [edi + 0x418], 1
jne 0x40b1d0
mov eax, dword [ebp + 0x414]
sub eax, dword [edi + 0x414]
push eax
mov ecx, esi
call fcn.0040a5f0
push str.CSFSocket
lea ecx, [esp + 0xd0]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
mov ecx, dword [str.KTNet.txt]
push ecx
lea ecx, [esp + 0x178]
mov dword [esp + 0x260], 6
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
mov edx, dword [edi + 4]
mov eax, dword [esi + 0xc8]
push edi
push edx
push eax
push str.ruid:_u___u
lea ecx, [esp + 0xdc]
push ecx
lea edx, [esp + 0x188]
push 0
push edx
mov byte [esp + 0x278], 7
call dword [sym.imp.KwLogSvr.dll_void___cdecl_YL_Log_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___int__class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const__]
add esp, 0x1c
lea ecx, [esp + 0x174]
mov byte [esp + 0x25c], 6
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [esp + 0xcc]
mov dword [esp + 0x25c], 0xffffffff
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
push ebx
lea eax, [esp + 0x1c]
push eax
mov ecx, dword [esi + 0xd8]
add ecx, 0x30
call fcn.0040aeb0
mov ecx, dword [0x450af8]
mov ebx, dword [eax]
push edi
call fcn.00406520
jmp 0x40b418
mov eax, dword [ebp + 0x410]
test eax, eax
je 0x40b42c
push str.CSFSocket
lea ecx, [esp + 0x28]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
mov ecx, dword [str.KTNet.txt]
push ecx
lea ecx, [esp + 0x1e8]
mov dword [esp + 0x260], 8
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
push 0x43e490
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x1ec]
push 0
push eax
mov byte [esp + 0x26c], 9
call dword [sym.imp.KwLogSvr.dll_void___cdecl_YL_Log_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___int__class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const__]
add esp, 0x10
lea ecx, [esp + 0x1e4]
mov byte [esp + 0x25c], 8
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [esp + 0x24]
mov dword [esp + 0x25c], 0xffffffff
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov edx, dword [ebp + 8]
mov eax, dword [edi + 4]
mov ecx, dword [ebp + 0x410]
sub eax, edx
mov edx, eax
sar edx, 3
cmp edx, ecx
jge 0x40b42c
and eax, 7
mov ecx, 7
sub ecx, eax
mov al, 1
shl al, cl
and al, byte [edx + ebp + 0x10]
mov byte [esp + 0x17], al
je 0x40b416
mov eax, dword [edi + 4]
cmp eax, dword [ebp + 4]
jne 0x40b370
cmp dword [edi + 0x418], 1
jne 0x40b370
mov ecx, dword [ebp + 0x414]
sub ecx, dword [edi + 0x414]
push ecx
mov ecx, esi
call fcn.0040a5f0
mov edx, dword [esp + 0x10]
inc edx
push str.CSFSocket
lea ecx, [esp + 0x140]
mov dword [esp + 0x14], edx
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
mov edx, dword [str.KTNet.txt]
push edx
lea ecx, [esp + 0x1b0]
mov dword [esp + 0x260], 0xa
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
mov eax, dword [edi + 4]
mov ecx, dword [esi + 0xc8]
push edi
push eax
push ecx
push str.ruid:_u___u
lea edx, [esp + 0x14c]
push edx
lea eax, [esp + 0x1c0]
push 0
push eax
mov byte [esp + 0x278], 0xb
call dword [sym.imp.KwLogSvr.dll_void___cdecl_YL_Log_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___int__class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const__]
add esp, 0x1c
lea ecx, [esp + 0x1ac]
mov byte [esp + 0x25c], 0xa
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [esp + 0x13c]
mov dword [esp + 0x25c], 0xffffffff
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
push ebx
lea ecx, [esp + 0x20]
push ecx
jmp 0x40b268
mov ebx, dword [ebx]
mov eax, dword [esi + 0xd8]
mov ecx, dword [eax + 0x34]
add eax, 0x30
cmp ebx, ecx
jne 0x40b194
mov edi, dword [sym.imp.KwLogSvr.dll_void___cdecl_YL_Log_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___int__class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const__]
mov eax, dword [esi + 0xd8]
mov ebx, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
add eax, 0x3c
push eax
call ebx
mov eax, dword [esi + 0xd8]
add eax, 0x9c
push eax
call ebx
mov edx, dword [esi + 0xd8]
mov eax, dword [ebp + 8]
mov ecx, dword [edx + 0xd8]
dec eax
cmp ecx, eax
jne 0x40b4f4
push str.CSFSocket
lea ecx, [esp + 0x7c]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
mov ecx, dword [str.KTNet.txt]
push ecx
mov ebx, 0xc
lea ecx, [esp + 0x44]
mov dword [esp + 0x260], ebx
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
mov edx, dword [esi + 0xd8]
mov eax, dword [edx + 0xd8]
push eax
push 0x43e458
lea ecx, [esp + 0x80]
push ecx
lea edx, [esp + 0x4c]
push 0
push edx
mov byte [esp + 0x270], 0xd
call edi
add esp, 0x14
lea ecx, [esp + 0x40]
mov byte [esp + 0x25c], bl
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [esp + 0x78]
mov dword [esp + 0x25c], 0xffffffff
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov eax, dword [esi + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov ebx, dword [esp + 0x10]
test ebx, ebx
jle case.0x40b000.4
mov edi, ebx
mov ecx, dword [esi + 0xd8]
mov ecx, dword [ecx + 0xc4]
call fcn.00405960
dec edi
jne 0x40b502
test ebx, ebx
jle case.0x40b000.4
mov ecx, dword [esi + 0xd8]
push 0
call fcn.004062b0
jmp case.0x40b000.4
push str.CSFSocket
lea ecx, [esp + 0xec]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
mov edx, dword [str.KTNet.txt]
mov ebx, 2
push edx
lea ecx, [esp + 0xb4]
mov dword [esp + 0x260], ebx
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
mov eax, dword [esi + 0xd8]
mov ecx, dword [eax + 0x54]
mov edx, dword [eax + 0xc0]
mov eax, dword [ebp + 8]
inc ecx
push ecx
mov ecx, dword [esi + 0xc8]
push edx
push eax
push ecx
push str.CSFSocket::recvACK__ruid:_u_
lea edx, [esp + 0xfc]
push edx
lea eax, [esp + 0xc8]
push 0
push eax
mov byte [esp + 0x27c], 3
call edi
add esp, 0x20
lea ecx, [esp + 0xb0]
mov byte [esp + 0x25c], bl
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [esp + 0xe8]
mov dword [esp + 0x25c], 0xffffffff
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
jmp case.0x40b000.4
mov dword [esi + 0x108], 8
jmp case.0x40b000.4
mov dword [esi + 0x108], 9
jmp case.0x40b000.4
mov eax, dword [esi + 0xd8]
add eax, 0x3c
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [esi + 0xd8]
mov eax, dword [ecx + 0x38]
test eax, eax
jbe 0x40b88b
mov eax, dword [ecx + 0x34]
mov eax, dword [eax]
cmp eax, dword [ecx + 0x34]
mov dword [esp + 0x10], eax
je 0x40b88b
jmp 0x40b630
mov eax, dword [esp + 0x10]
jmp 0x40b630
mov ebx, dword [eax + 8]
mov ecx, dword [ebx + 4]
cmp ecx, dword [ebp + 8]
jae 0x40b872
cmp dword [esi + 0x108], 3
je 0x40b84a
push str.CSFSocket
lea ecx, [esp + 0x15c]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
mov edx, dword [str.KTNet.txt]
push edx
lea ecx, [esp + 0x124]
mov dword [esp + 0x260], 0xe
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
movzx eax, word [ebp + 0xe]
mov ecx, dword [ebp + 8]
mov edx, dword [esi + 0xc8]
push eax
push ecx
push edx
push str.CSFSocket::recvACK__ruid:_u__l
lea eax, [esp + 0x168]
push eax
lea ecx, [esp + 0x134]
push 0
push ecx
mov byte [esp + 0x278], 0xf
call edi
add esp, 0x1c
lea ecx, [esp + 0x120]
mov byte [esp + 0x25c], 0xe
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [esp + 0x158]
mov dword [esp + 0x25c], 0xffffffff
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
movzx edx, word [ebp + 0xe]
mov eax, dword [esi + 0xd8]
mov dword [eax + 0xbc], edx
cmp dword [ebx + 0x418], 1
jne 0x40b70b
mov ecx, dword [ebp + 0x414]
sub ecx, dword [ebx + 0x414]
push ecx
mov ecx, esi
call fcn.0040a5f0
mov al, byte [esi + 0xc4]
test al, al
push str.CSFSocket
jne 0x40b7b4
lea ecx, [esp + 0x1cc]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
mov edx, dword [str.KTNet.txt]
push edx
lea ecx, [esp + 0x194]
mov dword [esp + 0x260], 0x10
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
push 0x43e3cc
lea eax, [esp + 0x1cc]
push eax
lea ecx, [esp + 0x198]
push 0
push ecx
mov byte [esp + 0x26c], 0x11
call edi
add esp, 0x10
lea ecx, [esp + 0x190]
mov byte [esp + 0x25c], 0x10
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [esp + 0x1c8]
mov dword [esp + 0x25c], 0xffffffff
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov edx, dword [esi + 0x20]
push edx
mov dword [esi + 0x108], 3
call dword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x40b846
lea ecx, [esp + 0x23c]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
mov eax, dword [str.KTNet.txt]
push eax
lea ecx, [esp + 0x204]
mov dword [esp + 0x260], 0x12
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
push 0x43e3c0
lea ecx, [esp + 0x23c]
push ecx
lea edx, [esp + 0x208]
push 0
push edx
mov byte [esp + 0x26c], 0x13
call edi
add esp, 0x10
lea ecx, [esp + 0x200]
mov byte [esp + 0x25c], 0x12
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [esp + 0x238]
mov dword [esp + 0x25c], 0xffffffff
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov dword [esi + 0x10c], 4
mov ecx, dword [0x450aec]
push esi
call fcn.004159a0
mov eax, dword [esp + 0x10]
mov ecx, dword [eax]
mov dword [esp + 0x10], ecx
mov ecx, dword [esi + 0xd8]
push eax
lea edx, [esp + 0x24]
push edx
add ecx, 0x30
call fcn.0040aeb0
mov ecx, dword [0x450af8]
push ebx
call fcn.00406520
jmp 0x40b878
mov eax, dword [eax]
mov dword [esp + 0x10], eax
mov ecx, dword [esi + 0xd8]
mov edx, dword [esp + 0x10]
cmp edx, dword [ecx + 0x34]
jne 0x40b627
mov eax, dword [esi + 0xd8]
add eax, 0x3c
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop ebx
mov ecx, dword [0x450af8]
push ebp
call fcn.00406520
mov al, 1
pop edi
mov ecx, dword [esp + 0x24c]
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x250
ret 4