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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x514098
mov eax, dword fs:[0]
push eax
sub esp, 0x54
push esi
push edi
mov eax, dword [0x56957c]
xor eax, esp
push eax
lea eax, [esp + 0x60]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x10]
mov dword [eax], 1
mov eax, dword [ebp + 0x10]
push edx
push eax
xor edi, edi
push esi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x2c], edi
call fcn.004acf70
mov eax, dword [esp + 0x1c]
lea ecx, [eax + eax*4]
add ecx, ecx
add ecx, ecx
push ecx
call fcn.004ed893
mov ecx, eax
mov eax, dword [esp + 0x20]
lea edx, [eax + eax*4]
add edx, edx
add esp, 0x14
add edx, edx
push edx
push edi
push ecx
mov dword [esp + 0x38], ecx
call fcn.004f2770
xor eax, eax
add esp, 0xc
cmp dword [esp + 0xc], eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x24], eax
mov byte [esp + 0x20], al
mov dword [esp + 0x18], eax
jle 0x431641
mov eax, dword [ebp + 0x10]
push eax
push esi
call fcn.004abd50
mov ecx, dword [ebp + 0x10]
push 0x20000
push ecx
push esi
call fcn.004acdd0
add esp, 0x14
test eax, eax
je 0x431612
lea edx, [esp + 0x59]
push edx
lea eax, [esp + 0x5c]
push eax
lea ecx, [esp + 0x5e]
push ecx
lea edx, [esp + 0x60]
push edx
lea eax, [esp + 0x60]
push eax
lea ecx, [esp + 0x60]
push ecx
mov ecx, dword [ebp + 0x10]
lea edx, [esp + 0x60]
push edx
lea eax, [esp + 0x60]
push eax
push ecx
push esi
call fcn.004acfc0
mov edx, dword [ebp + 0x14]
push edx
push esi
call fcn.004ac7f0
mov ecx, dword [esp + 0x74]
mov edx, dword [esp + 0x78]
xor eax, eax
mov dword [esp + 0x44], eax
mov dword [ebx + 4], ecx
mov dword [ebx + 8], edx
mov byte [esp + 0x68], al
mov dword [esp + 0x64], eax
mov dword [esp + 0x98], eax
mov eax, dword [ebp + 0x14]
push eax
lea ecx, [esp + 0x48]
push ecx
mov ecx, ebx
lea eax, [esp + 0x6c]
call fcn.0043f9c0
add esp, 0x38
test al, al
jne 0x431509
lea ecx, [esp + 0x34]
mov dword [esp + 0x68], 0xffffffff
call fcn.004163d0
jmp 0x43161f
test edi, edi
jne 0x43157b
mov eax, dword [ebx + 8]
mov edx, dword [ebx + 4]
mov dword [esp + 0x24], eax
mov al, byte [esp + 0x58]
mov dword [esp + 0x28], edx
cmp al, 1
je 0x43154c
cmp al, 2
je 0x43154c
mov ecx, dword [ebp + 0x14]
push ecx
lea edx, [esp + 0x14]
push edx
mov ecx, ebx
lea eax, [esp + 0x3c]
call fcn.0043f9c0
add esp, 8
cmp word [ebx + 0xe], 0x20
sete al
mov byte [esp + 0x20], al
jmp 0x431592
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x3c]
push edx
mov ecx, ebx
mov dword [esp + 0x3c], 0
call fcn.0043f720
add esp, 0xc
cmp word [ebx + 0xe], 0x20
sete al
mov byte [esp + 0x20], al
jmp 0x431592
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x44]
push ecx
push edx
lea eax, [esp + 0x1c]
push eax
call fcn.00430ed0
add esp, 0xc
mov esi, dword [esp + 0x2c]
mov eax, dword [esp + 0x14]
xor ecx, ecx
lea edx, [edi + edi*4]
lea esi, [esi + edx*4]
mov dword [esi + 4], ecx
mov ecx, dword [esp + 0x40]
mov dword [esi + 8], eax
mov eax, dword [esp + 0x3c]
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], ecx
mov ax, word [esp + 0x56]
test ax, ax
jne 0x4315ca
mov eax, 0x64
mov word [esp + 0x56], ax
movzx edx, word [esp + 0x54]
mov dword [esp + 0x30], edx
movzx eax, ax
fild dword [esp + 0x30]
mov dword [esp + 0x30], eax
fmul qword [0x555f50]
fild dword [esp + 0x30]
fdivp st(1)
call fcn.00509190
cmp eax, 2
jge 0x4315f9
mov eax, 2
lea ecx, [esp + 0x34]
mov dword [esi], eax
inc edi
mov dword [esp + 0x68], 0xffffffff
call fcn.004163d0
mov esi, dword [ebp + 0xc]
jmp 0x43161f
mov ecx, dword [ebp + 0x14]
push ecx
push esi
call fcn.004ac7f0
add esp, 8
mov eax, dword [esp + 0x18]
inc eax
cmp eax, dword [esp + 0xc]
mov dword [esp + 0x18], eax
jl 0x431455
mov eax, dword [esp + 0x10]
test eax, eax
je 0x431641
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
mov esi, dword [ebp + 8]
push edx
mov edx, dword [esp + 0x2c]
push eax
push ecx
push edx
push edi
mov edi, dword [esp + 0x40]
add esi, 4
call fcn.00438240
mov al, 1
mov ecx, dword [esp + 0x60]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret