Function at 0x4022a0
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 0x402725
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 0x402609
jmp 0x40233c
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 0x40234e
test dl, dl
jbe 0x402605
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.00402c50
mov ebx, 0x40a5a0
lea ebp, [esp + 0x110]
lea edi, [esi + 0x109c]
mov dword [esp + 0x14], 0x40
fld dword [edi]
fmul dword [ebp]
fadd qword [0x40a800]
fsub qword [0x40a7f8]
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 0x4023b0
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 0x402420
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 0x4024a7
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.00402ec0
push edi
mov ecx, esi
call fcn.004031f0
mov byte [esp + 0x2e], al
mov ebx, dword [esp + 0x2e]
test di, di
jl 0x402475
mov word [esp + 0x2c], di
jmp 0x4024a1
fld qword [0x40a7f0]
mov eax, ebx
and eax, 0xff
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
call sub.MSVCRT.dll__CIpow
fsub qword [0x40a7e0]
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.00402ec0
mov bl, 0x3f
mov byte [esp + 0x48], bl
mov edx, dword [esp + 0x48]
and edx, 0xff
cmp word [esp + edx*2 + 0x90], 0
jne 0x4024d1
dec bl
mov byte [esp + 0x48], bl
jne 0x4024b4
test bl, bl
jne 0x4024f4
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 0x4025e4
lea eax, [esp + 0x24]
lea ecx, [esp + 0x310]
push eax
lea edx, [esp + 0x94]
push ecx
push edx
mov ecx, esi
call fcn.00402f80
mov al, byte [esp + 0x24]
xor ebp, ebp
test al, al
jbe 0x4025c5
lea edi, [esp + 0x311]
mov cl, byte [edi]
test cl, cl
jne 0x402548
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 0x4025a6
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.00402ec0
mov dx, word [edi + 1]
lea eax, [esp + 0x8c]
push edx
push eax
mov ecx, esi
call fcn.004030c0
mov eax, dword [eax]
mov dword [esp + 0x84], eax
mov ecx, dword [esp + 0x86]
push ecx
push eax
mov ecx, esi
call fcn.00402ec0
mov edx, dword [esp + 0x24]
inc ebp
and edx, 0xff
add edi, 4
cmp ebp, edx
jb 0x402525
cmp bl, 0x3f
je 0x4025ed
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.00402ec0
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x28]
cmp ecx, eax
jb 0x402334
mov bl, byte [esp + 0x13]
mov ebp, ecx
jmp 0x402609
mov bl, byte [esp + 0x13]
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x44]
cmp ecx, eax
jae 0x40268a
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 0x40262b
test bl, bl
jbe 0x40268a
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.00402740
cmp edi, dword [esp + 0x44]
jb 0x402615
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x1c]
cmp eax, edx
jae 0x402715
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 0x4026ac
mov al, byte [esp + 0x12]
test al, al
jbe 0x402715
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.00402740
cmp edi, dword [esp + 0x38]
jb 0x402696
mov eax, dword [esp + 0x40]
dec eax
mov dword [esp + 0x40], eax
jne 0x40231a
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x500
ret 0xc