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

Disassembly:
sub esp, 0x500
mov eax, dword [esp + 0x504]
push ebp
push esi
push edi
mov edi, dword [sym.imp.MSVCRT.dll__msize]
mov esi, ecx
push eax
call edi
mov ecx, dword [esp + 0x518]
mov dword [esp + 0x3c], eax
push ecx
call edi
mov edx, dword [esp + 0x520]
mov dword [esp + 0x48], eax
push edx
call edi
mov dword [esp + 0x40], eax
mov eax, dword [esi + 0xc]
imul eax, dword [esi + 8]
add esp, 0xc
xor ebp, ebp
lea ecx, [eax + eax*2]
mov eax, 0x2aaaaaab
imul ecx
sar edx, 5
mov eax, edx
mov dword [esp + 0x30], ebp
shr eax, 0x1f
add edx, eax
mov dword [esp + 0x48], ebp
mov dword [esp + 0x5c], ebp
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x18], ebp
je 0x402de5
push ebx
mov dword [esp + 0x40], edx
mov eax, dword [esp + 0x3c]
mov dl, 1
mov bl, dl
cmp ebp, eax
mov byte [esp + 0x13], bl
mov byte [esp + 0x12], dl
jae 0x402cc9
jmp 0x4029fc
mov edi, dword [esp + 0x514]
xor eax, eax
lea ecx, [esp + 0x110]
add edi, ebp
xor ebx, ebx
add ecx, 4
mov bl, byte [edi + eax]
sub ebx, 0x80
inc eax
mov dword [esp + 0x14], ebx
cmp eax, 0x40
fild dword [esp + 0x14]
fstp dword [ecx - 4]
jb 0x402a0e
test dl, dl
jbe 0x402cc5
lea ecx, [esp + 0x110]
dec dl
add ebp, 0x40
push ecx
mov ecx, esi
mov byte [esp + 0x1f], dl
mov dword [esp + 0x2c], ebp
mov byte [esp + 0x28], 0
call fcn.00403310
mov ebx, 0x409548
lea ebp, [esp + 0x110]
lea edi, [esi + 0x109c]
mov dword [esp + 0x14], 0x40
fld dword [edi]
fmul dword [ebp]
fadd qword [0x4097a8]
fsub qword [0x4097a0]
call sub.MSVCRT.dll__ftol
xor edx, edx
add edi, 4
mov dl, byte [ebx]
add ebp, 4
inc ebx
mov word [esp + edx*2 + 0x90], ax
mov eax, dword [esp + 0x14]
dec eax
mov dword [esp + 0x14], eax
jne 0x402a70
mov eax, dword [esp + 0x90]
mov ecx, dword [esp + 0x34]
mov edi, eax
mov dword [esp + 0x34], eax
sub edi, ecx
test di, di
jne 0x402ae0
mov eax, dword [esi + 0x129c]
mov cx, word [esi + 0x12a0]
mov dword [esp + 0x7c], eax
mov word [esp + 0x80], cx
mov edx, dword [esp + 0x7e]
push edx
push eax
jmp 0x402b67
mov ecx, dword [esi + 0x1018]
xor edx, edx
movsx eax, di
mov dl, byte [ecx + eax]
mov eax, edx
lea ecx, [eax + eax*2]
lea eax, [esi + 0x129c]
lea edx, [eax + ecx*2]
mov eax, dword [eax + ecx*2]
mov dword [esp + 0x74], eax
mov cx, word [edx + 4]
mov word [esp + 0x78], cx
mov edx, dword [esp + 0x76]
push edx
push eax
mov ecx, esi
call fcn.00403580
push edi
mov ecx, esi
call fcn.004038b0
mov byte [esp + 0x2e], al
mov ebx, dword [esp + 0x2e]
test di, di
jl 0x402b35
mov word [esp + 0x2c], di
jmp 0x402b61
fld qword [0x409798]
mov eax, ebx
and eax, 0xff
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
call sub.MSVCRT.dll__CIpow
fsub qword [0x409788]
call sub.MSVCRT.dll__ftol
add eax, edi
mov word [esp + 0x2c], ax
mov ecx, dword [esp + 0x2c]
push ebx
push ecx
mov ecx, esi
jmp section..htext
mov bl, byte [esp + 0x13]
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x44]
cmp ecx, eax
jae 0x402d4a
mov edx, dword [esp + 0x518]
mov edi, dword [esp + 0x20]
xor eax, eax
lea ecx, [esp + 0x210]
add edi, edx
xor edx, edx
add ecx, 4
mov dl, byte [edi + eax]
sub edx, 0x80
inc eax
mov dword [esp + 0x14], edx
cmp eax, 0x40
fild dword [esp + 0x14]
fstp dword [ecx - 4]
jb 0x402ceb
test bl, bl
jbe 0x402d4a
mov edi, dword [esp + 0x20]
lea eax, [esp + 0x4c]
lea ecx, [esi + 0x192c]
push eax
lea edx, [esi + 0x12e4]
push ecx
lea eax, [esi + 0x119c]
push edx
lea ecx, [esp + 0x21c]
push eax
add edi, 0x40
push ecx
mov ecx, esi
dec bl
mov dword [esp + 0x34], edi
call fcn.00402e00
cmp edi, dword [esp + 0x44]
jb 0x402cd5
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x1c]
cmp eax, edx
jae 0x402dd5
mov edx, dword [esp + 0x51c]
mov edi, dword [esp + 0x1c]
xor eax, eax
lea ecx, [esp + 0x410]
add edi, edx
xor edx, edx
add ecx, 4
mov dl, byte [edi + eax]
sub edx, 0x80
inc eax
mov dword [esp + 0x14], edx
cmp eax, 0x40
fild dword [esp + 0x14]
fstp dword [ecx - 4]
jb 0x402d6c
mov al, byte [esp + 0x12]
test al, al
jbe 0x402dd5
mov cl, al
mov edi, dword [esp + 0x1c]
dec cl
lea eax, [esp + 0x60]
mov byte [esp + 0x12], cl
lea ecx, [esi + 0x192c]
push eax
lea edx, [esi + 0x12e4]
push ecx
lea eax, [esi + 0x119c]
push edx
lea ecx, [esp + 0x41c]
push eax
add edi, 0x40
push ecx
mov ecx, esi
mov dword [esp + 0x30], edi
call fcn.00402e00
cmp edi, dword [esp + 0x38]
jb 0x402d56
mov eax, dword [esp + 0x40]
dec eax
mov dword [esp + 0x40], eax
jne 0x4029da
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x500
ret 0xc