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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x9c
push ebx
xor eax, eax
push esi
push edi
mov edi, dword [ebp + 8]
cmp dword [edi], 0x40
mov ebx, ecx
mov ecx, 0xa
mov dword [esp + 0x14], ebx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], ecx
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], ecx
jl 0x10058658
cmp dword [edi + 4], 0x40
jl 0x10058658
mov eax, dword [ebx]
push eax
lea ecx, [esp + 0x60]
push ecx
lea edx, [esp + 0x44]
push edx
mov ecx, ebx
call fcn.10057ff0
fld qword [0x757f088]
mov eax, dword [ebx]
fstp qword [esp + 0x78]
fld qword [0x757f088]
cdq
and edx, 3
fstp qword [esp + 0x70]
fld qword [0x757f088]
add eax, edx
mov esi, eax
fstp qword [esp + 0x68]
fld qword [0x757f088]
sar esi, 2
add esi, 0x23
fstp qword [esp + 0x60]
lea ecx, [esp + 0x8c]
mov dword [esp + 0x28], esi
call fcn.1004f530
cmp dword [edi + 0x24], 1
jne 0x100583d1
push edi
lea ecx, [esp + 0x90]
call fcn.10051d50
mov eax, dword [esp + 0x3c]
push eax
lea ecx, [esp + 0x50]
call fcn.10057f20
cmp dword [esp + 0x3c], 0
mov dword [esp + 0x2c], 0
jle 0x100585b8
mov esi, dword [esp + 0x44]
add esi, 0x10
lea esp, [esp]
mov ecx, dword [esp + 0x4c]
cmp ecx, dword [esp + 0x5c]
jge 0x100585b4
fild dword [edi + 4]
fnstcw word [esp + 0x12]
movzx eax, word [esp + 0x12]
fld st(0)
fmul qword [esi - 8]
or ah, 0xc
mov dword [esp + 0x20], eax
fldcw word [esp + 0x20]
fistp qword [esp + 0x30]
mov ecx, dword [esp + 0x30]
fldcw word [esp + 0x12]
fild dword [edi]
fnstcw word [esp + 0x12]
fst qword [esp + 0x18]
fmul qword [esi]
movzx eax, word [esp + 0x12]
or ah, 0xc
mov dword [esp + 0x20], eax
fldcw word [esp + 0x20]
fistp qword [esp + 0x30]
mov edx, dword [esp + 0x30]
mov dword [esp + 0x30], edx
fldcw word [esp + 0x12]
fmul qword [esi + 8]
fnstcw word [esp + 0x12]
movzx eax, word [esp + 0x12]
or ah, 0xc
mov dword [esp + 0x20], eax
fldcw word [esp + 0x20]
fistp qword [esp + 0x20]
mov eax, dword [esp + 0x20]
mov dword [esp + 0x20], eax
fldcw word [esp + 0x12]
fld qword [esp + 0x18]
fmul qword [esi - 0x10]
fnstcw word [esp + 0x12]
mov byte [esp + 0x80], 0
movzx eax, word [esp + 0x12]
or ah, 0xc
mov dword [esp + 0x18], eax
fldcw word [esp + 0x18]
mov eax, edx
cdq
sub eax, edx
sar eax, 1
fistp qword [esp + 0x18]
mov ebx, dword [esp + 0x18]
sub ebx, eax
mov eax, dword [esp + 0x20]
fldcw word [esp + 0x12]
cdq
sub eax, edx
mov dword [esp + 0x18], ebx
mov ebx, dword [esp + 0x14]
sar eax, 1
sub ecx, eax
fild dword [esp + 0x18]
mov dword [esp + 0x18], ecx
xor ecx, ecx
mov dword [esp + 0x84], ecx
fstp qword [esp + 0x60]
fild dword [esp + 0x18]
fstp qword [esp + 0x68]
fild dword [esp + 0x30]
fstp qword [esp + 0x70]
fild dword [esp + 0x20]
fstp qword [esp + 0x78]
mov eax, dword [esi + 0x10]
sub eax, ecx
je 0x10058539
sub eax, 1
jne 0x10058588
cmp dword [edi + 0x24], 1
mov ecx, dword [ebx]
push ecx
mov ecx, ebx
jne 0x1005852c
lea edx, [esp + 0x90]
push edx
lea eax, [esp + 0x68]
push eax
call fcn.100573c0
jmp 0x10058565
push edi
lea edx, [esp + 0x68]
push edx
call fcn.10057560
jmp 0x10058565
cmp dword [edi + 0x24], 1
mov eax, dword [ebx]
push eax
jne 0x10058558
lea ecx, [esp + 0x90]
push ecx
lea edx, [esp + 0x68]
push edx
mov ecx, ebx
call fcn.10057130
jmp 0x10058565
push edi
lea ecx, [esp + 0x68]
push ecx
mov ecx, ebx
call fcn.10057ba0
mov ecx, dword [esp + 0x84]
test ecx, ecx
jge 0x10058574
xor ecx, ecx
jmp 0x10058581
cmp ecx, 0x100
jl 0x10058588
mov ecx, 0x100
mov dword [esp + 0x84], ecx
cmp ecx, dword [esp + 0x28]
jl 0x1005859c
lea edx, [esp + 0x60]
push edx
lea ecx, [esp + 0x50]
call fcn.100582c0
mov eax, dword [esp + 0x2c]
add eax, 1
add esi, 0x28
cmp eax, dword [esp + 0x3c]
mov dword [esp + 0x2c], eax
jl 0x10058400
mov esi, dword [esp + 0x28]
push 0
mov ecx, edi
call fcn.10011680
push esi
lea eax, [esp + 0x50]
push eax
lea edi, [ebx + 8]
push edi
lea ecx, [ebx + 4]
push ecx
mov ecx, ebx
call fcn.10057980
mov ebx, dword [ebx]
cmp ebx, 0x4b
jge 0x100585f7
mov ecx, 0x4b
sub ecx, ebx
mov eax, 0x99999999
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
add dword [edi], eax
cmp dword [edi], 0
jge 0x10058602
mov dword [edi], 0
cmp dword [edi], 0x64
jle 0x1005860d
mov dword [edi], 0x64
lea ecx, [esp + 0x8c]
call fcn.1004f560
mov esi, 1
cmp dword [esp + 0x50], esi
jl 0x10058638
mov eax, dword [esp + 0x54]
test eax, eax
je 0x10058638
add eax, 0xfffffffc
push eax
call fcn.10018560
add esp, 4
cmp dword [esp + 0x40], esi
jl 0x10058660
mov eax, dword [esp + 0x44]
test eax, eax
je 0x10058660
push eax
call fcn.10018560
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov byte [ebx + 4], 0
mov dword [ebx + 8], eax
nop
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4