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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x6d0
push ebx
mov eax, ecx
push ebp
push esi
mov edx, dword [eax + 0xc8]
push edi
xor ecx, ecx
xor edi, edi
test edx, edx
mov dword [esp + 0x40], eax
mov dword [esp + 0x6dc], ecx
jbe 0x40308c
jmp 0x4026b5
mov eax, dword [esp + 0x40]
test ecx, ecx
jbe 0x4026c4
mov dword [esp + 0x6dc], 0
mov eax, dword [eax + 0xc0]
mov esi, dword [eax + edi*4]
mov ecx, esi
mov edx, dword [esi]
call dword [edx + 0x1c]
lea ecx, [esp + 0x4c]
mov ebx, eax
mov eax, dword [esi]
push ecx
mov ecx, esi
mov dword [esp + 0x78], ebx
call dword [eax + 0x68]
mov edx, dword [esi]
lea eax, [esp + 0x28]
push eax
mov ecx, esi
call dword [edx + 0x90]
mov edx, dword [esi]
lea eax, [esp + 0x80]
push eax
mov ecx, esi
call dword [edx + 0x94]
lea ecx, [esp + 0x9c]
lea eax, [esp + 0x82]
mov edx, 4
movsx ebp, word [eax - 2]
mov dword [esp + 0x24], ebp
add ecx, 8
fild dword [esp + 0x24]
movsx ebp, word [eax]
fstp dword [ecx - 0xc]
mov dword [esp + 0x24], ebp
add eax, 4
fild dword [esp + 0x24]
dec edx
fstp dword [ecx - 8]
jne 0x40271a
fld dword [esp + 0xa4]
fsub dword [0x4aa22c]
mov ecx, dword [esp + 0xa0]
mov edx, dword [esp + 0xa4]
mov dword [esp + 0x18c], ecx
mov eax, ecx
mov ecx, dword [esp + 0xa8]
mov dword [esp + 0x184], eax
fstp dword [esp + 0x188]
fld dword [esp + 0xac]
fsub dword [0x4aa22c]
mov dword [esp + 0x194], ecx
mov eax, ecx
mov ecx, dword [esp + 0x98]
mov dword [esp + 0x190], edx
mov edx, dword [esp + 0xac]
mov dword [esp + 0x19c], eax
mov eax, dword [esp + 0xb0]
mov dword [esp + 0x114], ecx
mov ecx, dword [esp + 0xb4]
mov dword [esp + 0x198], edx
mov edx, dword [esp + 0x9c]
mov dword [esp + 0x11c], eax
fstp dword [esp + 0x1a0]
mov dword [esp + 0x120], ecx
lea eax, [esp + 0xb8]
lea ecx, [esp + 0xc8]
mov dword [esp + 0x118], edx
mov edx, dword [esi]
push eax
push ecx
mov ecx, esi
call dword [edx + 0x70]
mov edx, dword [esp + 0x40]
lea eax, [edi + 1]
mov dword [esp + 0x94], eax
mov dword [esp + 0x24], eax
cmp eax, dword [edx + 0xc8]
jae 0x403040
jmp 0x402825
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x40]
mov edx, dword [ecx + 0xc0]
mov ebp, dword [edx + eax*4]
mov ecx, ebp
mov eax, dword [ebp]
call dword [eax + 0x1c]
test ebx, ebx
mov edi, eax
je 0x402859
mov ax, word [ebp + 0x18]
test al, 8
je 0x402859
test al, 0x20
je 0x402859
mov cx, word [ebx + 0x1c4]
test word [ebp + 0x3a], cx
jne 0x402886
test edi, edi
je 0x4029e3
mov ax, word [esi + 0x18]
test al, 8
je 0x4029e3
test al, 0x20
je 0x4029e3
mov dx, word [edi + 0x1c4]
test word [esi + 0x3a], dx
je 0x4029e3
fld dword [esp + 0x4c]
fadd dword [esp + 0xc8]
fst dword [esp + 0x44]
fadd dword [esp + 0xb8]
fstp dword [esp + 0x5c]
fld dword [esp + 0x28]
fcomp dword [0x4aa204]
fnstsw ax
test ah, 0x41
jne 0x4028bf
fld dword [esp + 0x5c]
fadd dword [esp + 0x28]
fstp dword [esp + 0x5c]
jmp 0x4028cb
fld dword [esp + 0x44]
fadd dword [esp + 0x28]
fstp dword [esp + 0x44]
fld dword [esp + 0x50]
fadd dword [esp + 0xcc]
fst dword [esp + 0x48]
fadd dword [esp + 0xbc]
fstp dword [esp + 0x60]
fld dword [esp + 0x2c]
fcomp dword [0x4aa204]
fnstsw ax
test ah, 0x41
jne 0x402904
fld dword [esp + 0x60]
fadd dword [esp + 0x2c]
fstp dword [esp + 0x60]
jmp 0x402910
fld dword [esp + 0x48]
fadd dword [esp + 0x2c]
fstp dword [esp + 0x48]
mov eax, dword [ebp]
lea ecx, [esp + 0x54]
push ecx
mov ecx, ebp
call dword [eax + 0x68]
mov edx, dword [ebp]
lea eax, [esp + 0x30]
push eax
mov ecx, ebp
call dword [edx + 0x90]
mov edx, dword [ebp]
lea eax, [esp + 0xd8]
lea ecx, [esp + 0xd0]
push eax
push ecx
mov ecx, ebp
call dword [edx + 0x70]
fld dword [esp + 0x54]
fadd dword [esp + 0xd0]
fld st(0)
fadd dword [esp + 0xd8]
fstp dword [esp + 0x6c]
fld dword [esp + 0x30]
fcomp dword [0x4aa204]
fnstsw ax
test ah, 0x41
jne 0x40297c
fld dword [esp + 0x6c]
fadd dword [esp + 0x30]
fstp dword [esp + 0x6c]
jmp 0x402980
fadd dword [esp + 0x30]
fld dword [esp + 0x58]
fadd dword [esp + 0xd4]
fst dword [esp + 0x7c]
fadd dword [esp + 0xdc]
fstp dword [esp + 0x70]
fld dword [esp + 0x34]
fcomp dword [0x4aa204]
fnstsw ax
test ah, 0x41
jne 0x4029b9
fld dword [esp + 0x70]
fadd dword [esp + 0x34]
fstp dword [esp + 0x70]
jmp 0x4029c5
fld dword [esp + 0x7c]
fadd dword [esp + 0x34]
fstp dword [esp + 0x7c]
fld dword [esp + 0x44]
fcomp st(1)
fnstsw ax
test ah, 1
jne 0x402a0a
fstp st(0)
fld dword [esp + 0x44]
fcomp dword [esp + 0x6c]
fnstsw ax
test ah, 1
jne 0x402a19
mov ecx, dword [esp + 0x6dc]
mov edx, dword [esp + 0x40]
mov eax, dword [esp + 0x24]
inc eax
mov edi, dword [edx + 0xc8]
mov dword [esp + 0x24], eax
cmp eax, edi
jb 0x402821
jmp 0x403047
fld dword [esp + 0x5c]
fcomp st(1)
fnstsw ax
test ah, 0x41
fstp st(0)
jne 0x4029e3
fld dword [esp + 0x48]
fcomp dword [esp + 0x7c]
fnstsw ax
test ah, 1
jne 0x402a39
fld dword [esp + 0x48]
fcomp dword [esp + 0x70]
fnstsw ax
test ah, 1
jne 0x402a48
jmp 0x4029e3
fld dword [esp + 0x60]
fcomp dword [esp + 0x7c]
fnstsw ax
test ah, 0x41
jne 0x4029e3
mov edx, dword [ebp]
lea eax, [esp + 0x80]
push eax
mov ecx, ebp
mov dword [esp + 0x1c], 0x3f800000
call dword [edx + 0x94]
fld dword [esp + 0x4c]
fsub dword [esp + 0x54]
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x50]
mov dword [esp + 0x64], ecx
mov dword [esp + 0x68], edx
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
fstp dword [esp + 0x64]
fld dword [esp + 0x68]
fsub dword [esp + 0x58]
mov dword [esp + 0x38], eax
mov edx, dword [esi + 0x10]
mov dword [esp + 0x3c], ecx
fstp dword [esp + 0x68]
fld dword [esp + 0x28]
fsub dword [esp + 0x30]
fstp dword [esp + 0x38]
fld dword [esp + 0x3c]
fsub dword [esp + 0x34]
fstp dword [esp + 0x3c]
test byte [edx + 6], 1
je 0x402bf0
mov eax, dword [ebp + 0x10]
test byte [eax + 6], 1
je 0x402b46
lea ecx, [esp + 0x1c0]
lea eax, [esp + 0x82]
mov edx, 4
movsx ebx, word [eax - 2]
mov dword [esp + 0x14], ebx
add ecx, 8
fild dword [esp + 0x14]
movsx ebx, word [eax]
fstp dword [ecx - 0xc]
mov dword [esp + 0x14], ebx
add eax, 4
fild dword [esp + 0x14]
dec edx
fstp dword [ecx - 8]
jne 0x402adc
lea ecx, [esp + 0x18]
lea edx, [esp + 0x1c]
push ecx
lea eax, [esp + 0x3c]
push edx
lea ecx, [esp + 0x6c]
push eax
push ecx
lea edx, [esp + 0x1cc]
push 4
push edx
lea eax, [esp + 0xb0]
push 4
push eax
call fcn.004014a0
mov ebx, dword [esp + 0x94]
add esp, 0x20
test al, al
je 0x4029e3
jmp 0x402cfa
fld dword [esp + 0x2c]
fcomp dword [0x4aa304]
fnstsw ax
test ah, 0x41
jne 0x4029e3
movsx ecx, word [esp + 0x80]
movsx edx, word [esp + 0x82]
mov dword [esp + 0x14], ecx
fild dword [esp + 0x14]
movsx eax, word [esp + 0x8c]
fstp dword [esp + 0x124]
movsx ecx, word [esp + 0x8e]
mov dword [esp + 0x14], edx
lea edx, [esp + 0x18]
fild dword [esp + 0x14]
mov dword [esp + 0x14], eax
lea eax, [esp + 0x1c]
push edx
push eax
fstp dword [esp + 0x130]
fild dword [esp + 0x1c]
mov dword [esp + 0x1c], ecx
lea ecx, [esp + 0x40]
lea edx, [esp + 0x6c]
push ecx
fstp dword [esp + 0x138]
fild dword [esp + 0x20]
lea eax, [esp + 0x130]
push edx
lea ecx, [esp + 0x194]
push eax
fstp dword [esp + 0x144]
push ecx
call fcn.00401210
add esp, 0x18
test al, al
je 0x4029e3
jmp 0x402cfa
mov edx, dword [ebp + 0x10]
test byte [edx + 6], 1
je 0x4029e3
fld dword [esp + 0x34]
fcomp dword [0x4aa304]
fnstsw ax
test ah, 0x41
jne 0x4029e3
movsx eax, word [esp + 0x84]
movsx ecx, word [esp + 0x86]
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
movsx edx, word [esp + 0x88]
fst dword [esp + 0xfc]
fstp dword [esp + 0xf4]
mov dword [esp + 0x14], ecx
lea ecx, [esp + 0x18]
fild dword [esp + 0x14]
movsx eax, word [esp + 0x8a]
fstp dword [esp + 0x100]
mov dword [esp + 0x14], edx
lea edx, [esp + 0x1c]
fild dword [esp + 0x14]
mov dword [esp + 0x14], eax
push ecx
lea eax, [esp + 0x3c]
push edx
fst dword [esp + 0x10c]
fstp dword [esp + 0x114]
fild dword [esp + 0x1c]
lea ecx, [esp + 0x6c]
push eax
lea edx, [esp + 0x100]
push ecx
fstp dword [esp + 0x118]
fld dword [esp + 0x110]
fsub dword [0x4aa22c]
lea eax, [esp + 0x124]
push edx
push eax
fstp dword [esp + 0x110]
fld dword [esp + 0x120]
fsub dword [0x4aa22c]
fstp dword [esp + 0x128]
call fcn.00401420
add esp, 0x18
test al, al
je 0x4029e3
fld dword [esp + 0x38]
fchs
fld dword [esp + 0x3c]
fchs
fstp dword [esp + 0x1b0]
mov ecx, dword [esp + 0x1b0]
fstp dword [esp + 0x38]
mov dword [esp + 0x3c], ecx
test ebx, ebx
je 0x402e76
mov dx, word [ebx + 0x1c6]
test word [ebp + 0x3a], dx
je 0x402e76
test edi, edi
je 0x402dfd
mov ax, word [edi + 0x1c6]
test word [esi + 0x3a], ax
je 0x402dfd
push edi
lea ecx, [esp + 0x34]
push ebx
lea edx, [esp + 0x5c]
push ecx
lea eax, [esp + 0x34]
push edx
lea ecx, [esp + 0x5c]
push eax
mov eax, dword [esp + 0x2c]
lea edx, [esp + 0x4c]
push ecx
push edx
lea ecx, [esp + 0x38]
push eax
push ecx
call fcn.004024f0
mov eax, dword [esp + 0x44]
mov edx, dword [esp + 0x40]
fld dword [esp + 0x3c]
add esp, 0x24
mov dword [esp + 0x174], eax
lea eax, [esp + 0x28]
lea ecx, [esp + 0x4c]
push eax
mov dword [esp + 0x174], edx
mov edx, dword [esi]
lea eax, [esp + 0x174]
xor edi, edi
push ecx
fstp dword [esp + 0x180]
push eax
mov ecx, esi
mov dword [esp + 0x188], ebp
mov dword [esp + 0x18c], edi
call dword [edx + 0x54]
fld dword [esp + 0x1c]
fchs
fld dword [esp + 0x20]
fchs
fstp dword [esp + 0x1b8]
mov ecx, dword [esp + 0x1b8]
mov edx, dword [ebp]
fstp dword [esp + 0x148]
fld dword [esp + 0x18]
mov dword [esp + 0x14c], ecx
lea eax, [esp + 0x30]
lea ecx, [esp + 0x54]
push eax
fstp dword [esp + 0x154]
mov dword [esp + 0x158], esi
mov dword [esp + 0x15c], edi
push ecx
lea eax, [esp + 0x150]
jmp 0x402f2d
push ebp
lea ecx, [esp + 0x34]
push ebx
lea edx, [esp + 0x30]
push ecx
lea eax, [esp + 0x58]
push edx
mov edx, dword [esp + 0x28]
lea ecx, [esp + 0x48]
push eax
push ecx
lea eax, [esp + 0x34]
push edx
push eax
call fcn.004023e0
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x40]
fld dword [esp + 0x38]
mov eax, dword [esi]
add esp, 0x20
mov dword [esp + 0x134], ecx
lea ecx, [esp + 0x28]
mov dword [esp + 0x138], edx
push ecx
lea edx, [esp + 0x50]
lea ecx, [esp + 0x138]
push edx
push ecx
fstp dword [esp + 0x148]
mov ecx, esi
mov dword [esp + 0x14c], ebp
mov dword [esp + 0x150], 0
call dword [eax + 0x54]
jmp 0x402f33
test edi, edi
je 0x402f33
mov dx, word [edi + 0x1c6]
test word [esi + 0x3a], dx
je 0x402f33
fld dword [esp + 0x1c]
fchs
fstp dword [esp + 0xc0]
fld dword [esp + 0x20]
push esi
lea eax, [esp + 0x2c]
push edi
lea ecx, [esp + 0x38]
push eax
lea edx, [esp + 0x60]
push ecx
mov ecx, dword [esp + 0x28]
lea eax, [esp + 0x48]
push edx
fchs
push eax
lea edx, [esp + 0xd8]
push ecx
push edx
fstp dword [esp + 0xe4]
call fcn.004023e0
fld dword [esp + 0x3c]
fchs
fld dword [esp + 0x40]
fchs
fstp dword [esp + 0x1c8]
mov eax, dword [esp + 0x1c8]
mov edx, dword [ebp]
fstp dword [esp + 0x17c]
fld dword [esp + 0x38]
add esp, 0x20
mov dword [esp + 0x160], eax
lea eax, [esp + 0x30]
lea ecx, [esp + 0x54]
fstp dword [esp + 0x164]
push eax
mov dword [esp + 0x16c], esi
mov dword [esp + 0x170], 0
push ecx
lea eax, [esp + 0x164]
push eax
mov ecx, ebp
call dword [edx + 0x54]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
fld dword [esp + 0x18]
mov dword [esp + 0xe0], ecx
mov ecx, dword [esp + 0x6dc]
fstp dword [esp + 0xe8]
cmp ecx, 0x40
mov dword [esp + 0xe4], edx
jae 0x4029ea
test ebp, ebp
je 0x402f87
xor eax, eax
test ecx, ecx
jbe 0x402fa5
lea edx, [esp + 0x1e8]
cmp dword [edx], ebp
je 0x4029ea
inc eax
add edx, 0x14
cmp eax, ecx
jb 0x402f75
jmp 0x402fa5
xor eax, eax
test ecx, ecx
jbe 0x402fa5
lea edx, [esp + 0x1ec]
cmp dword [edx], 0
je 0x4029ea
inc eax
add edx, 0x14
cmp eax, ecx
jb 0x402f94
xor edi, edi
test ecx, ecx
jbe 0x402ffb
lea edx, [esp + 0x1e4]
fld dword [edx]
fcomp dword [esp + 0xe8]
fnstsw ax
test ah, 0x41
je 0x402fcc
inc edi
add edx, 0x14
cmp edi, ecx
jb 0x402fb2
jmp 0x402ffb
cmp edi, ecx
jae 0x402ffb
lea eax, [edi + edi*4]
lea ecx, [ecx + ecx*4]
shl eax, 2
shl ecx, 2
sub ecx, eax
lea edx, [esp + eax + 0x1dc]
lea eax, [edi + edi*4 + 5]
push ecx
push edx
lea ecx, [esp + eax*4 + 0x1e4]
push ecx
call fcn.0047d8d0
add esp, 0xc
mov ecx, dword [esp + 0xe0]
lea edx, [edi + edi*4]
lea eax, [esp + edx*4 + 0x1dc]
mov edx, dword [esp + 0xe4]
mov dword [eax], ecx
mov ecx, dword [esp + 0xe8]
mov dword [eax + 4], edx
mov dword [eax + 8], ecx
mov dword [eax + 0xc], ebp
mov dword [eax + 0x10], 0
mov ecx, dword [esp + 0x6dc]
inc ecx
mov dword [esp + 0x6dc], ecx
jmp 0x4029ea
mov ecx, dword [esp + 0x6dc]
xor ebp, ebp
test ecx, ecx
jbe 0x403075
lea edi, [esp + 0x1e8]
mov ecx, dword [edi]
push esi
mov eax, dword [ecx]
call dword [eax + 0x50]
mov eax, dword [edi]
mov edx, dword [esi]
push eax
mov ecx, esi
call dword [edx + 0x50]
mov ecx, dword [esp + 0x6dc]
inc ebp
add edi, 0x14
cmp ebp, ecx
jb 0x403054
mov edx, dword [esp + 0x40]
mov edi, dword [esp + 0x94]
cmp edi, dword [edx + 0xc8]
jb 0x4026b1
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret