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

Disassembly:
sub esp, 0xc
push ebx
push ebp
push esi
mov esi, dword [esp + 0x20]
push edi
mov ebx, dword [esi + 0x14]
test ebx, ebx
je 0x1005f959
cmp byte [esi + 0x4e], 1
jne 0x1005f8c5
push esi
call fcn.1005f5a0
add esp, 4
mov edi, dword [esp + 0x20]
push 1
push edi
call fcn.1005ff30
push edi
call fcn.1005eed0
mov ecx, ebx
mov ebp, eax
shr ecx, 3
add esp, 0xc
add ecx, ebx
cmp ebp, ecx
jae 0x1005f919
push esi
push edi
call fcn.1005efc0
mov ecx, dword [esi + 0xc]
mov eax, 0x51eb851f
add ecx, dword [esi + 8]
mul ecx
movzx eax, byte [esi + 0x4f]
shr edx, 5
imul edx, eax
neg edx
push edx
push esi
call fcn.10059310
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
mov eax, dword [esi + 0xc]
add eax, dword [esi + 8]
mov dword [esi + 0x10], eax
mov esi, dword [edi + 0x10]
lea eax, [esi + 0x58]
mov byte [esi + 0x4d], 3
push eax
push edi
call fcn.10061570
push 0x100
push edi
mov dword [esi + 0x5c], eax
call fcn.1005ff30
mov esi, dword [esp + 0x34]
push esi
call fcn.10060e00
add esp, 0x14
mov dword [esi + 0x14], ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
cmp dword [esi + 0xc], 0
lea ebx, [esi + 8]
mov ebp, dword [esi + 0x10]
mov dword [esp + 0x18], ebp
mov dword [esp + 0x14], ebx
jle 0x1005f9cb
movzx edi, byte [esi + 0x50]
mov eax, 0x51eb851f
mov ecx, dword [ebx]
add ecx, dword [esi + 0xc]
mul ebp
shr edx, 5
imul edi, edx
shl edi, 2
lea eax, [edi + ebp]
cmp ecx, eax
jbe 0x1005f9cf
push esi
push dword [esp + 0x24]
call fcn.1005f860
mov ecx, dword [esi + 0xc]
add esp, 8
add ecx, dword [ebx]
shr edi, 1
add edi, ebp
push esi
cmp ecx, edi
jae 0x1005f9b8
call fcn.10060dd0
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
mov dword [esi + 0x14], eax
call fcn.10060e00
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
mov dword [esp + 0x14], ebx
mov eax, dword [esi + 0x8c]
lea ebx, [esi + 0x8c]
mov dword [esp + 0x10], ebx
test eax, eax
je 0x1005f9f9
push dword [esi + 0x88]
push eax
push esi
call fcn.10060390
add esp, 0xc
mov dword [ebx], 0
push dword [esi + 0x98]
push dword [esi + 0x60]
push esi
call fcn.10060390
push 0
push dword [esi + 0x78]
lea ebp, [esi + 0x78]
push esi
call fcn.10060390
mov ebx, dword [esp + 0x38]
push ebx
call fcn.1005eed0
lea eax, [esi + 0x8c]
mov byte [esi + 0x4d], 3
push eax
push dword [esi + 0x80]
lea edi, [esi + 0x58]
push edi
push esi
push ebx
call fcn.10061180
push dword [esp + 0x40]
mov esi, eax
mov eax, dword [esp + 0x58]
push dword [eax + 0x84]
push esi
push eax
push ebx
call fcn.10061180
mov ecx, dword [esp + 0x68]
add esp, 0x44
mov dword [esp + 0x10], 0
mov eax, dword [ecx + 0x84]
mov dword [ecx + 0x88], eax
mov eax, dword [esi]
mov dword [ecx + 0x84], eax
mov eax, dword [edi]
lea edi, [ecx + 0x60]
mov dword [ecx + 0x80], eax
lea eax, [esp + 0x10]
push eax
push dword [ecx + 0x90]
push edi
push ecx
push ebx
call fcn.10061180
mov esi, eax
lea eax, [esp + 0x24]
push eax
mov eax, dword [esp + 0x3c]
push dword [eax + 0x94]
push esi
push eax
push ebx
call fcn.10061180
mov ecx, dword [esp + 0x4c]
mov eax, dword [ecx + 0x94]
mov dword [ecx + 0x98], eax
mov eax, dword [esi]
mov esi, ecx
mov dword [esi + 0x94], eax
mov eax, dword [edi]
mov dword [esi + 0x90], eax
lea eax, [esp + 0x38]
push eax
push 0
push ebp
push esi
push ebx
call fcn.10061180
push esi
push ebx
call fcn.1005f650
mov ecx, dword [esp + 0x58]
mov eax, 0x51eb851f
add esp, 0x44
mov ecx, dword [ecx]
add ecx, dword [esi + 0xc]
mul ecx
movzx eax, byte [esi + 0x4f]
shr edx, 5
imul edx, eax
neg edx
push edx
push esi
call fcn.10059310
mov eax, dword [esp + 0x20]
add esp, 8
mov dword [esi + 0x10], eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret