Function at 0x402950
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 0x402dd5
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 0x402cb9
jmp 0x4029ec
mov dl, byte [esp + 0x1b]
mov ebp, dword [esp + 0x28]
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 0x4029fe
test dl, dl
jbe 0x402cb5
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.00403300
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 0x402a60
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 0x402ad0
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 0x402b57
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.00403570
push edi
mov ecx, esi
call fcn.004038a0
mov byte [esp + 0x2e], al
mov ebx, dword [esp + 0x2e]
test di, di
jl 0x402b25
mov word [esp + 0x2c], di
jmp 0x402b51
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
call fcn.00403570
mov bl, 0x3f
mov byte [esp + 0x48], bl
mov edx, dword [esp + 0x48]
and edx, 0xff
cmp word [esp + edx*2 + 0x90], 0
jne 0x402b81
dec bl
mov byte [esp + 0x48], bl
jne 0x402b64
test bl, bl
jne 0x402ba4
mov eax, dword [esi + 0x132c]
mov cx, word [esi + 0x1330]
mov dword [esp + 0x64], eax
mov word [esp + 0x68], cx
mov edx, dword [esp + 0x66]
jmp 0x402c94
lea eax, [esp + 0x24]
lea ecx, [esp + 0x310]
push eax
lea edx, [esp + 0x94]
push ecx
push edx
mov ecx, esi
call fcn.00403630
mov al, byte [esp + 0x24]
xor ebp, ebp
test al, al
jbe 0x402c75
lea edi, [esp + 0x311]
mov cl, byte [edi]
test cl, cl
jne 0x402bf8
lea eax, [esi + 0x18cc]
mov ecx, eax
mov eax, dword [ecx]
mov dword [esp + 0x6c], eax
mov dx, word [ecx + 4]
mov word [esp + 0x70], dx
mov ecx, dword [esp + 0x6e]
jmp 0x402c56
xor eax, eax
and ecx, 0xff
mov al, byte [edi - 1]
shl eax, 4
add eax, ecx
lea edx, [eax + eax*2]
lea eax, [esi + 0x132c]
lea eax, [eax + edx*2]
mov ecx, eax
mov eax, dword [ecx]
mov dword [esp + 0x50], eax
mov dx, word [ecx + 4]
mov word [esp + 0x54], dx
mov ecx, dword [esp + 0x52]
push ecx
push eax
mov ecx, esi
call fcn.00403570
mov dx, word [edi + 1]
lea eax, [esp + 0x8c]
push edx
push eax
mov ecx, esi
call fcn.00403770
mov eax, dword [eax]
mov dword [esp + 0x84], eax
mov ecx, dword [esp + 0x86]
push ecx
push eax
mov ecx, esi
call fcn.00403570
mov edx, dword [esp + 0x24]
inc ebp
and edx, 0xff
add edi, 4
cmp ebp, edx
jb 0x402bd5
cmp bl, 0x3f
je 0x402c9d
mov eax, dword [esi + 0x132c]
mov cx, word [esi + 0x1330]
mov dword [esp + 0x58], eax
mov word [esp + 0x5c], cx
mov edx, dword [esp + 0x5a]
push edx
push eax
mov ecx, esi
call fcn.00403570
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x28]
cmp ecx, eax
jb 0x4029e4
mov bl, byte [esp + 0x13]
mov ebp, ecx
jmp 0x402cb9
mov bl, byte [esp + 0x13]
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x44]
cmp ecx, eax
jae 0x402d3a
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 0x402cdb
test bl, bl
jbe 0x402d3a
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.00402df0
cmp edi, dword [esp + 0x44]
jb 0x402cc5
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x1c]
cmp eax, edx
jae 0x402dc5
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 0x402d5c
mov al, byte [esp + 0x12]
test al, al
jbe 0x402dc5
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.00402df0
cmp edi, dword [esp + 0x38]
jb 0x402d46
mov eax, dword [esp + 0x40]
dec eax
mov dword [esp + 0x40], eax
jne 0x4029ca
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x500
ret 0xc