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

Disassembly:
sub esp, 0x40c
mov eax, dword [0x45a7c0]
mov ecx, dword [0x4663f8]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x41c]
mov dword [esp + 0x414], eax
mov eax, dword [esi + 0x24]
cmp eax, ecx
push edi
jge 0x4074c6
mov ecx, dword [0x462da0]
mov eax, dword [0x462da4]
add ecx, 1
adc eax, 0
mov dword [0x462da0], ecx
mov dword [0x462da4], eax
mov ecx, dword [esi + 0xdc]
call fcn.00402d30
jmp 0x407bee
cmp eax, dword [0x4663fc]
jle 0x4074fa
mov ecx, dword [0x462da8]
mov eax, dword [0x462dac]
add ecx, 1
adc eax, 0
mov dword [0x462da8], ecx
mov dword [0x462dac], eax
mov ecx, dword [esi + 0xdc]
call fcn.00402d30
jmp 0x407bee
mov eax, dword [esi + 0x1c]
test al, 2
jne 0x407510
mov cl, byte [esi + 0x38]
test cl, cl
je 0x407510
or eax, 0x1000002
mov dword [esi + 0x1c], eax
mov eax, dword [esi + 0x1c]
and eax, 0x80002
cmp eax, 2
mov ebp, 1
mov edi, 0xffffff
jne 0x4075ab
cmp dword [esi + 0x8c], edi
jbe 0x4075ab
cmp dword [esi + 0x48], 0xaa00
jae 0x4075ab
movzx ecx, byte [esi + 0x38]
cmp ecx, dword [0x466400]
jge 0x40759b
mov eax, dword [0x462db0]
mov ebx, dword [0x462db4]
add eax, ebp
adc ebx, 0
mov dword [0x462db0], eax
mov dword [0x462db4], ebx
or dword [esi + 0x1c], 8
mov al, byte [0x466428]
test al, 1
je 0x407580
mov ecx, dword [esi + 0xdc]
call fcn.00402d30
jmp 0x407bee
test al, 2
je 0x40759b
mov al, byte [esi + 0x38]
test al, al
je 0x40759b
mov edx, dword [0x469a28]
push edx
push esi
call fcn.00403ac0
add esp, 8
cmp byte [esi + 0x38], 0x28
ja 0x4075ab
or dword [esi + 0x108], 0x800010
cmp dword [esi + 0x70], 0x4030201
jne 0x4075d9
cmp dword [esi + 0x74], 0x8070605
jne 0x4075d9
cmp dword [esi + 0x78], 0x12111009
jne 0x4075d9
cmp dword [esi + 0x7c], 0x16151413
jne 0x4075d9
or dword [esi + 0x108], 0x400010
cmp dword [esi + 0x8c], edi
mov dword [esi + 0x12c], esi
jbe 0x4075f1
mov eax, esi
or eax, ebp
mov dword [esi + 0x12c], eax
mov eax, dword [esi + 0x20]
test al, 1
jne 0x4076b4
mov ecx, dword [0x46641c]
xor edi, edi
cmp ecx, edi
je 0x407657
mov ecx, dword [0x465d94]
mov edx, dword [esi + 0xdc]
push ecx
push edx
call fcn.00402090
mov ebx, dword [0x462db8]
mov edx, dword [0x462dbc]
add ebx, ebp
adc edx, edi
push esi
mov dword [0x462db8], ebx
mov dword [0x462dbc], edx
call fcn.004052e0
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x408]
call fcn.004233fe
add esp, 0x40c
ret
mov ecx, dword [0x462620]
cmp ecx, dword [0x465dbc]
jbe 0x4076b4
mov edx, dword [0x465d88]
mov eax, dword [esi + 0xdc]
push edx
push eax
call fcn.00402090
mov ebx, dword [0x462dc0]
mov edx, dword [0x462dc4]
add ebx, ebp
adc edx, edi
push esi
mov dword [0x462dc0], ebx
mov dword [0x462dc4], edx
call fcn.004052e0
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x408]
call fcn.004233fe
add esp, 0x40c
ret
mov ecx, dword [esi + 0x1c]
mov ebx, 0x40000
test ebx, ecx
mov edx, 4
je 0x407709
test dl, al
jne 0x407709
mov ecx, dword [0x4650fc]
mov edx, dword [esi + 0xdc]
push ecx
push edx
call fcn.00402090
mov edx, dword [0x462dcc]
inc edx
push esi
mov dword [0x462dcc], edx
call fcn.004052e0
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x408]
call fcn.004233fe
add esp, 0x40c
ret
cmp dword [esi + 0x28], edx
jne 0x407765
cmp dword [esi + 0x24], 0x3d
jge 0x407765
mov eax, dword [0x4650e8]
mov ecx, dword [esi + 0xdc]
push eax
push ecx
call fcn.00402090
mov ecx, dword [0x462dd0]
inc ecx
push ebp
mov dword [0x462dd0], ecx
mov edx, dword [esi + 0xd8]
push 0x258
push edx
call fcn.0041fb10
push esi
call fcn.004052e0
add esp, 0x18
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x408]
call fcn.004233fe
add esp, 0x40c
ret
mov ecx, dword [0x462624]
mov eax, dword [0x462620]
mov edi, dword [0x462668]
dec ecx
inc eax
mov dword [0x462624], ecx
mov ecx, dword [0x46266c]
add edi, ebp
adc ecx, 0
mov dword [0x462620], eax
mov dword [0x462668], edi
mov dword [0x46266c], ecx
test byte [esi + 0x20], 1
je 0x4077bf
or dword [esi + 0x1c], 0x4000
mov ecx, dword [0x46262c]
mov eax, dword [0x462640]
inc ecx
inc eax
mov dword [0x46262c], ecx
mov dword [0x462640], eax
test byte [esi + 0x20], 8
je 0x4077cb
inc dword [0x462630]
test byte [esi + 0x1c], 2
je 0x4077d7
inc dword [0x462644]
test dword [esi + 0x1c], ebx
je 0x4077e2
inc dword [0x462654]
mov al, byte [esi + 0x1c]
test al, al
jns 0x4077ef
inc dword [0x462648]
test dword [esi + 0x108], 0x200000
je 0x407801
inc dword [0x462634]
test dword [esi + 0x108], 0x400000
je 0x407813
inc dword [0x462638]
cmp dword [esi + 0x28], edx
jne 0x40781e
inc dword [0x46264c]
mov eax, dword [esi + 0x28]
mov edi, 5
cmp eax, edi
jne 0x407830
inc dword [0x462650]
mov byte [esi + 0x39], 3
lea eax, [esi + 0x98]
mov ecx, 0x10
nop
mov ebp, dword [esi + 0x2c]
sub ebp, 0x960
mov dword [eax], ebp
add eax, edx
dec ecx
jne 0x407840
mov eax, dword [esi + 4]
mov ecx, dword [esi]
mov dword [eax], ecx
mov edx, dword [esi]
mov eax, dword [esi + 4]
mov dword [edx + 4], eax
mov ecx, dword [0x45a044]
mov dword [esi + 4], ecx
mov dword [esi], 0x45a040
mov edx, dword [0x45a044]
mov dword [edx], esi
mov dword [0x45a044], esi
mov eax, dword [esi + 0xe0]
cmp eax, 0xffffffff
je 0x407898
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi + 0xe0], 0xffffffff
mov eax, dword [esi + 0x100]
test eax, eax
je 0x4078ba
push eax
push 0x45a180
call fcn.0041f5e0
add esp, 8
mov dword [esi + 0x100], 0
push 0x45b790
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi + 0x8c]
mov edx, dword [0x466414]
mov dword [esp + 0x1e], eax
mov eax, dword [esi + 0x1c]
and eax, ebx
mov byte [esp + 0x18], 0xe3
mov dword [esp + 0x19], edi
mov byte [esp + 0x1d], 0x40
jne 0x4078ff
mov ecx, dword [esi + 0x20]
test cl, 1
je 0x4078f6
test edx, edx
jne 0x4078ff
test cl, 8
jne 0x4078ff
push 0xa
jmp 0x407930
xor ecx, ecx
test edx, edx
setne cl
mov byte [esp + 0x19], 9
or ecx, 0x38
test eax, eax
mov dword [esp + 0x22], ecx
je 0x40792e
mov edx, dword [0x465e04]
push 0x12
lea eax, [esp + 0x1c]
mov byte [esp + 0x1d], 0xd
mov dword [esp + 0x2a], edx
push eax
jmp 0x407935
push 0xe
lea ecx, [esp + 0x1c]
push ecx
push esi
call fcn.00403940
add esp, 0xc
mov edx, esi
call fcn.00403e50
mov edx, dword [0x462e18]
mov ebx, esi
mov dword [esi + 0x168], edx
call fcn.00403cc0
mov eax, dword [0x465e48]
test eax, eax
je 0x40798b
cmp word [esi + 0x90], 0x1236
jne 0x40798b
mov eax, dword [0x4650d0]
push eax
lea ecx, [esp + 0x1c]
push ecx
call fcn.0040fea0
push eax
lea edx, [esp + 0x24]
push edx
push esi
call fcn.00403940
add esp, 0x14
mov eax, dword [esi + 0x108]
and eax, 0x8400000
cmp eax, 0x400000
jne 0x4079bd
mov ecx, dword [0x465d80]
push ecx
lea edx, [esp + 0x1c]
push edx
call fcn.0040fea0
push eax
lea eax, [esp + 0x24]
push eax
push esi
call fcn.00403940
add esp, 0x14
mov cl, byte [0x469a40]
push 0x45b790
mov byte [esi + 0x170], cl
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [0x466450]
test eax, eax
je 0x407a1b
mov eax, dword [esi + 0x3c]
test eax, eax
jne 0x4079e9
mov eax, str._null_
movzx edx, word [esi + 0x90]
push eax
mov eax, dword [esi + 0xd8]
push edx
push eax
lea ecx, [esp + 0x24]
push ecx
call fcn.0041fa90
mov edx, dword [esi + 0x8c]
add esp, 8
push eax
push edx
push str.login:__u__s:_d__s_n
call fcn.0040ce60
add esp, 0x14
mov eax, dword [esi + 0xd8]
xor edx, edx
mov ecx, 0x4021
div ecx
xor ebp, ebp
mov dword [esp + 0x10], 0
mov edi, dword [edx*4 + 0x469b00]
test edi, edi
mov dword [esp + 0x14], edx
je 0x407b65
jmp 0x407a50
mov eax, dword [edi + 0x1c]
test eax, 0x10200
mov ebx, dword [edi + 0x18]
jne 0x407b5b
mov edx, dword [edi + 0xd8]
cmp edx, dword [esi + 0xd8]
jne 0x407b5b
mov cx, word [edi + 0x90]
cmp cx, word [esi + 0x90]
jne 0x407ae9
mov edx, dword [esi + 0x70]
cmp edx, dword [edi + 0x70]
jne 0x407ae9
mov ecx, dword [esi + 0x74]
cmp ecx, dword [edi + 0x74]
jne 0x407ae9
mov edx, dword [esi + 0x78]
cmp edx, dword [edi + 0x78]
jne 0x407ae9
mov ecx, dword [esi + 0x7c]
cmp ecx, dword [edi + 0x7c]
jne 0x407ae9
mov eax, dword [0x466458]
test eax, eax
je 0x407abe
mov edx, dword [0x462e18]
push 0x50
push edx
push edi
call fcn.00404c40
add esp, 0xc
mov eax, dword [edi + 0x10]
inc eax
cmp eax, 6
mov dword [esi + 0x10], eax
jle 0x407ad1
mov dword [esi + 0x10], 6
mov edx, dword [0x462b30]
inc edx
push edi
mov dword [0x462b30], edx
call fcn.004052e0
add esp, 4
jmp 0x407b5b
mov ecx, dword [0x465dfc]
inc ebp
cmp ebp, ecx
jb 0x407b22
test ah, 8
je 0x407b03
lea eax, [ecx + ecx*4]
shl eax, 2
cmp ebp, eax
jb 0x407b22
mov eax, dword [0x462b34]
mov edx, dword [esp + 0x10]
inc eax
inc edx
push edi
mov dword [0x462b34], eax
mov dword [esp + 0x14], edx
call fcn.004052e0
add esp, 4
jmp 0x407b5b
mov ecx, dword [esi + 0x70]
cmp ecx, dword [edi + 0x70]
jne 0x407b5b
mov edx, dword [esi + 0x74]
cmp edx, dword [edi + 0x74]
jne 0x407b5b
mov eax, dword [esi + 0x78]
cmp eax, dword [edi + 0x78]
jne 0x407b5b
mov ecx, dword [esi + 0x7c]
cmp ecx, dword [edi + 0x7c]
jne 0x407b5b
mov edx, dword [esi + 0x108]
mov eax, 0x800010
or edx, eax
mov dword [esi + 0x108], edx
or dword [edi + 0x108], eax
test ebx, ebx
mov edi, ebx
jne 0x407a50
mov eax, dword [esi + 0x1c]
test ah, 2
jne 0x407baf
mov eax, dword [esp + 0x14]
mov edx, dword [eax*4 + 0x469b00]
mov dword [esi + 0x18], edx
mov dword [eax*4 + 0x469b00], esi
mov eax, dword [esi + 0x1c]
mov edx, dword [esi + 0xdc]
or eax, 0x100
mov dword [esi + 0x1c], eax
mov eax, dword [esi + 0x174]
mov ecx, dword [0x45b8e8]
push 0x27
add eax, 0x401
push eax
push ecx
push edx
call dword [sym.imp.WS2_32.dll_WSAAsyncSelect]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x407bc8
mov eax, dword [esi + 0xd8]
push 2
push eax
call fcn.004073c0
add esp, 8
push 0x45b790
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push esi
call fcn.00403b30
add esp, 4
push 0x45b790
mov edi, eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp edi, 0xffffffff
jne 0x407bf7
push esi
call fcn.004052e0
add esp, 4
mov ecx, dword [esp + 0x418]
pop edi
pop esi
pop ebp
pop ebx
call fcn.004233fe
add esp, 0x40c
ret