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

Disassembly:
sub esp, 0xa4
push ebx
xor ebx, ebx
push esi
mov esi, edx
mov dword [esp + 0x58], ebx
push edi
mov edi, ecx
mov dword [esp + 0x60], ebx
lea edx, [esp + 0x30]
mov dword [esp + 0x64], ebx
mov ecx, esi
mov dword [esp + 0x68], ebx
mov dword [esp + 0x54], ebx
mov dword [esp + 0x58], ebx
mov dword [esp + 0x50], ebx
mov dword [esp + 0x4c], ebx
call fcn.00402b03
test eax, eax
jne 0x4048a8
mov edx, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
cmp edx, 2
jne 0x4043ec
cmp ecx, ebx
jne 0x4043ec
jmp 0x4043bf
mov eax, dword [esp + 0x28]
mov ecx, esi
or eax, dword [esp + 0x2c]
je 0x4043d3
call fcn.00403772
test eax, eax
jne 0x4048a8
lea edx, [esp + 0x28]
mov ecx, esi
call fcn.00402b03
test eax, eax
je 0x4043a6
jmp 0x4048a8
lea edx, [esp + 0x30]
call fcn.00402b03
test eax, eax
jne 0x4048a8
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x30]
cmp edx, 3
jne 0x40448a
cmp ecx, ebx
jne 0x40448a
lea ecx, [esp + 0x78]
call fcn.00403e4f
push dword [esp + 0xc4]
mov eax, dword [edi + 0x30]
mov edx, esi
mov ecx, dword [edi + 0x34]
mov dword [esp + 0xac], eax
lea eax, [esp + 0x7c]
push eax
push dword [edi + 0x3c]
mov dword [esp + 0xb8], ecx
push dword [edi + 0x38]
mov ecx, dword [esp + 0xc4]
push 8
push dword [esp + 0xcc]
call fcn.00404230
mov ecx, dword [esp + 0x7c]
mov ebx, eax
mov eax, dword [esp + 0xbc]
mov edx, dword [esp + 0xc4]
mov dword [eax], ecx
lea ecx, [esp + 0x78]
call fcn.00403de2
test ebx, ebx
je 0x40446d
mov eax, ebx
jmp 0x4048a8
lea edx, [esp + 0x30]
mov ecx, esi
call fcn.00402b03
test eax, eax
jne 0x4048a8
mov ecx, dword [esp + 0x34]
xor ebx, ebx
mov edx, dword [esp + 0x30]
push ebp
mov ebp, dword [esp + 0xc4]
cmp edx, 4
jne 0x4044f1
cmp ecx, ebx
jne 0x4044f1
push ebp
lea eax, [esp + 0x54]
mov edx, esi
push eax
mov eax, dword [esp + 0xc8]
lea ebx, [edi + 0x40]
push ebx
mov ecx, edi
push dword [eax]
push dword [esp + 0xcc]
push 0x40000000
call fcn.00404e3d
test eax, eax
jne 0x4048a7
mov eax, dword [edi + 0x38]
lea edx, [esp + 0x34]
add dword [ebx], eax
mov ecx, esi
mov eax, dword [edi + 0x3c]
adc dword [ebx + 4], eax
call fcn.00402b03
test eax, eax
jne 0x4048a7
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x34]
mov eax, edx
or eax, ecx
je 0x404d5f
cmp edx, 5
jne 0x4048a4
xor eax, eax
cmp ecx, eax
jne 0x4048a4
lea edx, [esp + 0x18]
mov dword [esp + 0x18], eax
mov ecx, esi
mov dword [esp + 0x1c], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x48], eax
call fcn.00404ddf
test eax, eax
jne 0x4048a7
mov eax, dword [esp + 0x18]
mov dword [edi + 0x48], eax
jmp 0x404881
mov ebx, dword [esp + 0x34]
mov eax, ebx
or eax, dword [esp + 0x38]
je 0x404896
lea edx, [esp + 0x2c]
mov ecx, esi
call fcn.00402b03
test eax, eax
jne 0x4048a7
mov eax, dword [esi + 4]
xor edx, edx
cmp dword [esp + 0x30], edx
ja 0x4048a4
mov ecx, dword [esp + 0x2c]
jb 0x40457d
cmp ecx, eax
ja 0x4048a4
cmp dword [esp + 0x38], edx
ja 0x40487a
cmp ebx, 0x100
jae 0x40487a
sub ebx, 0xe
je 0x404803
sub ebx, 1
je 0x4047e9
push 2
pop edx
sub ebx, edx
je 0x40467d
sub ebx, 1
je 0x404678
sub ebx, edx
je 0x404655
sub ebx, 1
jne 0x40487a
lea ebx, [edi + 0x5c]
mov edx, ebp
mov ecx, ebx
call fcn.00403e78
mov edx, dword [esp + 0x18]
mov ecx, esi
push ebp
push ebx
call fcn.00402a5f
test eax, eax
jne 0x4048a7
mov eax, dword [esi + 4]
test eax, eax
je 0x4048a4
dec eax
mov dword [esi + 4], eax
mov eax, dword [esi]
mov cl, byte [eax]
inc eax
test cl, cl
mov dword [esi], eax
mov ecx, esi
je 0x404645
lea edx, [esp + 0x4c]
call fcn.00404ddf
test eax, eax
jne 0x4048a7
mov eax, dword [esp + 0xc0]
mov ecx, dword [esp + 0x4c]
cmp ecx, dword [eax]
jae 0x4048a4
mov edx, dword [esp + 0xbc]
mov eax, dword [edx + ecx*8]
mov dword [esp + 0x70], eax
mov eax, dword [edx + ecx*8 + 4]
lea ecx, [esp + 0x70]
mov dword [esp + 0x74], eax
mov edx, dword [esp + 0x18]
push ebp
push ebx
call fcn.0040309a
jmp 0x4047f9
lea ecx, [edi + 0x64]
mov eax, dword [esp + 0xc0]
mov edx, dword [esp + 0x18]
push ebp
push dword [eax]
push dword [esp + 0xc4]
push esi
call fcn.00402f80
jmp 0x4047f9
lea ecx, [edi + 0x6c]
jmp 0x404658
test eax, eax
je 0x4048a4
dec eax
mov dword [esi + 4], eax
mov eax, dword [esi]
mov dl, byte [eax]
inc eax
mov byte [esp + 0x12], dl
mov dword [esp + 0x28], eax
mov dword [esi], eax
test dl, dl
jne 0x4046a1
lea ebx, [ecx - 1]
jmp 0x4046d9
lea edx, [esp + 0x44]
mov ecx, esi
call fcn.00404ddf
test eax, eax
jne 0x4048a7
mov eax, dword [esp + 0xc0]
mov ebx, dword [esp + 0x44]
cmp ebx, dword [eax]
jae 0x4048a4
mov ecx, dword [esp + 0xbc]
mov eax, dword [ecx + ebx*8]
mov ebx, dword [ecx + ebx*8 + 4]
mov dword [esp + 0x28], eax
test bl, 1
jne 0x4048a4
mov eax, dword [esp + 0x18]
mov ecx, ebp
lea edx, [eax*4 + 4]
call dword [ebp]
mov dword [edi + 0x7c], eax
test eax, eax
je 0x4049ab
test ebx, ebx
jne 0x40470b
xor eax, eax
mov dword [edi + 0x80], eax
jmp 0x40472e
mov edx, ebx
mov ecx, ebp
call dword [ebp]
mov dword [edi + 0x80], eax
test eax, eax
je 0x4049ab
push ebx
push dword [esp + 0x2c]
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov eax, dword [esp + 0x18]
mov edx, dword [edi + 0x7c]
mov dword [esp + 0x24], eax
mov eax, dword [edi + 0x80]
mov dword [esp + 0x20], eax
xor eax, eax
mov dword [edx], eax
mov ecx, eax
add edx, 4
cmp dword [esp + 0x24], eax
jne 0x40475d
mov eax, ebx
neg eax
sbb eax, eax
and eax, 0x10
jmp 0x4047cd
push 2
pop eax
cmp ebx, eax
jb 0x4048a4
mov ebp, dword [esp + 0x20]
cmp byte [ebx + ebp - 2], cl
jne 0x4048a4
cmp byte [ebx + ebp - 1], cl
jne 0x4048a4
cmp ecx, ebx
je 0x4048a4
add ecx, dword [esp + 0x20]
xor ebp, ebp
cmp word [ecx], bp
mov ebp, dword [esp + 0xc4]
je 0x4047aa
xor ebp, ebp
add ecx, eax
cmp word [ecx], bp
jne 0x40479c
mov ebp, dword [esp + 0xc4]
sub ecx, dword [esp + 0x20]
add ecx, eax
mov eax, ecx
shr eax, 1
mov dword [edx], eax
add edx, 4
sub dword [esp + 0x24], 1
push 2
pop eax
jne 0x404780
xor edx, edx
cmp ecx, ebx
push 0x10
pop eax
cmove eax, edx
test eax, eax
jne 0x4048a7
cmp byte [esp + 0x12], al
jne 0x404881
sub dword [esi + 4], ebx
add dword [esi], ebx
jmp 0x404881
mov edx, dword [esp + 0x1c]
lea eax, [esp + 0x48]
push eax
mov ecx, esi
call fcn.004036ef
test eax, eax
jne 0x4048a7
jmp 0x404881
mov edx, dword [esp + 0x18]
lea ecx, [edx + 7]
shr ecx, 3
cmp ecx, eax
ja 0x4048a4
mov ebx, dword [esi]
sub eax, ecx
mov dword [esi + 4], eax
mov dword [esp + 0x3c], ebx
lea eax, [ecx + ebx]
xor ecx, ecx
and dword [esp + 0x1c], ecx
mov ebx, edx
mov dword [esi], eax
mov eax, dword [esp + 0x3c]
mov edx, eax
test ebx, ebx
je 0x404872
mov dword [esp + 0x3c], eax
mov ebp, ecx
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], ecx
test ecx, ecx
jne 0x40484f
movzx ebp, byte [edx]
push 8
pop ecx
dec ecx
mov eax, ebp
shr eax, cl
and eax, 1
add dword [esp + 0x1c], eax
inc edx
cmp dword [esp + 0x28], 0
cmovne edx, dword [esp + 0x24]
sub ebx, 1
jne 0x40483d
mov ebp, dword [esp + 0xc4]
xor eax, eax
mov dword [esp + 0x48], eax
jmp 0x404881
sub eax, ecx
add dword [esi], ecx
mov dword [esi + 4], eax
lea edx, [esp + 0x34]
mov ecx, esi
call fcn.00402b03
test eax, eax
je 0x40453d
jmp 0x4048a7
mov eax, dword [esp + 0x18]
sub eax, dword [esp + 0x1c]
cmp eax, dword [esp + 0x50]
je 0x4048c9
push 0x10
pop eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0xa4
ret 0x14
mov eax, dword [esp + 0x2c]
or eax, dword [esp + 0x30]
je 0x4048da
mov ecx, esi
call fcn.00403772
test eax, eax
jne 0x4048a7
lea edx, [esp + 0x2c]
mov ecx, esi
call fcn.00402b03
test eax, eax
je 0x4048b4
jmp 0x4048a7
xor eax, eax
mov byte [esp + 0x11], 0x80
mov dword [esp + 0x24], eax
mov ebx, eax
mov dword [esp + 0x20], eax
xorps xmm0, xmm0
mov dword [esp + 0x1c], eax
mov ecx, ebp
mov dword [esp + 0x44], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x28], eax
mov byte [esp + 0x12], al
mov byte [esp + 0x13], al
mov eax, dword [edi + 4]
movlpd qword [esp + 0x2c], xmm0
lea edx, [eax*4 + 4]
call dword [ebp]
mov dword [edi + 0x74], eax
test eax, eax
je 0x4049ab
mov edx, dword [edi + 0x48]
test edx, edx
jne 0x404934
xor eax, eax
mov dword [edi + 0x78], eax
jmp 0x404943
shl edx, 2
mov ecx, ebp
call dword [ebp]
mov dword [edi + 0x78], eax
test eax, eax
je 0x4049ab
mov eax, dword [edi + 0x48]
mov ecx, ebp
lea edx, [eax*8 + 8]
call dword [ebp]
mov dword [edi + 0x4c], eax
test eax, eax
je 0x4049ab
mov edx, dword [edi + 0x48]
add edx, 7
shr edx, 3
test edx, edx
jne 0x40496b
mov dword [edi + 0x50], edx
jmp 0x404979
mov ecx, ebp
call dword [ebp]
mov dword [edi + 0x50], eax
test eax, eax
je 0x4049ab
xor edx, edx
mov esi, dword [edi + 0x48]
test esi, esi
jne 0x404988
mov dword [edi + 0x54], edx
mov dword [edi + 0x58], edx
jmp 0x4049b4
lea edx, [esi + 7]
mov ecx, ebp
shr edx, 3
call dword [ebp]
mov dword [edi + 0x54], eax
test eax, eax
je 0x4049ab
mov edx, esi
mov ecx, ebp
shl edx, 2
call dword [ebp]
mov dword [edi + 0x58], eax
test eax, eax
jne 0x4049b2
push 2
jmp 0x4048a6
xor edx, edx
mov eax, dword [esp + 0x6c]
test eax, eax
je 0x4049ea
mov ecx, dword [esp + 0x68]
dec eax
mov dword [esp + 0x6c], eax
mov al, byte [ecx]
inc ecx
mov dword [esp + 0x68], ecx
test al, al
je 0x4049d6
mov dword [esp + 0x40], ecx
jmp 0x4049ea
mov eax, dword [esp + 0x54]
add eax, 7
mov dword [esp + 0x44], ecx
shr eax, 3
add eax, ecx
mov dword [esp + 0x40], eax
mov esi, edx
mov edx, dword [esp + 0x30]
mov ebp, dword [esp + 0x2c]
cmp dword [esp + 0x18], ebx
jbe 0x404d00
mov cl, byte [esp + 0x11]
mov dword [esp + 0x14], edx
test cl, cl
jne 0x404a37
mov eax, dword [edi + 0x50]
lea ecx, [esi - 1]
mov dl, byte [esp + 0x12]
shr ecx, 3
mov byte [esp + 0x11], 0x80
mov byte [ecx + eax], dl
mov eax, dword [edi + 0x54]
mov dl, byte [esp + 0x13]
mov byte [ecx + eax], dl
xor eax, eax
mov edx, dword [esp + 0x14]
mov byte [esp + 0x12], al
mov byte [esp + 0x13], al
mov eax, dword [edi + 0x4c]
xor ecx, ecx
mov dword [eax + esi*8], ebp
mov dword [eax + esi*8 + 4], edx
mov eax, dword [edi + 0x58]
mov dword [eax + esi*4], ecx
cmp dword [esp + 0x3c], ecx
je 0x404ac3
mov ecx, esi
mov edx, 0x80
and ecx, 7
mov eax, esi
sar edx, cl
mov ecx, dword [esp + 0x3c]
shr eax, 3
test byte [eax + ecx], dl
je 0x404ac3
cmp dword [esp + 0x48], 0
je 0x404aa0
mov ecx, dword [esp + 0x24]
mov edx, 0x80
mov eax, dword [esp + 0x24]
and ecx, 7
sar edx, cl
mov ecx, dword [esp + 0x48]
shr eax, 3
test byte [eax + ecx], dl
jne 0x404a9a
mov al, byte [esp + 0x12]
or al, byte [esp + 0x11]
mov byte [esp + 0x12], al
inc dword [esp + 0x24]
jmp 0x404aac
mov al, byte [esp + 0x12]
or al, byte [esp + 0x11]
mov byte [esp + 0x12], al
cmp dword [esp + 0x20], 0
jne 0x404b3f
mov eax, dword [edi + 0x78]
or dword [eax + esi*4], 0xffffffff
jmp 0x404cc9
cmp dword [esp + 0x20], 0
jne 0x404b3f
cmp ebx, dword [edi + 4]
jae 0x4048a4
mov eax, dword [edi + 0x74]
mov dword [eax + ebx*4], esi
xor eax, eax
inc eax
cmp dword [esp + 0x58], 0
mov dword [esp + 0x1c], eax
je 0x404b00
lea edx, [esp + 0x1c]
lea ecx, [esp + 0x58]
call fcn.00404ddf
test eax, eax
jne 0x4048a7
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x20], eax
test eax, eax
jne 0x404b3f
mov eax, dword [edi + 0x20]
mov edx, dword [esp + 0x14]
movzx ecx, byte [eax + ebx]
mov eax, dword [edi + 0x1c]
add ecx, dword [eax + ebx*4]
mov eax, dword [edi + 0x24]
add ebp, dword [eax + ecx*8]
adc edx, dword [eax + ecx*8 + 4]
mov dword [esp + 0x14], edx
cmp edx, dword [eax + ecx*8 + 4]
jb 0x4048a4
ja 0x404b3c
cmp ebp, dword [eax + ecx*8]
jb 0x4048a4
inc ebx
jmp 0x404aca
cmp dword [esp + 0x3c], 0
mov eax, dword [edi + 0x78]
mov dword [eax + esi*4], ebx
je 0x404b6a
mov ecx, esi
mov edx, 0x80
and ecx, 7
mov eax, esi
sar edx, cl
mov ecx, dword [esp + 0x3c]
shr eax, 3
test byte [eax + ecx], dl
jne 0x404cc9
sub dword [esp + 0x20], 1
jne 0x404c38
mov eax, dword [edi + 0x20]
movzx ecx, byte [eax + ebx]
mov eax, dword [edi + 0x1c]
add ecx, dword [eax + ebx*4]
mov eax, dword [edi + 0x24]
mov edx, dword [eax + ecx*8]
mov eax, dword [eax + ecx*8 + 4]
mov ecx, dword [edi + 0x4c]
mov dword [esp + 0x78], eax
mov eax, dword [edi + 0x74]
mov dword [esp + 0x4c], edx
mov eax, dword [eax + ebx*4]
mov edx, dword [ecx + eax*8]
sub ebp, dword [ecx + eax*8]
mov dword [esp + 0x70], edx
mov edx, dword [ecx + eax*8 + 4]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x78]
sbb eax, edx
mov dword [esp + 0x34], edx
mov edx, dword [esp + 0x4c]
cmp ecx, eax
jb 0x4048a4
ja 0x404bcf
cmp edx, ebp
jb 0x4048a4
mov ebp, dword [esp + 0x70]
add ebp, edx
mov edx, dword [esp + 0x34]
adc edx, ecx
mov dword [esp + 0x14], edx
cmp edx, ecx
jb 0x4048a4
ja 0x404bf3
cmp ebp, dword [esp + 0x4c]
jb 0x4048a4
cmp dword [esp + 0x1c], 1
jne 0x404c35
cmp dword [edi + 0xc], 0
je 0x404c35
mov ecx, ebx
mov edx, 0x80
and ecx, 7
mov eax, ebx
sar edx, cl
mov ecx, dword [edi + 0xc]
shr eax, 3
test byte [eax + ecx], dl
mov edx, dword [esp + 0x14]
je 0x404c35
mov eax, dword [edi + 0x10]
mov ecx, dword [edi + 0x58]
mov eax, dword [eax + ebx*4]
mov dword [ecx + esi*4], eax
mov al, byte [esp + 0x13]
or al, byte [esp + 0x11]
mov byte [esp + 0x13], al
inc ebx
jmp 0x404c73
lea edx, [esp + 0x2c]
lea ecx, [esp + 0x60]
call fcn.00402b03
test eax, eax
jne 0x4048a7
add ebp, dword [esp + 0x2c]
mov edx, dword [esp + 0x14]
adc edx, dword [esp + 0x30]
mov dword [esp + 0x14], edx
cmp edx, dword [esp + 0x30]
jb 0x4048a4
ja 0x404c73
cmp ebp, dword [esp + 0x2c]
jb 0x4048a4
mov cl, byte [esp + 0x11]
test byte [esp + 0x13], cl
jne 0x404cd1
mov eax, dword [esp + 0x40]
test eax, eax
je 0x404cd1
cmp dword [esp + 0x44], 0
je 0x404cac
mov eax, dword [esp + 0x28]
mov edx, 0x80
mov ecx, eax
shr eax, 3
and ecx, 7
sar edx, cl
mov ecx, dword [esp + 0x44]
test byte [eax + ecx], dl
je 0x404cc5
mov eax, dword [esp + 0x40]
mov ecx, dword [edi + 0x58]
mov eax, dword [eax]
add dword [esp + 0x40], 4
mov dword [ecx + esi*4], eax
mov al, byte [esp + 0x13]
or al, byte [esp + 0x11]
mov byte [esp + 0x13], al
inc dword [esp + 0x28]
mov edx, dword [esp + 0x14]
mov cl, byte [esp + 0x11]
inc esi
shr cl, 1
mov byte [esp + 0x11], cl
cmp esi, dword [esp + 0x18]
jb 0x404a06
mov eax, dword [edi + 0x50]
lea ecx, [esi - 1]
mov dl, byte [esp + 0x12]
shr ecx, 3
mov byte [ecx + eax], dl
mov eax, dword [edi + 0x54]
mov dl, byte [esp + 0x13]
mov byte [ecx + eax], dl
mov edx, dword [esp + 0x14]
cmp dword [esp + 0x20], 0
mov eax, dword [edi + 0x4c]
mov dword [eax + esi*8], ebp
mov dword [eax + esi*8 + 4], edx
jne 0x4048a4
jmp 0x404d42
cmp dword [esp + 0x58], 0
je 0x4048a4
lea edx, [esp + 0x1c]
lea ecx, [esp + 0x58]
call fcn.00404ddf
test eax, eax
jne 0x4048a7
cmp dword [esp + 0x1c], eax
jne 0x4048a4
inc ebx
mov eax, dword [edi + 0x74]
mov dword [eax + ebx*4], esi
cmp ebx, dword [edi + 4]
jb 0x404d17
cmp dword [esp + 0x58], 0
je 0x404d5f
cmp dword [esp + 0x5c], 0
jne 0x4048a4
xor eax, eax
jmp 0x4048a7