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

Disassembly:
sub esp, 0x80
lea eax, [esp + 0x54]
push ebx
push ebp
mov ebp, dword [esp + 0x8c]
push esi
push edi
push ebp
push 1
push 0x28
push eax
call dword [ebp + 0x83c]
mov ecx, dword [esp + 0x76]
mov esi, dword [esp + 0xa8]
mov edx, dword [esp + 0x74]
mov eax, dword [esp + 0x75]
and ecx, 0xff
and edx, 0xff
mov dword [esi + 0x38], ecx
lea ecx, [esp + 0x78]
and eax, 0xff
mov edi, 0x100
push ecx
mov dword [esi], 0x1a
mov dword [esi + 0x28], edx
mov dword [esi + 0x2c], eax
mov dword [esi + 0x30], edi
mov dword [esi + 0x34], edi
call fcn.00509990
lea edx, [esp + 0x80]
push edx
call fcn.00509990
lea eax, [esp + 0x88]
push eax
call fcn.00509990
lea ecx, [esp + 0x90]
push ecx
call fcn.00509990
lea edx, [esp + 0x98]
push edx
call fcn.00509990
lea eax, [esp + 0xa0]
push eax
call fcn.00509990
lea ecx, [esp + 0xa8]
push ecx
call fcn.00509990
lea edx, [esp + 0xb0]
push edx
call fcn.00509990
lea eax, [esp + 0xb8]
push eax
call fcn.00509990
mov ecx, dword [esp + 0x9c]
mov edx, dword [esp + 0xa0]
lea eax, [esi + 4]
mov dword [esi + 8], edx
mov edx, dword [esp + 0xa8]
push 0x3f1a36e2
mov dword [eax], ecx
mov ecx, dword [esp + 0xa8]
mov dword [esi + 0xc], ecx
mov ecx, dword [esp + 0xb0]
mov dword [esi + 0x10], edx
mov edx, dword [esp + 0xb4]
mov dword [esi + 0x14], ecx
mov ecx, dword [esp + 0xb8]
mov dword [esi + 0x18], edx
mov edx, dword [esp + 0xbc]
mov dword [esi + 0x1c], ecx
mov ecx, dword [esp + 0xc0]
push 0xeb1c432d
push eax
mov dword [esi + 0x20], edx
mov dword [esi + 0x24], ecx
call fcn.00541b30
add esp, 0x40
test eax, eax
jne 0x509afa
mov eax, dword [esi]
or al, 1
mov dword [esi], eax
push edi
call fcn.004666ec
mov ecx, dword [esi + 0x28]
mov ebx, eax
xor eax, eax
add esp, 4
cmp ecx, eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
jbe 0x509b91
lea edx, [esi + 0x3c]
mov dword [esp + 0x18], edx
push 0x200
call fcn.004666ec
mov edi, eax
mov eax, dword [esp + 0x1c]
push ebp
push 0x100
push 1
push ebx
mov dword [eax], edi
call dword [ebp + 0x83c]
add esp, 0x14
xor eax, eax
movzx cx, byte [eax + ebx]
xor edx, edx
add edi, 2
mov dh, cl
or edx, ecx
inc eax
mov word [edi - 2], dx
cmp eax, 0x100
jb 0x509b43
mov edi, dword [esp + 0x18]
mov eax, dword [esi + 0x30]
push eax
mov ecx, dword [edi]
push ecx
call fcn.00540b30
mov edx, dword [esp + 0x18]
mov ecx, dword [esi + 0x28]
add edx, eax
mov eax, dword [esp + 0x1c]
add esp, 8
inc eax
add edi, 4
cmp eax, ecx
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], edi
jb 0x509b1d
mov edx, dword [esp + 0x10]
mov eax, dword [esi + 0x28]
cmp edx, eax
jne 0x509ba2
mov eax, dword [esi]
and al, 0xfd
mov dword [esi], eax
push ebx
call fcn.00466603
mov eax, dword [esi + 0x28]
mov ecx, dword [esi + 0x38]
push eax
push ecx
call fcn.00509e80
mov edi, eax
xor eax, eax
imul edi, dword [esi + 0x2c]
add esp, 0xc
cmp edi, eax
mov dword [esp + 0x1c], edi
jbe 0x509c2a
lea eax, [edi + edi]
push eax
call fcn.004666ec
push edi
mov ebx, eax
call fcn.004666ec
push ebp
push edi
push 1
push eax
mov dword [esp + 0x30], eax
call dword [ebp + 0x83c]
lea eax, [edi + edi]
add esp, 0x18
mov dword [esi + 0xc0], eax
xor eax, eax
test edi, edi
mov dword [esi + 0xbc], ebx
jbe 0x509c1b
mov edx, dword [esp + 0x18]
add ebx, 2
movzx cx, byte [eax + edx]
xor edx, edx
mov dh, cl
or edx, ecx
inc eax
mov word [ebx - 2], dx
cmp eax, edi
jb 0x509c00
mov eax, dword [esp + 0x18]
push eax
call fcn.00466603
add esp, 4
jmp 0x509c3c
mov dword [esi + 0xbc], eax
mov dword [esi + 0xc0], eax
mov eax, dword [esi]
and al, 0xef
mov dword [esi], eax
push 0x100
call fcn.004666ec
mov ecx, dword [esi + 0x2c]
mov ebx, eax
xor eax, eax
add esp, 4
cmp ecx, eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
jbe 0x509ce0
lea ecx, [esi + 0x7c]
mov dword [esp + 0x18], ecx
push 0x200
call fcn.004666ec
mov edx, dword [esp + 0x1c]
push ebp
push 0x100
mov edi, eax
push 1
push ebx
mov dword [edx], edi
call dword [ebp + 0x83c]
add esp, 0x14
xor eax, eax
movzx cx, byte [eax + ebx]
xor edx, edx
add edi, 2
mov dh, cl
or edx, ecx
inc eax
mov word [edi - 2], dx
cmp eax, 0x100
jb 0x509c8d
mov edi, dword [esp + 0x18]
push 0x100
mov eax, dword [edi]
push eax
call fcn.00540b30
mov edx, dword [esp + 0x18]
mov ecx, dword [esi + 0x2c]
add edx, eax
mov eax, dword [esp + 0x1c]
add esp, 8
inc eax
add edi, 4
cmp eax, ecx
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], edi
jb 0x509c67
mov edi, dword [esp + 0x1c]
mov ecx, dword [esp + 0x10]
mov eax, dword [esi + 0x2c]
cmp ecx, eax
jne 0x509cf1
mov eax, dword [esi]
and al, 0xf7
mov dword [esi], eax
push ebx
call fcn.00466603
mov eax, dword [esi + 0x30]
lea edx, [esi + 0xc4]
push edx
push eax
call fcn.0053f5a0
mov edx, dword [esi + 0x34]
lea ecx, [esi + 0xfc]
push ecx
push edx
call fcn.0053f5a0
mov ecx, dword [esi + 0x2c]
mov edx, dword [esi + 0x28]
lea eax, [esi + 0x134]
push eax
mov eax, dword [esi + 0x38]
push ecx
push edx
push eax
call fcn.0053fbe0
mov eax, dword [ebp + 0xc]
mov ebx, 0x4c616220
add esp, 0x24
cmp eax, ebx
jne 0x509e68
mov eax, dword [ebp + 8]
push edi
cmp eax, ebx
jne 0x509d55
push esi
call fcn.00509f90
add esp, 8
jmp 0x509d66
mov ecx, dword [esp + 0xa0]
push ecx
push esi
call fcn.00509ea0
add esp, 0xc
push 0
lea edx, [esp + 0x1c]
push 0
push edx
push ebx
call fcn.0053e4b0
mov edx, dword [ebp + 8]
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x24]
push 0
push ecx
push edx
call fcn.0053e4b0
add esp, 0x20
test eax, eax
je 0x509e68
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x44]
push eax
push ecx
push esi
mov dword [esi + 0x2c8], 0
call fcn.0053cfc0
mov eax, dword [esp + 0x24]
lea edx, [esp + 0x30]
push edx
push eax
push esi
mov dword [esi + 0x2c8], 1
call fcn.0053cfc0
mov eax, dword [esp + 0x34]
add esp, 0x18
fld qword [0x672218]
fld qword [0x672218]
test eax, eax
jle 0x509e3a
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x24]
lea edi, [esp + 0x44]
sub edx, ecx
sub edi, ecx
mov dword [esp + 0x14], eax
xor eax, eax
xor ebx, ebx
mov ax, word [ecx]
mov bx, word [edx + ecx]
mov ebp, eax
add ecx, 2
sub ebp, ebx
xor ebx, ebx
mov dword [esp + 0x20], ebp
mov bx, word [edi + ecx - 2]
fild dword [esp + 0x20]
sub eax, ebx
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x14]
fld st(0)
fmul st(1)
dec eax
mov dword [esp + 0x14], eax
faddp st(2)
fstp st(0)
fild dword [esp + 0x20]
fld st(0)
fmul st(1)
faddp st(3)
fstp st(0)
jne 0x509df4
fsqrt
fxch st(1)
fsqrt
fcompp
fnstsw ax
test ah, 0x41
jne 0x509e5e
mov dword [esi + 0x2c8], 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x80
ret
mov dword [esi + 0x2c8], 0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x80
ret