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

Disassembly:
sub esp, 0x80
mov eax, dword [0x46e3d0]
xor eax, esp
mov dword [esp + 0x7c], eax
mov eax, dword [esp + 0x84]
push ebx
push ebp
push esi
push edi
mov edi, edx
xor ebp, ebp
mov ebx, ecx
lea esi, [esp + 0x58]
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], eax
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x30], ebp
call fcn.00401d30
cmp eax, ebp
jne 0x4028ac
mov eax, dword [esp + 0x5c]
cmp eax, ebp
ja 0x4023a3
mov esi, dword [esp + 0x58]
cmp esi, 0x80000000
jae 0x4023a3
cmp eax, ebp
ja 0x4023a3
cmp esi, 0x4000000
jb 0x4023ad
mov eax, 0x80004001
jmp 0x4028ac
cmp esi, ebp
mov dword [edi], esi
jne 0x402525
mov dword [edi + 4], ebp
cmp esi, ebp
jbe 0x4023d6
xor ecx, ecx
mov edx, esi
mov eax, dword [edi + 4]
lea eax, [ecx + eax + 0x10]
add ecx, 0x18
sub edx, 1
mov dword [eax], ebp
mov dword [eax + 4], ebp
jne 0x4023c2
cmp esi, ebp
mov dword [esp + 0x18], ebp
jbe 0x402736
mov dword [esp + 0x34], ebp
mov eax, dword [edi + 4]
add eax, dword [esp + 0x34]
mov esi, dword [ebx + 4]
cmp esi, ebp
mov dword [esp + 0x1c], eax
je 0x40272c
mov eax, dword [ebx]
add esi, 0xffffffff
mov dword [ebx + 4], esi
mov cl, byte [eax]
movzx edx, cl
add eax, 1
and edx, 0xf
mov byte [esp + 0x17], cl
mov dword [ebx], eax
mov ebp, edx
mov edi, 0
jbe 0x40243e
test esi, esi
je 0x40272c
sub esi, 1
mov dword [ebx + 4], esi
mov dl, byte [eax]
mov byte [esp + edi + 0x7c], dl
add eax, 1
add edi, 1
cmp edi, ebp
mov dword [ebx], eax
jb 0x40241e
cmp ebp, 8
ja 0x4023a3
mov eax, dword [esp + 0x1c]
xor edx, edx
cmp ebp, edx
mov dword [eax + 8], edx
mov dword [eax + 0xc], edx
jbe 0x402485
mov dword [esp + 0x38], edx
lea edi, [esp + ebp + 0x7b]
mov esi, eax
movzx eax, byte [edi]
mov ecx, dword [esp + 0x38]
cdq
call fcn.00456fe0
or dword [esi + 8], eax
or dword [esi + 0xc], edx
add dword [esp + 0x38], 8
sub edi, 1
sub ebp, 1
jne 0x402461
mov cl, byte [esp + 0x17]
test cl, 0x10
je 0x40254b
lea esi, [esp + 0x68]
call fcn.00401d30
xor ebp, ebp
cmp eax, ebp
jne 0x4028ac
mov ecx, dword [esp + 0x6c]
cmp ecx, ebp
ja 0x4023a3
mov eax, dword [esp + 0x68]
jb 0x4024be
cmp eax, 0x80000000
jae 0x4023a3
cmp ecx, ebp
ja 0x4023a3
jb 0x4024d3
cmp eax, 0x4000000
jae 0x4023a3
mov edi, dword [esp + 0x1c]
lea esi, [esp + 0x60]
mov dword [edi], eax
call fcn.00401d30
cmp eax, ebp
jne 0x4028ac
mov ecx, dword [esp + 0x64]
cmp ecx, ebp
ja 0x4023a3
mov eax, dword [esp + 0x60]
jb 0x402507
cmp eax, 0x80000000
jae 0x4023a3
cmp ecx, ebp
ja 0x4023a3
jb 0x40251c
cmp eax, 0x4000000
jae 0x4023a3
mov cl, byte [esp + 0x17]
mov dword [edi + 4], eax
jmp 0x40255e
lea ecx, [esi + esi*2]
add ecx, ecx
add ecx, ecx
add ecx, ecx
push ecx
call dword [esp + 0x28]
add esp, 4
cmp eax, ebp
mov dword [edi + 4], eax
jne 0x4023ba
mov eax, 0x8007000e
jmp 0x4028ac
mov eax, dword [esp + 0x1c]
mov dword [eax], 1
mov dword [eax + 4], 1
xor ebp, ebp
test cl, 0x20
je 0x4025c2
lea esi, [esp + 0x50]
mov dword [esp + 0x50], ebp
mov dword [esp + 0x54], ebp
call fcn.00401d30
cmp eax, ebp
jne 0x4028ac
mov edi, dword [esp + 0x50]
cmp edi, ebp
mov esi, dword [esp + 0x1c]
mov dword [esi + 0x10], edi
jne 0x402590
mov dword [esi + 0x14], ebp
jmp 0x4025a8
push edi
call dword [esp + 0x28]
xor ecx, ecx
add esp, 4
cmp eax, ebp
setne cl
mov dword [esi + 0x14], eax
mov eax, ecx
cmp eax, ebp
je 0x402541
mov edx, dword [esi + 0x14]
push edx
mov eax, ebx
call fcn.00401ca0
add esp, 4
cmp eax, ebp
jne 0x4028ac
mov cl, byte [esp + 0x17]
test cl, cl
jns 0x4026fa
lea ebx, [ebx]
mov esi, dword [ebx + 4]
cmp esi, ebp
je 0x40272c
mov eax, dword [ebx]
add esi, 0xffffffff
lea edi, [eax + 1]
mov dword [ebx + 4], esi
mov cl, byte [eax]
mov al, cl
and al, 0xf
movzx eax, al
cdq
mov dword [esp + 0x78], edx
xor edx, edx
cmp dword [esp + 0x78], edx
mov byte [esp + 0x17], cl
mov dword [ebx], edi
ja 0x40272c
jb 0x402610
cmp eax, esi
ja 0x40272c
sub esi, eax
add edi, eax
test cl, 0x10
mov dword [ebx + 4], esi
mov dword [ebx], edi
je 0x4026b0
lea esi, [esp + 0x40]
call fcn.00401d30
xor ebp, ebp
cmp eax, ebp
jne 0x4028ac
mov ecx, dword [esp + 0x44]
cmp ecx, ebp
ja 0x4023a3
mov eax, dword [esp + 0x40]
jb 0x402652
cmp eax, 0x80000000
jae 0x4023a3
cmp ecx, ebp
ja 0x4023a3
jb 0x402667
cmp eax, 0x4000000
jae 0x4023a3
lea esi, [esp + 0x28]
call fcn.00401d30
cmp eax, ebp
jne 0x4028ac
mov ecx, dword [esp + 0x2c]
cmp ecx, ebp
ja 0x4023a3
mov eax, dword [esp + 0x28]
jb 0x402695
cmp eax, 0x80000000
jae 0x4023a3
cmp ecx, ebp
ja 0x4023a3
jb 0x4026aa
cmp eax, 0x4000000
jae 0x4023a3
mov cl, byte [esp + 0x17]
jmp 0x4026b2
xor ebp, ebp
test cl, 0x20
je 0x4026f2
lea esi, [esp + 0x48]
mov dword [esp + 0x48], ebp
mov dword [esp + 0x4c], ebp
call fcn.00401d30
cmp eax, ebp
jne 0x4028ac
mov edx, dword [esp + 0x4c]
mov eax, dword [ebx + 4]
xor ecx, ecx
cmp edx, ecx
ja 0x40272c
mov ecx, dword [esp + 0x48]
jb 0x4026e7
cmp ecx, eax
ja 0x40272c
sub eax, ecx
add dword [ebx], ecx
mov cl, byte [esp + 0x17]
mov dword [ebx + 4], eax
test cl, cl
js 0x4025d0
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov eax, dword [esp + 0x18]
add dword [esp + 0x3c], ecx
add dword [esp + 0x30], edx
add dword [esp + 0x34], 0x18
add eax, 1
cmp eax, dword [esp + 0x58]
mov dword [esp + 0x18], eax
jae 0x402736
mov edi, dword [esp + 0x20]
xor ebp, ebp
jmp 0x4023e6
mov eax, 6
jmp 0x4028ac
mov esi, dword [esp + 0x30]
mov edi, dword [esp + 0x20]
add esi, 0xffffffff
mov dword [esp + 0x18], esi
mov dword [edi + 8], esi
jne 0x402753
mov dword [edi + 0xc], 0
jmp 0x40276d
lea eax, [esi*8]
push eax
call dword [esp + 0x28]
add esp, 4
test eax, eax
mov dword [edi + 0xc], eax
je 0x402541
xor edi, edi
test esi, esi
jbe 0x402823
jmp 0x402780
mov ecx, dword [esp + 0x20]
mov edx, dword [ecx + 0xc]
lea esi, [esp + 0x28]
lea ebp, [edx + edi*8]
call fcn.00401d30
test eax, eax
jne 0x4028ac
mov ecx, dword [esp + 0x2c]
test ecx, ecx
ja 0x4023a3
mov eax, dword [esp + 0x28]
jb 0x4027b8
cmp eax, 0x80000000
jae 0x4023a3
test ecx, ecx
ja 0x4023a3
jb 0x4027cd
cmp eax, 0x4000000
jae 0x4023a3
lea esi, [esp + 0x40]
mov dword [ebp], eax
call fcn.00401d30
test eax, eax
jne 0x4028ac
mov ecx, dword [esp + 0x44]
test ecx, ecx
ja 0x4023a3
mov eax, dword [esp + 0x40]
jb 0x4027fe
cmp eax, 0x80000000
jae 0x4023a3
test ecx, ecx
ja 0x4023a3
jb 0x402813
cmp eax, 0x4000000
jae 0x4023a3
add edi, 1
cmp edi, dword [esp + 0x18]
mov dword [ebp + 4], eax
jb 0x402780
mov edi, dword [esp + 0x3c]
mov esi, dword [esp + 0x20]
mov ebp, edi
sub ebp, dword [esp + 0x18]
mov dword [esi + 0x10], ebp
jne 0x4028c5
mov dword [esi + 0x14], 0
xor edi, edi
test ebp, ebp
jbe 0x4028aa
jmp 0x402850
mov ecx, dword [esp + 0x20]
mov edx, dword [ecx + 0x14]
lea eax, [edx + edi*4]
lea esi, [esp + 0x28]
mov dword [esp + 0x18], eax
call fcn.00401d30
test eax, eax
jne 0x4028ac
mov ecx, dword [esp + 0x2c]
test ecx, ecx
ja 0x4023a3
mov eax, dword [esp + 0x28]
jb 0x402888
cmp eax, 0x80000000
jae 0x4023a3
test ecx, ecx
ja 0x4023a3
jb 0x40289d
cmp eax, 0x4000000
jae 0x4023a3
mov ecx, dword [esp + 0x18]
add edi, 1
cmp edi, ebp
mov dword [ecx], eax
jb 0x402850
xor eax, eax
mov ecx, dword [esp + 0x8c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0043ef12
add esp, 0x80
ret
lea eax, [ebp*4]
push eax
call dword [esp + 0x28]
add esp, 4
test eax, eax
mov dword [esi + 0x14], eax
je 0x402541
cmp ebp, 1
jne 0x402841
xor ebx, ebx
test edi, edi
jbe 0x4028aa
mov ebp, dword [esi + 8]
xor ecx, ecx
test ebp, ebp
jbe 0x40290e
mov edx, dword [esi + 0xc]
lea ebx, [ebx]
cmp dword [edx], ebx
je 0x402912
add ecx, 1
add edx, 8
cmp ecx, ebp
jb 0x402900
mov dword [eax], ebx
jmp 0x4028aa
test ecx, ecx
jl 0x40290e
add ebx, 1
cmp ebx, edi
jb 0x4028f1
jmp 0x4028aa