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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
sub esp, 0x874
mov eax, dword [0x1008e060]
xor eax, esp
mov dword [esp + 0x870], eax
mov ecx, dword [ebp + 0x20]
mov eax, dword [ebp + 0x1c]
mov edx, dword [ebp + 0x28]
push ebx
mov ebx, dword [ebp + 8]
mov dword [esp + 0x68], ecx
mov ecx, dword [ebp + 0x30]
mov dword [esp + 0x6c], eax
mov eax, dword [ebp + 0x2c]
push esi
mov esi, dword [ebp + 0xc]
mov dword [esp + 0x60], ecx
mov ecx, dword [ebp + 0x38]
mov dword [esp + 0x48], eax
mov eax, dword [eax + 0x44]
push edi
mov edi, dword [ebp + 0x24]
mov dword [esp + 0x58], ecx
xor ecx, ecx
mov dword [esp + 0x7c], edx
mov edx, dword [ebp + 0x34]
mov dword [esp + 0x68], eax
mov eax, dword [ebp + 0x14]
sub eax, dword [ebp + 0x10]
push 0x18c
push ecx
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], ecx
mov dword [esp + 0x80], edx
mov edx, dword [ebp + 0x3c]
lea ecx, [esp + 0x88]
push ecx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x38], esi
mov dword [esp + 0x78], edi
mov dword [esp + 0x6c], edx
mov dword [esp + 0x28], 0x100000
mov dword [esp + 0x68], eax
call fcn.100113d0
mov eax, dword [ebx + 0x6c]
mov edx, dword [ebx + 8]
mov dword [esp + 0x15c], edx
mov edx, dword [esi + 0x10]
mov ecx, eax
shr ecx, 2
and ecx, 1
mov dword [esp + 0x164], ecx
mov ecx, dword [esi + 0x18]
and edx, 0x2000
mov dword [esp + 0x16c], edx
mov edx, ecx
imul edx, ecx
mov dword [esp + 0x1e4], ecx
not eax
add esp, 0xc
and eax, 1
mov dword [esp + 0x1dc], eax
mov eax, dword [edi + 4]
mov dword [esp + 0x208], edx
mov edx, dword [ebx + 0x78]
lea ecx, [esp + 0x6c0]
mov dword [esp + 0x1d4], ecx
mov dword [esp + 0x144], eax
mov dword [esp + 0x114], 0
mov dword [esp + 0x1ec], edx
mov ecx, 0x63
lea esi, [esp + 0x80]
lea edi, [esp + 0x210]
rep movsd dword es:[edi], dword [esi]
mov ecx, 0x63
lea esi, [esp + 0x80]
lea edi, [esp + 0x3a0]
rep movsd dword es:[edi], dword [esi]
mov ecx, 0x63
lea esi, [esp + 0x80]
lea edi, [esp + 0x530]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x4c]
mov eax, dword [ecx + 0x20]
mov esi, dword [esp + 0x2c]
mov dword [esi + 0x20], eax
mov dword [esp + 0x604], eax
mov dword [esp + 0x2e4], eax
mov eax, dword [ecx + 0x20]
xor ecx, ecx
mov dword [esi + 0x24], eax
mov dword [esp + 0x634], eax
mov dword [esp + 0x474], eax
mov dword [esp + 0x20], ecx
cmp dword [ebx + 0x14], ecx
jbe 0x1005f92e
mov edx, dword [0x10082b40]
mov eax, dword [0x10082b44]
mov dword [esp + 0x50], edx
mov dword [esp + 0x44], edx
xor edx, edx
mov dword [esp + 0x54], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x28], edx
cmp dword [ebx + 0x10], edx
jbe 0x1005f920
jmp 0x1005f4d4
mov edx, dword [esp + 0x28]
mov eax, dword [ebx + 0x10]
imul eax, ecx
mov ebx, dword [esi + 0x44]
mov esi, dword [esp + 0x68]
add eax, edx
imul eax, eax, 0x1b4
add ebx, eax
add eax, esi
push eax
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x30]
add eax, 0x38
push eax
mov eax, dword [esp + 0x68]
mov dword [ebx + 0xec], 0xffffffff
mov eax, dword [eax]
push eax
mov eax, dword [esp + 0x64]
mov eax, dword [eax]
push eax
mov eax, dword [esp + 0x88]
mov eax, dword [eax]
push eax
mov eax, dword [esp + 0x78]
push eax
mov eax, dword [esp + 0x94]
mov eax, dword [eax]
push eax
mov eax, dword [esp + 0x88]
mov eax, dword [eax]
push eax
mov eax, dword [esp + 0x90]
mov eax, dword [eax]
push eax
mov eax, dword [esp + 0x98]
push eax
push ecx
push edx
lea ecx, [esp + 0x3d0]
push ecx
lea edi, [esp + 0x564]
lea esi, [esp + 0x244]
lea edx, [esp + 0xb4]
call fcn.1005dca0
mov edx, dword [esp + 0x80]
add esp, 0x34
cmp dword [edx + 0x14], 3
je 0x1005f5c1
mov ecx, dword [esp + 0x30]
mov eax, 0x10
cmp dword [ecx + 0xec], eax
jne 0x1005f5c1
mov ecx, dword [0x10082b40]
mov edi, dword [esp + 0x28]
mov dword [ebx + 0xec], eax
mov eax, dword [0x10082b44]
mov dword [ebx + 0x160], ecx
mov dword [ebx + 0x164], eax
mov dword [ebx], ecx
mov dword [ebx + 4], eax
mov dword [ebx + 0x154], 0
jmp 0x1005f904
mov ecx, dword [esp + 0x30]
mov edi, dword [esp + 0x28]
lea edx, [esp + 0x80]
push edx
mov edx, dword [esp + 0x28]
lea eax, [esp + 0x20]
push eax
mov eax, dword [ebp + 0x14]
push ecx
mov ecx, dword [esp + 0x68]
push ebx
push edx
push eax
push ecx
mov ecx, dword [esp + 0x3c]
mov edx, edi
call fcn.1005e6b0
add esp, 0x1c
cmp dword [ebx + 0xec], 4
mov dword [esp + 0x40], eax
jne 0x1005f61a
mov edx, dword [esp + 0x1c]
mov dword [ebx + 0x154], edx
mov dword [ebx + 0x15c], 0
jmp 0x1005f904
mov eax, dword [esp + 0xb0]
mov ecx, dword [esp + 0xac]
mov esi, dword [esp + 0x2c]
push eax
push ecx
mov ecx, dword [esi + 0x20]
lea edx, [esp + 0x218]
push edx
mov edx, dword [esi + 0x10]
push 3
lea eax, [esp + 0x2c]
push eax
mov eax, dword [esp + 0x34]
push ebx
push ecx
mov ecx, dword [esp + 0x40]
push edx
push eax
push edi
lea eax, [esp + 0x6c]
call fcn.1005e010
mov ecx, dword [esp + 0xe0]
mov edx, dword [esp + 0xdc]
push ecx
push edx
mov edx, dword [esi + 0x24]
lea eax, [esp + 0x3d0]
push eax
mov eax, dword [esi + 0x10]
push 2
lea ecx, [esp + 0x54]
push ecx
mov ecx, dword [esp + 0x5c]
push ebx
push edx
push eax
push ecx
mov ecx, dword [esp + 0x70]
push edi
lea eax, [esp + 0xa0]
call fcn.1005e010
mov eax, dword [esi + 0x10]
mov edx, dword [esp + 0x6c]
add esp, 0x50
test eax, 0x10000000
je 0x1005f6ae
mov dword [esp + 0x34], edx
jmp 0x1005f6b8
mov ecx, edx
sar ecx, 1
add ecx, edx
mov dword [esp + 0x34], ecx
mov ecx, dword [esp + 0x34]
cmp dword [esp + 0x220], ecx
jg 0x1005f6e7
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x1c]
push edx
push ecx
push edi
mov edi, dword [esp + 0x30]
lea ecx, [esp + 0x21c]
call fcn.1005e1a0
mov edi, dword [esp + 0x34]
add esp, 0xc
mov edx, dword [esp + 0x34]
cmp dword [esp + 0x3b0], edx
jg 0x1005f719
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x1c]
push eax
mov eax, dword [esi + 0x10]
push ecx
push edi
mov edi, dword [esp + 0x30]
lea ecx, [esp + 0x3ac]
call fcn.1005e1a0
mov edi, dword [esp + 0x34]
add esp, 0xc
mov edx, dword [esp + 0x3c8]
mov eax, dword [esp + 0x3c4]
mov ecx, dword [esp + 0x238]
push edx
mov edx, dword [esp + 0x238]
push eax
push ecx
push edx
mov edx, dword [esp + 0x34]
lea eax, [esp + 0x540]
push eax
mov eax, dword [esp + 0x34]
lea ecx, [esp + 0x30]
push ecx
push edx
push eax
push edi
lea eax, [esp + 0x74]
lea ecx, [esp + 0x68]
call fcn.1005ea30
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x564]
mov edx, eax
sar edx, 3
add edx, eax
add esp, 0x24
cmp ecx, edx
jge 0x1005f780
test dword [esi + 0x10], 0x8000000
je 0x1005f784
cmp ecx, eax
jg 0x1005f7ab
mov ecx, dword [esp + 0x24]
mov edx, dword [esi + 0x10]
lea eax, [esp + 0x1c]
push eax
mov eax, dword [esp + 0x24]
push ecx
push edx
push eax
push edi
lea eax, [esp + 0x544]
call fcn.1005eb90
mov eax, dword [esp + 0x30]
add esp, 0x14
lea ecx, [eax + eax]
cmp dword [esp + 0x90], ecx
jg 0x1005f7ed
mov ecx, dword [esi + 0x10]
test ecx, 0x4000000
jne 0x1005f7c9
cmp eax, 0x2ee
jg 0x1005f7d0
cmp eax, 0x3e8
jle 0x1005f7ed
lea edx, [esp + 0x1c]
push edx
push ecx
mov ecx, dword [esp + 0x38]
lea eax, [esp + 0x88]
call fcn.1005e990
mov eax, dword [esp + 0x24]
add esp, 8
mov ecx, dword [esp + 0x1d8]
lea edx, [ecx + ecx*4]
mov ecx, dword [esp + 0x40]
add edx, edx
add edx, edx
add edx, edx
cmp ecx, edx
jae 0x1005f859
imul eax, eax, 0x64
inc ecx
xor edx, edx
div ecx
cmp eax, 0x32
jbe 0x1005f855
xor edi, edi
push ebx
lea esi, [esp + 0x84]
mov dword [esp + 0x114], edi
call fcn.1005e2c0
add esp, 4
cmp dword [ebx + 0xec], 4
jne 0x1005f84d
mov eax, dword [esp + 0x40]
mov dword [ebx + 0x15c], edi
mov edi, dword [esp + 0x28]
mov dword [ebx + 0x154], eax
jmp 0x1005f904
mov esi, dword [esp + 0x2c]
mov edi, dword [esp + 0x28]
mov eax, dword [esp + 0x1c]
test dword [esi + 0xc], 0x2000
je 0x1005f8ac
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
push eax
mov eax, dword [esi + 0x10]
push ecx
push edi
push edx
push eax
mov eax, dword [esp + 0x44]
lea ecx, [esp + 0x64]
push ecx
lea edx, [esp + 0x5c]
push edx
push eax
push ebx
lea ecx, [esp + 0x554]
push ecx
lea edx, [esp + 0x238]
push edx
lea eax, [esp + 0x3cc]
push eax
lea ecx, [esp + 0xb0]
push ecx
call fcn.10063c20
add esp, 0x34
jmp 0x1005f8e8
mov ecx, dword [esp + 0x30]
lea edx, [esp + 0x50]
push edx
lea eax, [esp + 0x48]
push eax
push ecx
lea edx, [esp + 0x53c]
push edx
lea eax, [esp + 0x220]
push eax
lea ecx, [esp + 0x3b4]
push ecx
mov ecx, ebx
lea edi, [esp + 0x98]
call fcn.1005edb0
mov edi, dword [esp + 0x40]
add esp, 0x18
mov edx, dword [esp + 0x158]
push edx
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0x40]
push ecx
mov eax, ebx
call fcn.1005f240
add esp, 0xc
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
mov esi, dword [esp + 0x2c]
inc edi
mov dword [esp + 0x28], edi
mov ebx, edx
cmp edi, dword [edx + 0x10]
jb 0x1005f4d0
inc ecx
mov dword [esp + 0x20], ecx
cmp ecx, dword [ebx + 0x14]
jb 0x1005f49f
mov eax, dword [esp + 0x38]
push eax
call fcn.10055310
mov ecx, dword [esp + 0x40]
push ecx
mov dword [esi + 0x20], eax
call fcn.10055310
mov ecx, dword [esp + 0x884]
add esp, 8
pop edi
mov dword [esi + 0x24], eax
pop esi
pop ebx
xor ecx, esp
call fcn.1000c146
mov esp, ebp
pop ebp
ret