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

Disassembly:
sub esp, 0x6c
push ebx
push ebp
mov ebp, dword [esp + 0x78]
push esi
push edi
lea eax, [esp + 0x18]
push 0
push eax
push ebp
call fcn.00406320
mov esi, dword [esp + 0x88]
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x20], ecx
mov al, byte [esi + 4]
cmp al, 0x48
je 0x409898
mov ecx, dword [esp + 0xa0]
movsx edx, al
mov eax, dword [esp + 0xa4]
mov dword [ecx], edx
cmp dword [eax], 0x64
jge 0x40987c
mov dword [eax], 0x64
mov eax, dword [ecx]
push eax
push str.ERROR__c_from_server
push 1
call fcn.0040b500
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x6c
ret
lea eax, [esi + 0x64]
push 0x40
lea ecx, [esp + 0x3c]
push eax
push ecx
mov dword [esp + 0x20], eax
call fcn.0040bc10
add esp, 0xc
lea edx, [esp + 0x38]
push edx
push str.RECEIVED_PACKET_from__s
push 1
call fcn.0040b500
lea eax, [esp + 0x44]
add esp, 0xc
test eax, eax
je 0x40992b
lea edi, [ebp + 0x4d95]
test edi, edi
je 0x40992b
mov cl, byte [esp + 0x38]
mov al, byte [edi]
cmp cl, al
jne 0x40992b
lea eax, [esp + 0x38]
mov dl, byte [eax]
mov bl, byte [edi]
mov cl, dl
cmp dl, bl
jne 0x40990b
test cl, cl
je 0x409907
mov dl, byte [eax + 1]
mov bl, byte [edi + 1]
mov cl, dl
cmp dl, bl
jne 0x40990b
add eax, 2
add edi, 2
test cl, cl
jne 0x4098e3
xor eax, eax
jmp 0x409910
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x40992b
mov eax, dword [esp + 0x98]
mov edx, dword [eax]
inc edx
mov ecx, edx
mov dword [eax], edx
cmp ecx, 2
jge 0x409baf
lea eax, [esi + 0xb6]
push 8
push eax
call fcn.0040bc80
add esp, 8
lea ecx, [esi + 0xbe]
mov dword [ebp + 0x12c], eax
push 0x20
push ecx
call fcn.0040bc80
mov bl, byte [esi + 5]
add esp, 8
lea edx, [esi + 0x19e]
mov ebp, eax
push 2
push edx
call fcn.0040bee0
mov ecx, dword [esp + 0x88]
mov dword [esp + 0x24], eax
movsx edi, byte [esi + 0x1a6]
mov edx, dword [ecx + 0x12c]
add esp, 8
movsx eax, bl
mov dword [esp + 0x10], eax
push eax
xor eax, eax
test edx, edx
movsx edx, byte [esi + 3]
sete al
push eax
push edi
push edx
call fcn.00409c40
mov ebx, eax
mov al, byte [esi + 3]
add esp, 0x10
cmp al, 0x46
mov dword [esp + 0x98], ebx
je 0x409a0c
cmp al, 0x4c
je 0x4099ca
lea eax, [esp + 0x38]
mov dword [esp + 0x88], 0xffffffff
push eax
push str._s:_NO_FEATURE
jmp 0x409a21
mov eax, dword [esp + 0x9c]
mov dword [esp + 0x88], ebp
cmp dword [eax], 2
jle 0x4099e3
mov dword [eax], 2
test edi, edi
mov ecx, str.SHARED
jne 0x4099f1
mov ecx, 0x422268
mov edx, dword [eax]
lea eax, [esp + 0x38]
push edx
push ebp
push ecx
push eax
push str._s:_YES__s__ld___cut_timeout_to__d_seconds.
push 1
call fcn.0040b500
add esp, 0x18
jmp 0x409a2b
lea ecx, [esp + 0x38]
mov dword [esp + 0x88], 0
push ecx
push str._s:_YES_FEATURE
push 1
call fcn.0040b500
add esp, 0xc
mov eax, dword [esp + 0x8c]
test eax, eax
je 0x409b13
mov ebx, dword [esp + 0x94]
mov edx, dword [esp + 0x90]
cmp dword [ebx], edx
jge 0x409b0c
mov eax, dword [esp + 0x10]
cmp eax, 0x6d
ja case.0x409a61.4
xor ecx, ecx
mov cl, byte [eax + 0x409bd0]
jmp dword [ecx*4 + 0x409bbc]
mov ebp, 1
jmp 0x409a80
mov ebp, 2
jmp 0x409a80
mov ebp, 3
jmp 0x409a80
or ebp, 0xffffffff
mov eax, dword [esp + 0x84]
lea edx, [esp + 0x24]
push edx
push eax
call fcn.00408da0
mov edx, dword [esp + 0x88]
add esp, 0xfffffff4
mov ecx, 5
lea esi, [esp + 0x38]
mov eax, dword [edx + 0x12c]
mov edi, esp
mov edx, dword [esp + 0xa4]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x30]
mov esi, dword [esp + 0x28]
push ecx
mov ecx, dword [esp + 0xa0]
push ebp
push eax
mov eax, dword [esp + 0xac]
push ecx
push esi
push edx
push eax
call fcn.00406e70
mov ebp, dword [ebx]
mov ecx, dword [esp + 0xcc]
add ebp, eax
mov eax, dword [esp + 0x50]
cdq
sub eax, edx
mov dword [ebx], ebp
mov edx, dword [ecx]
add esp, 0x30
sar eax, 1
cmp edx, eax
jle 0x409af9
mov dword [ecx], eax
mov ecx, dword [ecx]
push ecx
push esi
push str._s:_add_server__cut_timeout_to__d_seconds.
push 1
call fcn.0040b500
add esp, 0x10
mov ebx, dword [esp + 0x98]
mov esi, dword [esp + 0xa4]
mov edi, dword [esp + 0xa8]
mov eax, dword [esi]
cmp ebx, eax
jg 0x409b42
cmp ebx, eax
jne 0x409baf
mov edx, dword [esp + 0x80]
mov ecx, dword [edi]
mov eax, dword [edx + 0x12c]
cmp eax, ecx
jge 0x409baf
mov ecx, dword [esp + 0xb0]
mov edx, dword [esp + 0x84]
push ecx
push edx
call fcn.00408da0
mov eax, dword [esp + 0x88]
mov edx, dword [esp + 0xa8]
mov dword [esi], ebx
add esp, 8
mov ecx, dword [eax + 0x12c]
mov eax, dword [esp + 0x10]
mov dword [edi], ecx
mov ecx, dword [esp + 0x14]
mov dword [edx], eax
mov edx, dword [esp + 0xac]
push 0x40
push ecx
push edx
call fcn.0040bc10
mov eax, dword [esp + 0x98]
add esp, 0xc
test eax, eax
jne 0x409baf
cmp dword [esi], 0x1a7
jl 0x409baf
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x6c
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x6c
ret