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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4936b0
mov eax, dword fs:[0]
push eax
sub esp, 0x78
mov eax, dword [0x4b6798]
xor eax, esp
mov dword [esp + 0x70], eax
push ebx
push esi
push edi
mov eax, dword [0x4b6798]
xor eax, esp
push eax
lea eax, [esp + 0x88]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
xor ebx, ebx
xor ecx, ecx
mov word [esp + 0x2c], cx
mov ecx, eax
mov dword [esp + 0x10], ebx
mov dword [esp + 0x40], 7
mov dword [esp + 0x3c], ebx
lea esi, [ecx + 2]
jmp 0x4023d0
mov dx, word [ecx]
add ecx, 2
cmp dx, bx
jne 0x4023d0
sub ecx, esi
sar ecx, 1
push ecx
lea esi, [esp + 0x30]
call fcn.00409bc0
mov dword [esp + 0x90], ebx
mov eax, dword [esp + 0x3c]
push 0x49be3c
xor edi, edi
mov ecx, esi
call fcn.004041a0
test eax, eax
jne 0x402421
cmp dword [esp + 0x40], 8
jb 0x40241a
mov edx, dword [esp + 0x2c]
push edx
call fcn.004736d0
add esp, 4
xor eax, eax
jmp 0x402615
push 1
push 0x49bca0
lea eax, [esp + 0x34]
push eax
xor eax, eax
call fcn.00403340
cmp eax, ebx
je 0x402453
cmp dword [esp + 0x40], 8
jb 0x40241a
mov ecx, dword [esp + 0x2c]
push ecx
call fcn.004736d0
add esp, 4
xor eax, eax
jmp 0x402615
push 1
push 0x49bca4
lea edx, [esp + 0x34]
push edx
xor eax, eax
call fcn.00403340
cmp eax, 0xffffffff
jne 0x402486
cmp dword [esp + 0x40], 8
jb 0x40241a
mov eax, dword [esp + 0x2c]
push eax
call fcn.004736d0
add esp, 4
xor eax, eax
jmp 0x402615
dec eax
push eax
mov ecx, 1
lea esi, [esp + 0x68]
lea edx, [esp + 0x30]
call fcn.00402e20
mov eax, esi
mov byte [esp + 0x90], 1
call fcn.0046b8d0
mov ecx, esi
push ecx
lea edx, [esp + 0x18]
push edx
mov esi, 0x2c
call fcn.0046b6e0
add esp, 8
mov byte [esp + 0x90], 2
mov edi, dword [esp + 0x18]
mov esi, dword [esp + 0x14]
mov ecx, edi
sub ecx, esi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x4025ad
xor edi, edi
jmp 0x4024f4
mov edi, dword [esp + 0x24]
xor ecx, ecx
push ecx
lea eax, [edi + esi]
mov word [esp + 0x4c], cx
push eax
or eax, 0xffffffff
lea ecx, [esp + 0x50]
mov dword [esp + 0x64], 7
mov dword [esp + 0x60], 0
call fcn.004097e0
lea eax, [esp + 0x48]
mov byte [esp + 0x90], 3
call fcn.0046b9b0
call fcn.0046b920
lea edx, [esp + 0x28]
push edx
lea esi, [esp + 0x4c]
call fcn.00402f20
mov eax, dword [esp + 0x28]
cmp eax, dword [0x4e17a4]
je 0x402562
mov eax, dword [eax + 0x28]
test eax, 0x1ff
je 0x40255e
and dword [esp + 0x10], 0xfffffe00
or dword [esp + 0x10], eax
mov byte [esp + 0x90], 2
cmp dword [esp + 0x5c], 8
jb 0x40257e
mov eax, dword [esp + 0x48]
push eax
call fcn.004736d0
add esp, 4
mov esi, dword [esp + 0x14]
add edi, 0x1c
mov dword [esp + 0x24], edi
mov edi, dword [esp + 0x18]
mov ecx, edi
sub ecx, esi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
inc ebx
add ecx, edx
cmp ebx, ecx
jb 0x4024f0
xor ebx, ebx
cmp esi, ebx
je 0x4025c7
mov eax, esi
call fcn.00403f60
mov edx, dword [esp + 0x14]
push edx
call fcn.004736d0
add esp, 4
mov esi, 8
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
cmp dword [esp + 0x78], esi
jb 0x4025eb
mov eax, dword [esp + 0x64]
push eax
call fcn.004736d0
add esp, 4
xor ecx, ecx
mov dword [esp + 0x78], 7
mov dword [esp + 0x74], ebx
mov word [esp + 0x64], cx
cmp dword [esp + 0x40], esi
jb 0x402611
mov edx, dword [esp + 0x2c]
push edx
call fcn.004736d0
add esp, 4
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x88]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x70]
xor ecx, esp
call fcn.004736db
mov esp, ebp
pop ebp
ret 4