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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x90
mov edi, dword [ebp + 0x10]
mov ebx, dword [ebp + 0xc]
push 0
push 1
push 0x77d30b
push edi
push ebx
call fcn.00558d40
add esp, 0x14
mov byte [esp + 0x14], al
test al, al
mov dword [esp + 4], ebx
jne 0x500445
xor esi, esi
inc esi
push 0
push 1
push 0x787db5
push edi
push ebx
call fcn.00558d40
add esp, 0x14
test al, al
jne 0x500435
mov eax, dword [ebp + 8]
cmp edi, 3
mov edx, dword [esp + 4]
je 0x500056
cmp edi, 1
je 0x500456
test edi, edi
je 0x500191
mov dword [esp + 0x4c], esi
cvtsi2sd xmm0, esi
movsd qword [esp + 0x50], xmm0
mov dword [esp + 0xc], 0
xor ebx, ebx
mov dword [esp + 0x30], ebx
lea eax, [edx + edi]
mov dword [esp + 8], eax
mov dword [esp + 0x14], edi
lea eax, [edi - 1]
mov dword [esp + 0x10], eax
xor ecx, ecx
xor esi, esi
xor edi, edi
mov dword [esp + 4], edx
movsx ebx, byte [edx + ecx]
mov eax, ebx
add al, 0xc6
cmp al, 0xf6
jb 0x500086
mov eax, 0xcccccccc
cmp eax, esi
mov eax, 0xccccccc
sbb eax, edi
jl 0x50018e
mov eax, esi
mov edx, 0xa
mul edx
add ebx, 0xffffffd0
lea esi, [edi + edi*4]
lea edi, [edx + esi*2]
mov edx, ebx
xor esi, esi
dec esi
xor edx, esi
mov esi, eax
cmp edx, eax
mov edx, dword [esp + 4]
mov eax, SysReAllocString
sbb eax, edi
jl 0x50018e
add esi, ebx
adc edi, 0
inc ecx
dec dword [esp + 0x10]
cmp dword [esp + 0x14], ecx
jne 0x4fffef
jmp 0x50046b
mov ecx, dword [esp + 4]
movzx edx, word [ecx]
xor dx, word [0x787e09]
mov ecx, dword [esp + 4]
mov cl, byte [ecx + 2]
xor cl, byte [0x787e0b]
movzx ecx, cl
or cx, dx
mov edx, dword [esp + 4]
jne 0x4fffb7
jmp 0x500658
add edx, ecx
cmp bl, 0x2e
je 0x50034d
test ecx, ecx
je 0x50018e
sub dword [esp + 0x14], ecx
mov dword [esp + 0x18], 0
mov dword [esp + 0x24], 0
xor eax, eax
inc eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], 0
mov dword [esp + 8], edx
mov dword [esp + 0x10], 2
push 0
push 2
push 0x787e17
mov ebx, dword [esp + 0x20]
push ebx
push dword [esp + 0x18]
call fcn.00558d40
add esp, 0x14
test al, al
jne 0x5001d5
push 0
push 2
push 0x787e1a
push ebx
push dword [esp + 0x18]
call fcn.00558d40
add esp, 0x14
test al, al
jne 0x5001b7
push 0
push 2
push 0x787e1d
push ebx
push dword [esp + 0x18]
call fcn.00558d40
add esp, 0x14
test al, al
jne 0x5001a9
push 0
push 1
push 0x787d9f
push ebx
push dword [esp + 0x18]
call fcn.00558d40
add esp, 0x14
test al, al
jne 0x5001be
push 0
push 1
push 0x787da3
push ebx
push dword [esp + 0x18]
call fcn.00558d40
add esp, 0x14
test al, al
jne 0x5001b0
push 0
push 1
push 0x787d9d
push ebx
push dword [esp + 0x18]
call fcn.00558d40
add esp, 0x14
test al, al
jne 0x5001a2
push 0
push 1
push 0x787da5
push ebx
push dword [esp + 0x18]
call fcn.00558d40
add esp, 0x14
test al, al
jne 0x50019b
mov eax, dword [ebp + 8]
mov byte [eax], 0
xor ecx, ecx
jmp 0x500342
mov eax, 0x7a2e20
jmp 0x5001c3
mov eax, 0x7a2e10
jmp 0x5001c3
mov eax, 0x7a2de0
jmp 0x5001da
mov eax, 0x7a2e00
jmp 0x5001c3
mov eax, 0x7a2dd0
jmp 0x5001da
mov eax, 0x7a2df0
xor ecx, ecx
inc ecx
mov dword [esp + 0x10], ecx
jmp 0x5001da
mov edi, dword [esp + 0xc]
jmp 0x500304
mov eax, 0x7a2dc0
mov ecx, dword [esp + 0x10]
sub dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x30]
mov ebx, dword [esp + 0x18]
jb 0x500443
mov edx, dword [eax + 8]
mov dword [esp + 0x2c], edx
mov edx, dword [eax + 0xc]
mov eax, esi
or eax, edi
mov dword [esp + 0x28], edx
je 0x5001cc
mov ebx, dword [esp + 0x4c]
mov ecx, ebx
sar ecx, 0x1f
mov eax, esi
mul ebx
mov dword [esp + 4], eax
imul ecx, esi
imul edi, ebx
add edi, edx
add edi, ecx
mov ecx, dword [esp + 0x28]
mov eax, ecx
sar eax, 0x1f
mov esi, ecx
xor esi, eax
mov ebx, dword [esp + 0x2c]
xor ebx, eax
sub ebx, eax
sbb esi, eax
mov eax, edi
sar eax, 0x1f
xor ecx, edi
xor edi, eax
mov edx, dword [esp + 4]
xor edx, eax
sub edx, eax
mov dword [esp + 4], edx
sbb edi, eax
mov eax, ebx
mul dword [esp + 4]
mov dword [esp + 0x48], eax
mov dword [esp + 0x44], edx
mov dword [esp + 0x34], ecx
mov eax, ecx
shr eax, 0x1f
cmp eax, dword [esp + 4]
mov ecx, 0
sbb ecx, edi
jae 0x500294
xor ecx, ecx
dec ecx
add eax, ecx
mov ecx, SysReAllocString
adc ecx, 0
push edi
push dword [esp + 8]
push ecx
push eax
call fcn.005f1340
cmp eax, ebx
sbb edx, esi
jb 0x5004ee
imul ebx, edi
mov eax, dword [esp + 0x44]
add eax, ebx
imul esi, dword [esp + 4]
add esi, eax
mov eax, dword [esp + 0x48]
mov edi, eax
neg edi
mov ecx, 0
sbb ecx, esi
cmp dword [esp + 0x34], 0
cmovns ecx, esi
cmovns edi, eax
xor edx, edx
dec edx
add edx, edi
mov esi, SysReAllocString
adc esi, ecx
add edx, 2
adc esi, 0
cmp edx, 2
sbb esi, 0
mov eax, dword [esp + 0x30]
mov ebx, dword [esp + 0x18]
jb 0x500497
mov esi, dword [esp + 0xc]
add esi, edi
adc eax, ecx
seto dl
mov edi, eax
sar edi, 0x1f
lea ecx, [edi - 0x80000000]
test dl, dl
cmove edi, esi
test dl, dl
cmove ecx, eax
mov dword [esp + 4], ecx
mov eax, dword [ebp + 8]
mov esi, dword [esp + 8]
mov edx, ebx
mov ecx, dword [esp + 0x24]
or edx, ecx
jne 0x500513
mov dword [esp + 0xc], edi
mov ebx, dword [esp + 4]
add esi, dword [esp + 0x10]
mov edx, esi
mov edi, dword [esp + 0x14]
test edi, edi
jne 0x4fffcf
mov ecx, dword [esp + 0xc]
mov dword [eax], ecx
mov dword [eax + 4], ebx
mov cl, 1
mov byte [eax + 8], cl
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov dword [esp + 0x28], edi
mov dword [esp + 4], edx
mov dword [esp + 0x18], 0
xor eax, eax
inc eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], 0
mov dword [esp + 0x1c], 0
jmp 0x5003c1
mov eax, dword [esp + 0x18]
mov edx, 0xa
mul edx
mov edi, edx
mov edx, ebx
add edx, 0xffffffd0
mov ebx, dword [esp + 0x24]
add ebx, ebx
add eax, edx
mov dword [esp + 0x18], eax
lea ebx, [ebx + ebx*4]
adc ebx, edi
mov dword [esp + 0x24], ebx
mov eax, dword [esp + 0x20]
mov edx, 0xa
mul edx
mov ebx, dword [esp + 0x1c]
lea ebx, [ebx + ebx*4]
lea edx, [edx + ebx*2]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], eax
cmp byte [esp + 0x2c], 0xf5
jbe 0x500411
mov eax, dword [esp + 0x10]
mov dword [esp + 0x14], eax
sub eax, 1
mov dword [esp + 0x10], eax
jb 0x500409
mov eax, dword [esp + 4]
inc eax
mov dword [esp + 4], eax
movzx eax, byte [eax]
mov ebx, eax
add al, 0xc6
mov byte [esp + 0x2c], al
cmp al, 0xf6
setb al
mov edx, 0xcccccccc
cmp edx, dword [esp + 0x20]
mov edx, 0xccccccc
sbb edx, dword [esp + 0x1c]
setl dl
or dl, al
jne 0x5003ba
jmp 0x500376
mov eax, dword [esp + 8]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x20]
xor eax, 1
or eax, dword [esp + 0x1c]
or ecx, eax
mov eax, dword [esp + 4]
mov dword [esp + 8], eax
mov edi, dword [esp + 0x28]
jne 0x5000c0
jmp 0x50018e
test edi, edi
je 0x500443
inc dword [esp + 4]
dec edi
jmp 0x4fff96
ud2
test edi, edi
je 0x500443
inc dword [esp + 4]
dec edi
xor esi, esi
dec esi
jmp 0x4fff96
cmp byte [edx], 0x30
jne 0x4fffb7
xor ecx, ecx
mov dword [eax + 4], ecx
mov dword [eax], ecx
jmp 0x500340
mov dword [esp + 0x18], 0
mov dword [esp + 0x24], 0
xor eax, eax
inc eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], 0
mov dword [esp + 0x14], 0
jmp 0x5000c0
mov dword [esp + 4], ecx
xor edx, edx
dec edx
add edx, dword [esp + 0xc]
mov esi, SysReAllocString
adc esi, eax
add edx, 2
adc esi, 0
xor eax, eax
xor ebx, ebx
inc ebx
cmp ebx, edx
sbb eax, esi
jae 0x5004ca
mov eax, dword [ebp + 8]
mov esi, dword [esp + 8]
mov ebx, dword [esp + 0x18]
jmp 0x50030f
mov edx, dword [esp + 0xc]
xor edx, edi
mov eax, dword [esp + 0x30]
xor eax, dword [esp + 4]
or eax, edx
mov eax, dword [ebp + 8]
mov esi, dword [esp + 8]
mov ebx, dword [esp + 0x18]
je 0x50030f
int3
xor eax, eax
dec eax
mov edi, eax
add edi, 1
mov ecx, SysReAllocString
adc ecx, 0
cmp dword [esp + 0x34], 0
cmovns edi, eax
mov eax, SysReAllocString
cmovns ecx, eax
jmp 0x5002be
movd xmm0, ebx
movd xmm1, ecx
movss xmm2, dword [esp + 0x20]
movss xmm3, dword [esp + 0x1c]
punpckldq xmm0, xmm1
movq qword [esp + 0x80], xmm0
fild qword [esp + 0x80]
fstp qword [esp + 0x78]
movsd xmm0, qword [esp + 0x78]
mulsd xmm0, qword [esp + 0x50]
unpcklps xmm2, xmm3
movlps qword [esp + 0x70], xmm2
fild qword [esp + 0x70]
fstp qword [esp + 0x68]
divsd xmm0, qword [esp + 0x68]
movss xmm1, dword [esp + 0x2c]
movss xmm2, dword [esp + 0x28]
unpcklps xmm1, xmm2
movlps qword [esp + 0x60], xmm1
fild qword [esp + 0x60]
fstp qword [esp + 0x58]
mulsd xmm0, qword [esp + 0x58]
xor ebx, ebx
movsd xmm1, qword [0x77d340]
ucomisd xmm0, xmm1
mov eax, 0xffffffff
cmovb eax, ebx
mov dword [esp + 0xc], eax
mov eax, SysReAllocString
cmovae ebx, eax
movsd xmm2, qword [0x77d348]
ucomisd xmm2, xmm0
maxsd xmm0, xmm1
movsd qword [esp + 0x38], xmm0
fld qword [esp + 0x38]
fisttp qword [esp + 0x38]
jb 0x5005d1
mov ebx, dword [esp + 0x3c]
mov eax, dword [esp + 0x38]
mov dword [esp + 0xc], eax
xor edx, edx
dec edx
add edx, dword [esp + 0xc]
mov esi, SysReAllocString
adc esi, ebx
add edx, 2
adc esi, 0
cmp edx, 2
sbb esi, 0
jb 0x50061f
add edi, dword [esp + 0xc]
mov ecx, dword [esp + 4]
adc ecx, ebx
seto dl
mov eax, ecx
sar eax, 0x1f
lea ebx, [eax - 0x80000000]
test dl, dl
cmove eax, edi
mov dword [esp + 0xc], eax
test dl, dl
cmove ebx, ecx
mov eax, dword [ebp + 8]
mov esi, dword [esp + 8]
jmp 0x500325
xor edx, edx
dec edx
add edx, edi
mov esi, SysReAllocString
mov eax, dword [esp + 4]
adc esi, eax
add edx, 2
adc esi, 0
xor edi, dword [esp + 0xc]
xor eax, ebx
or eax, edi
je 0x500613
xor eax, eax
xor ecx, ecx
inc ecx
cmp ecx, edx
sbb eax, esi
mov eax, dword [ebp + 8]
mov esi, dword [esp + 8]
jb 0x500325
int3
xor esi, esi
xor ecx, ecx
dec ecx
mov edx, ecx
add edx, 1
adc esi, 0x7fffffff
cmp byte [esp + 0x14], 0
cmove edx, ecx
mov ecx, SysReAllocString
cmovne ecx, esi
mov dword [eax], edx
mov dword [eax + 4], ecx
jmp 0x500340