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

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x4554c1
push eax
mov dword fs:[0], esp
sub esp, 0xac
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0xd0]
xor ebp, ebp
cmp edi, ebp
mov ebx, ecx
jne 0x4097a5
xor eax, eax
jmp 0x409e78
mov esi, dword [esp + 0xd4]
push esi
push edi
call fcn.0041bcc0
add esp, 8
cmp eax, 0x13
jg 0x409daf
je 0x409989
sub eax, 0x11
je 0x40984e
dec eax
jne 0x409e6a
lea ecx, [esp + 0x2c]
call fcn.0041b690
push esi
push edi
lea ecx, [esp + 0x34]
mov dword [esp + 0xcc], 9
call fcn.0041a920
lea eax, [esp + 0x64]
push eax
lea ecx, [esp + 0x30]
call fcn.0041aff0
mov eax, dword [eax]
push ebp
push eax
mov byte [esp + 0xcc], 0xa
call 0x3e5600
mov ecx, eax
call 0x4037e0
lea ecx, [esp + 0x64]
call 0x3e3d60
mov ecx, dword [ebx + 0x24]
push 0xc
push ebp
push 0x4ce
push ecx
call dword [0x458714]
lea ecx, [esp + 0x2c]
mov dword [esp + 0xc4], 0xffffffff
call fcn.0041aea0
jmp 0x409e6a
lea ecx, [esp + 0x2c]
call fcn.0041b500
push esi
push edi
lea ecx, [esp + 0x34]
mov dword [esp + 0xcc], 3
call fcn.0041a840
lea edx, [esp + 0x68]
push edx
lea ecx, [esp + 0x30]
call fcn.0041af40
lea ecx, [ebx + 0x30]
push eax
mov byte [esp + 0xc8], 4
call 0x3e41a0
lea ecx, [esp + 0x68]
mov byte [esp + 0xc4], 3
call 0x3e3d60
lea eax, [esp + 0x74]
push eax
lea ecx, [esp + 0x30]
call fcn.0041afa0
push 0x45941c
push eax
mov byte [esp + 0xcc], 5
call 0x3f58a0
add esp, 8
lea ecx, [esp + 0x74]
mov byte [esp + 0x13], al
mov byte [esp + 0xc4], 3
call 0x3e3d60
mov al, byte [esp + 0x13]
test al, al
je 0x4098e1
inc dword [ebx + 0x3c]
lea ecx, [esp + 0x5c]
push ecx
lea ecx, [esp + 0x30]
call fcn.0041afa0
mov esi, eax
lea edx, [esp + 0x60]
push edx
lea ecx, [esp + 0x30]
mov byte [esp + 0xc8], 6
call fcn.0041af70
mov edi, eax
lea eax, [esp + 0x70]
push eax
lea ecx, [esp + 0x30]
mov byte [esp + 0xc8], 7
call fcn.0041af40
mov esi, dword [esi]
mov edi, dword [edi]
mov eax, dword [eax]
push esi
push edi
push eax
mov byte [esp + 0xd0], 8
call 0x3e5600
mov ecx, eax
call 0x404070
lea ecx, [esp + 0x70]
call 0x3e3d60
lea ecx, [esp + 0x60]
call 0x3e3d60
lea ecx, [esp + 0x5c]
call 0x3e3d60
mov ecx, dword [ebx + 0x24]
push 0xb
push ebp
push 0x4ce
push ecx
call dword [0x458714]
lea ecx, [esp + 0x2c]
mov dword [esp + 0xc4], 0xffffffff
call fcn.0041ae30
mov edi, dword [esp + 0xd0]
jmp 0x409e6a
lea ecx, [esp + 0x80]
call fcn.0041b780
push esi
push edi
lea ecx, [esp + 0x88]
mov dword [esp + 0xcc], 0xb
call fcn.0041b9b0
lea ecx, [esp + 0x80]
call fcn.0041a990
cmp eax, ebp
jne 0x409b11
lea edx, [esp + 0x50]
push edx
lea ecx, [esp + 0x84]
call fcn.0041b190
lea esi, [ebx + 0x30]
push eax
mov ecx, esi
mov byte [esp + 0xc8], 0xc
call 0x3e41a0
mov eax, dword [esp + 0x50]
add eax, 0xfffffff0
mov byte [esp + 0xc4], 0xb
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409a0c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
push ecx
mov ecx, esp
mov dword [esp + 0x1c], esp
push esi
call 0x3e3dd0
mov byte [esp + 0xc8], 0xb
call 0x3e5600
mov ecx, eax
call fcn.004090c0
test byte [esp + 0xa0], 0xc
je 0x409a9c
add ebx, 0x34
push esi
push ebx
call 0x3e56c0
add esp, 8
test al, al
je 0x409a9c
push 0x4589dc
push esi
call 0x3f4990
add esp, 8
test al, al
je 0x409a9c
push esi
mov ecx, ebx
call 0x3e43c0
mov ebx, dword [ebx]
lea eax, [esp + 0x14]
push ebx
push eax
call fcn.00419870
add esp, 8
lea ecx, [esp + 0x14]
push ecx
mov byte [esp + 0xc8], 0xe
call 0x3f2160
mov ecx, eax
call fcn.0040b8b0
lea ecx, [esp + 0x14]
mov byte [esp + 0xc4], 0xb
call 0x3e3d60
test byte [esp + 0xa0], 0xe
jne 0x409ab2
call 0x3f22c0
mov ecx, eax
call 0x400110
lea edx, [esp + 0x6c]
push edx
lea ecx, [esp + 0x84]
call fcn.0041b190
mov ecx, dword [esp + 0xa0]
mov eax, dword [eax]
push ecx
push eax
mov byte [esp + 0xcc], 0xf
call 0x3e5600
mov ecx, eax
call int.004072a0
mov eax, dword [esp + 0x6c]
add eax, 0xfffffff0
mov byte [esp + 0xc4], 0xb
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x409d93
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
jmp 0x409d93
cmp eax, 1
jne 0x409cf1
mov dword [esp + 0x20], ebp
mov dword [esp + 0x24], ebp
mov dword [esp + 0x28], ebp
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x84]
mov byte [esp + 0xc8], 0x10
call fcn.0041bc80
push 1
push 1
push ebp
push ecx
lea eax, [ebx + 0x30]
mov ecx, esp
mov dword [esp + 0x28], esp
push eax
mov dword [esp + 0x28], ebp
call 0x3e3dd0
mov byte [esp + 0xd4], 0x10
call 0x3f22c0
mov ecx, eax
call 0x400520
mov dword [esp + 0x18], eax
xor esi, esi
mov eax, dword [esp + 0x20]
cmp eax, ebp
mov edx, dword [esp + 0x24]
je 0x409c25
mov ecx, edx
sub ecx, eax
sar ecx, 3
cmp esi, ecx
jae 0x409c25
mov edx, dword [esp + 0xa0]
mov ecx, dword [eax + esi*8]
mov eax, dword [eax + esi*8 + 4]
push edx
push ecx
push eax
call 0x3e5600
mov ecx, eax
call 0x407330
mov edi, eax
test byte [esp + 0xa0], 0xc
mov ebp, edx
mov dword [esp + 0x78], edi
mov dword [esp + 0x7c], ebp
je 0x409bd9
lea eax, [esp + 0x78]
push eax
lea ecx, [esp + 0xb8]
push ecx
lea ecx, [ebx + 0x40]
call 0x404fe0
push ebp
push edi
call 0x3f22c0
mov ecx, eax
call 0x3ffc70
test eax, eax
jne 0x409c0d
mov edx, dword [esp + 0x18]
push edx
push ebp
push edi
call 0x3f22c0
mov ecx, eax
call 0x3ffc40
mov edi, dword [esp + 0xd0]
inc esi
xor ebp, ebp
jmp 0x409b72
mov eax, dword [esp + 0x14]
mov edi, dword [esp + 0xd0]
inc eax
inc esi
mov dword [esp + 0x14], eax
xor ebp, ebp
jmp 0x409b72
cmp eax, ebp
push 1
push 2
jne 0x409c31
xor eax, eax
jmp 0x409c38
sub edx, eax
sar edx, 3
mov eax, edx
sub eax, dword [esp + 0x1c]
push eax
mov eax, dword [ebx + 0x30]
push ecx
sub eax, 0x10
mov dword [esp + 0x28], esp
mov esi, esp
push eax
call 0x3e3cc0
add eax, 0x10
add esp, 4
mov dword [esi], eax
mov byte [esp + 0xd4], 0x10
call 0x3f22c0
mov ecx, eax
call 0x400520
call 0x3e5600
mov ecx, eax
call 0x402e30
call 0x3e5600
mov ecx, dword [eax + 0x20]
or ecx, dword [eax + 0x24]
jne 0x409c91
call 0x3e5600
mov ecx, eax
call 0x404b20
mov ecx, dword [esp + 0x20]
cmp ecx, ebp
je 0x409ca7
mov eax, dword [esp + 0x24]
sub eax, ecx
sar eax, 3
cmp eax, 0xa
jae 0x409ce3
test byte [esp + 0xa0], 0xe
jne 0x409cd2
mov eax, dword [ebx + 0x24]
mov esi, dword [0x458714]
push 1
push ebp
push 0x4ce
push eax
call esi
mov ecx, dword [ebx + 0x24]
push ebp
push ebp
push 0x4ca
push ecx
call esi
test byte [esp + 0xa0], 0xc
jne 0x409ce3
mov ecx, ebx
call fcn.00408db0
lea ecx, [esp + 0x1c]
call 0x3f14c0
jmp 0x409d93
cmp eax, 2
jne 0x409d93
add ebx, 0x30
push 0x4589dc
push ebx
call 0x3f4970
add esp, 8
test al, al
je 0x409d62
lea edx, [esp + 0x54]
push edx
lea ecx, [esp + 0x84]
call fcn.0041b190
push eax
mov ecx, ebx
mov byte [esp + 0xc8], 0x13
call 0x3e43c0
lea ecx, [esp + 0x54]
mov byte [esp + 0xc4], 0xb
call 0x3e3d60
push ecx
mov ecx, esp
mov dword [esp + 0x1c], esp
push ebx
call 0x3e3dd0
mov byte [esp + 0xc8], 0xb
call 0x3e5600
mov ecx, eax
call fcn.004090c0
lea eax, [esp + 0x58]
push eax
lea ecx, [esp + 0x84]
call fcn.0041b190
mov eax, dword [eax]
push eax
mov byte [esp + 0xc8], 0x15
call 0x3e5600
mov ecx, eax
call fcn.004020c0
lea ecx, [esp + 0x58]
call 0x3e3d60
lea ecx, [esp + 0x80]
mov dword [esp + 0xc4], 0xffffffff
call fcn.0041b7f0
jmp 0x409e6a
cmp eax, 0x2000
jne 0x409e6a
lea ecx, [esp + 0x2c]
call fcn.0041b430
push esi
push edi
lea ecx, [esp + 0x34]
mov dword [esp + 0xcc], ebp
call fcn.0041a790
lea ecx, [esp + 0x2c]
call fcn.0041a810
lea ecx, [esp + 0x18]
push ecx
lea ecx, [esp + 0x30]
mov dword [ebx + 0x2c], eax
call fcn.0041aef0
push ecx
mov edx, esp
mov dword [esp + 0x18], esp
push edx
lea ecx, [esp + 0x34]
mov byte [esp + 0xcc], 1
call fcn.0041aef0
lea ecx, [esp + 0x30]
mov byte [esp + 0xc8], 1
call fcn.0041a830
push eax
lea ecx, [esp + 0x34]
call fcn.0041a810
push eax
call 0x3e5600
mov ecx, eax
call 0x404e30
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov byte [esp + 0xc4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409e56
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea ecx, [esp + 0x2c]
mov dword [esp + 0xc4], 0xffffffff
call fcn.0041ae00
push edi
call fcn.0042b062
add esp, 4
mov eax, 1
mov ecx, dword [esp + 0xbc]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0xb8
ret 0x10