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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x34
push ebx
push esi
mov esi, ecx
mov eax, dword [esi + 0x14]
test eax, eax
push edi
jne 0x59f6a1
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ebx, dword [ebp + 0xc]
test ebx, ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0xc], 0
je 0x59f97e
mov eax, dword [esi + 8]
lea ecx, [esi + 8]
call dword [eax]
test al, al
jne 0x59f989
cmp ebx, 0x4000
mov edi, ebx
jl 0x59f6d7
mov edi, 0x4000
mov eax, dword [0x6bebe4]
test eax, eax
mov dword [esp + 0x10], edi
je 0x59f6ee
mov cl, byte [eax + 0xc0]
test cl, cl
jne 0x59f70e
mov eax, dword [ebp + 8]
mov ebx, dword [esp + 0xc]
mov ecx, dword [esi + 0x14]
mov edx, dword [ecx]
push edi
add ebx, eax
push ebx
call dword [edx + 0x10]
test eax, eax
jne 0x59f980
jmp 0x59f950
call fcn.004a99d0
fstp qword [esp + 0x30]
fld qword [esi + 0x78]
mov dword [esp + 0x20], 0
fcomp qword [0x65c090]
mov dword [esp + 0x24], 0
fnstsw ax
test ah, 0x44
jp 0x59f778
cmp edi, 0x4000
jne 0x59f778
mov ebx, dword [esp + 0xc]
mov eax, dword [ebp + 8]
mov ecx, dword [esi + 0x14]
mov edx, dword [ecx]
push 0x2000
add eax, ebx
push eax
call dword [edx + 0x10]
test eax, eax
jne 0x59f980
call fcn.004a99d0
fstp qword [esp + 0x20]
mov eax, dword [ebp + 8]
push 0x2000
lea eax, [ebx + eax + 0x2000]
jmp 0x59f782
mov eax, dword [esp + 0xc]
mov ebx, dword [ebp + 8]
push edi
add eax, ebx
mov ecx, dword [esi + 0x14]
mov edx, dword [ecx]
push eax
call dword [edx + 0x10]
test eax, eax
jne 0x59f980
call fcn.004a99d0
fst qword [esp + 0x38]
fld qword [esp + 0x20]
mov dword [esp + 0x28], 0
fcomp qword [0x65c090]
mov dword [esp + 0x2c], 0
fnstsw ax
test ah, 0x44
jnp 0x59f7cd
fld qword [esp + 0x20]
fsubr st(1)
fdivr qword [0x6828d8]
fstp qword [esp + 0x28]
fild dword [esp + 0x10]
mov ecx, dword [ebp + 0xc]
fld st(1)
cmp ecx, 0x4000
fsub qword [esp + 0x30]
sete bl
test bl, bl
fdivp st(1)
fst qword [esp + 0x10]
je 0x59f7fe
fcomp qword [0x6828d0]
fnstsw ax
test ah, 0x41
je 0x59f800
xor al, al
jmp 0x59f802
fstp st(0)
mov al, 1
test al, al
fsub qword [esi + 0x88]
jne 0x59f8bf
fcomp qword [0x65c0b0]
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x3c]
mov dword [esi + 0x88], ecx
mov dword [esi + 0x8c], edx
fnstsw ax
test ah, 5
jp 0x59f84c
fld qword [esi + 0x78]
fcomp qword [0x65c090]
fnstsw ax
test ah, 0x44
jnp 0x59f84c
fld qword [esi + 0x78]
fmul qword [0x6828c8]
jmp 0x59f890
fld qword [esi + 0x78]
fcomp qword [esp + 0x10]
fnstsw ax
test ah, 0x41
jne 0x59f86f
fld qword [esp + 0x10]
fmul qword [0x6828c0]
fadd qword [esi + 0x78]
fmul qword [0x65c2f8]
jmp 0x59f890
fld qword [esp + 0x28]
fcomp qword [0x65c090]
fnstsw ax
test ah, 0x44
jnp 0x59f886
fld qword [esp + 0x28]
jmp 0x59f88a
fld qword [esp + 0x10]
fmul qword [0x6828c0]
fstp qword [esi + 0x78]
fld qword [0x6828b8]
fdiv qword [esi + 0x78]
fcom dword [0x6828b0]
fnstsw ax
test ah, 0x41
jne 0x59f8b1
fstp st(0)
fld dword [0x6828b0]
call fcn.00487bd0
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x59f8d4
fcomp qword [0x6600b8]
fnstsw ax
test ah, 0x41
jne 0x59f8d4
xor eax, eax
mov dword [esi + 0x78], eax
mov dword [esi + 0x7c], eax
fld qword [esi + 0x78]
fcomp qword [0x65c090]
fnstsw ax
test ah, 0x44
jnp 0x59f938
test bl, bl
je 0x59f950
fld qword [0x6828a8]
fdiv qword [esi + 0x78]
fadd qword [esp + 0x30]
fstp qword [esp + 0x38]
call fcn.004a99d0
fcom qword [esp + 0x38]
fnstsw ax
test ah, 5
jp 0x59f936
fsubr qword [esp + 0x38]
fmul qword [0x661c18]
fcom qword [0x6678e0]
fnstsw ax
test ah, 0x41
jne 0x59f928
fstp st(0)
fld qword [0x6678e0]
call fcn.00487bd0
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x59f938
fstp st(0)
test bl, bl
je 0x59f950
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
mov dword [esi + 0x80], eax
mov dword [esi + 0x84], ecx
mov eax, dword [esi + 0x64]
mov edx, dword [esp + 0xc]
mov ebx, dword [esp + 0x1c]
push edi
add edx, edi
add eax, edi
sub ebx, edi
push 2
mov ecx, esi
mov dword [esp + 0x14], edx
mov dword [esp + 0x24], ebx
mov dword [esi + 0x64], eax
call fcn.0059e2c0
test ebx, ebx
jne 0x59f6b8
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x48]
pop edi
pop esi
mov eax, 0xf4242
pop ebx
mov esp, ebp
pop ebp
ret 8