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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c4
push ebx
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 0x58]
mov dword [ebp - 0x34], esi
cmp eax, 2
jl 0x403dfb
cmp dword [esi + 4], 0
jne 0x4039cf
mov eax, 0xffffff76
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 0xc]
test edx, edx
jl 0x403dfb
mov edi, dword [ebp + 8]
jg 0x4039e7
test edi, edi
jb 0x403dfb
cmp edx, dword [esi + 0x14]
jg 0x403dfb
jl 0x4039fb
cmp edi, dword [esi + 0x10]
ja 0x403dfb
cmp eax, 3
jl 0x403a28
mov ecx, dword [esi + 0x60]
mov eax, dword [esi + 0x38]
cmp edx, dword [eax + ecx*8 + 4]
jl 0x403a21
jg 0x403a13
cmp edi, dword [eax + ecx*8]
jb 0x403a21
cmp edx, dword [eax + ecx*8 + 0xc]
jl 0x403a28
jg 0x403a21
cmp edi, dword [eax + ecx*8 + 8]
jb 0x403a28
mov ecx, esi
call fcn.004031a0
mov edx, dword [esi + 0x5c]
lea ebx, [esi + 0x78]
mov dword [esi + 0x50], 0xffffffff
mov dword [esi + 0x54], 0xffffffff
test ebx, ebx
je 0x403a52
cmp dword [ebx], 0
je 0x403a52
mov ecx, ebx
call fcn.00406a40
mov dword [ebx + 0x150], edx
lea ecx, [esi + 0x1e0]
call fcn.0040b670
push dword [ebp + 0xc]
mov ecx, esi
push edi
call fcn.00401ef0
add esp, 8
lea ecx, [ebp - 0x1c0]
test eax, eax
je 0x403a9b
mov dword [esi + 0x50], 0xffffffff
mov dword [esi + 0x54], 0xffffffff
call fcn.00406400
mov ecx, esi
call fcn.004031a0
mov eax, 0xffffff77
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [esi + 0x5c]
xor eax, eax
xor edi, edi
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x20], eax
mov dword [ebp - 4], eax
mov dword [ebp - 0x14], eax
call fcn.00406340
lea ecx, [ebp - 0x1c0]
call fcn.00406a40
jmp 0x403ac3
mov edi, dword [ebp - 0xc]
cmp dword [esi + 0x58], 3
jl 0x403b68
cmp dword [ebp - 0x1c0], 0
je 0x403b68
push 1
lea edx, [ebp - 0x58]
lea ecx, [ebp - 0x1c0]
call fcn.00406af0
add esp, 4
test eax, eax
jle 0x403b68
mov ecx, dword [esi + 0x60]
shl ecx, 5
add ecx, dword [esi + 0x48]
cmp dword [ecx + 0x1c], 0
je 0x403b5f
lea edx, [ebp - 0x58]
call fcn.0040c050
mov edi, eax
test edi, edi
jns 0x403b1b
xor edx, edx
mov ecx, ebx
call fcn.00406c10
xor edi, edi
jmp 0x403b41
cmp dword [ebp - 4], 0
je 0x403b32
cmp dword [ebp - 0x14], 0
jne 0x403b32
xor edx, edx
mov ecx, ebx
call fcn.00406c10
jmp 0x403b41
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x403b41
add eax, edi
sar eax, 2
add dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x48]
mov ebx, dword [ebp - 0x44]
mov eax, ecx
and eax, ebx
cmp eax, 0xffffffff
jne 0x403c91
mov dword [ebp - 0xc], edi
lea ebx, [esi + 0x78]
jmp 0x403ac3
xor edx, edx
mov ecx, ebx
call fcn.00406c10
test edi, edi
jne 0x403d8c
push 0xffffffffffffffff
push 0xffffffffffffffff
lea edx, [ebp - 0x30]
mov ecx, esi
call fcn.00401f70
mov ecx, edx
add esp, 8
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x1c], ecx
test ecx, ecx
jl 0x403d7a
jg 0x403b9b
test eax, eax
jb 0x403d7a
cmp dword [esi + 0x58], 3
jl 0x403bd3
lea ecx, [ebp - 0x30]
call fcn.00406310
cmp dword [esi + 0x5c], eax
je 0x403bc9
mov eax, dword [ebp - 0x30]
test byte [eax + 5], 2
je 0x403bc9
mov ecx, esi
call fcn.004031a0
lea ecx, [ebp - 0x1c0]
call fcn.00406400
cmp dword [esi + 0x58], 3
jge 0x403c67
lea ecx, [ebp - 0x30]
call fcn.00406310
mov edi, eax
mov eax, dword [esi + 0x34]
xor edx, edx
test eax, eax
jle 0x403bfc
mov ecx, dword [esi + 0x40]
lea esp, [esp]
cmp dword [ecx], edi
je 0x403bfc
inc edx
add ecx, 4
cmp edx, eax
jl 0x403bf0
cmp edx, eax
je 0x403ac0
mov dword [esi + 0x60], edx
mov dword [esi + 0x5c], edi
test ebx, ebx
je 0x403c20
cmp dword [ebx], 0
je 0x403c20
mov ecx, ebx
call fcn.00406a40
mov dword [ebx + 0x150], edi
cmp dword [ebp - 0x1c0], 0
je 0x403c37
lea ecx, [ebp - 0x1c0]
call fcn.00406a40
mov dword [ebp - 0x70], edi
mov eax, dword [esi + 0x3c]
mov ecx, dword [ebp - 0x1c]
mov dword [esi + 0x58], 3
cmp ecx, dword [eax + edx*8 + 4]
jg 0x403c5d
jl 0x403c54
mov ecx, dword [ebp - 0x18]
cmp ecx, dword [eax + edx*8]
ja 0x403c5d
mov dword [ebp - 0x14], 1
jmp 0x403c64
mov dword [ebp - 0x14], 0
mov edi, dword [ebp - 0xc]
lea edx, [ebp - 0x30]
mov ecx, ebx
call fcn.00406740
lea edx, [ebp - 0x30]
lea ecx, [ebp - 0x1c0]
call fcn.00406740
mov eax, dword [ebp - 0x30]
movzx eax, byte [eax + 5]
and eax, 4
mov dword [ebp - 4], eax
jmp 0x403ac3
mov edi, dword [esi + 0x60]
mov edx, dword [esi + 0x44]
mov eax, edi
shl eax, 4
sub ecx, dword [eax + edx]
sbb ebx, dword [eax + edx + 4]
mov dword [ebp - 0x14], ebx
test ebx, ebx
jg 0x403cc1
jl 0x403cb0
test ecx, ecx
jae 0x403cc1
xorps xmm0, xmm0
movlpd qword [ebp - 0x28], xmm0
mov ebx, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x14], ebx
xorps xmm0, xmm0
xor edx, edx
movlpd qword [ebp - 0x10], xmm0
movlpd qword [ebp - 0x28], xmm0
cmp edi, 2
jl 0x403d1c
mov eax, dword [esi + 0x44]
mov esi, dword [ebp - 0xc]
mov ebx, dword [ebp - 0x10]
lea edx, [edi - 2]
mov edi, dword [ebp - 0x24]
shr edx, 1
inc edx
mov dword [ebp - 4], edx
add eax, 0x18
add edx, edx
mov dword [ebp - 0x18], edx
mov edx, dword [ebp - 0x28]
add ebx, dword [eax - 0x10]
adc esi, dword [eax - 0xc]
add edx, dword [eax]
adc edi, dword [eax + 4]
dec dword [ebp - 4]
lea eax, [eax + 0x20]
jne 0x403cf5
mov dword [ebp - 4], ebx
mov ebx, dword [ebp - 0x14]
mov dword [ebp - 0x1c], esi
mov esi, dword [ebp - 0x34]
mov dword [ebp - 0xc], edx
mov edx, dword [ebp - 0x18]
jmp 0x403d31
mov eax, dword [ebp - 0xc]
mov edi, dword [ebp - 0x24]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0xc], eax
cmp edx, dword [esi + 0x60]
jge 0x403d44
mov eax, dword [esi + 0x44]
shl edx, 4
add ecx, dword [edx + eax + 8]
adc ebx, dword [edx + eax + 0xc]
mov eax, dword [ebp - 0x20]
cdq
sub dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
sbb edi, edx
add eax, dword [ebp - 4]
adc edi, dword [ebp - 0x1c]
add eax, ecx
adc edi, ebx
mov dword [esi + 0x50], eax
mov dword [esi + 0x54], edi
test edi, edi
jg 0x403d9a
jl 0x403d6a
test eax, eax
jae 0x403d9a
mov dword [esi + 0x50], 0
mov dword [esi + 0x54], 0
jmp 0x403d9a
or edx, 0xffffffff
mov ecx, esi
call fcn.00403900
mov dword [esi + 0x50], eax
mov dword [esi + 0x54], edx
jmp 0x403d9a
mov dword [esi + 0x50], 0xffffffff
mov dword [esi + 0x54], 0xffffffff
mov eax, dword [ebp - 0x1c0]
test eax, eax
je 0x403dae
push eax
call dword [0x5eaeb4]
add esp, 4
mov eax, dword [ebp - 0x1b0]
test eax, eax
je 0x403dc2
push eax
call dword [0x5eaeb4]
add esp, 4
mov eax, dword [ebp - 0x1ac]
test eax, eax
je 0x403dd6
push eax
call dword [0x5eaeb4]
add esp, 4
mov dword [esi + 0x68], 0
mov dword [esi + 0x6c], 0
mov dword [esi + 0x70], 0
mov dword [esi + 0x74], 0
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 0xffffff7d
pop ebx
mov esp, ebp
pop ebp
ret