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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xdc
mov eax, dword [0x100160f0]
xor eax, esp
mov dword [esp + 0xd8], eax
push ebx
push esi
push edi
mov dword [esp + 0x40], ecx
mov eax, dword [0x1001600c]
mov edi, 0x1001600c
cmp eax, edi
je 0x1000589c
test byte [eax + 0x1c], 4
je 0x1000589c
cmp byte [eax + 0x19], 5
jb 0x1000589c
push dword [eax + 0x14]
mov edx, 0x100023c4
push dword [eax + 0x10]
push 0x35
pop ecx
call fcn.1000388c
mov eax, dword [0x1001600c]
mov ebx, dword [ebp + 8]
and dword [esp + 0x30], 0
mov esi, dword [ebx + 4]
mov edx, dword [ebx]
mov dword [esp + 0x6c], esi
mov dword [esp + 0x10], edx
cmp eax, edi
je 0x100058d5
test byte [eax + 0x1c], 4
je 0x100058d5
cmp byte [eax + 0x19], 5
jb 0x100058d5
push edx
push esi
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0x36
pop ecx
call fcn.1000397e
mov edx, dword [esp + 0x10]
mov ecx, dword [esi + 0xc]
cmp dword [ecx + 0x18], 1
jne 0x10005c22
lea esi, [ebx + 0x14]
mov eax, dword [esi]
cmp eax, dword [ebx + 0x1c]
ja 0x10005c22
mov eax, dword [ebx + 0x18]
cmp eax, dword [ebx + 0x20]
ja 0x10005c22
mov eax, dword [ebx + 0x24]
cmp eax, dword [ebx + 0x28]
ja 0x10005c22
mov eax, dword [edx + 0xc]
lea edi, [esp + 0x54]
mov ecx, dword [ecx + 0x24]
mov edx, ecx
mov dword [esp + 0x50], ecx
push 6
sub edx, dword [eax + 0x24]
mov eax, dword [ebx + 8]
mov dword [esp + 0x30], eax
mov eax, dword [ebx + 0xc]
pop ecx
mov dword [esp + 0x14], eax
mov eax, dword [ebx + 0x10]
mov dword [esp + 0x4c], edx
rep movsd dword es:[edi], dword [esi]
mov dword [esp + 0x18], eax
je 0x1000596c
mov ebx, edx
sub esp, 0x18
lea eax, [esp + 0xc8]
lea esi, [esp + 0x6c]
push 6
pop ecx
mov edi, esp
rep movsd dword es:[edi], dword [esi]
push eax
call fcn.10010481
lea edi, [esp + 0x54]
mov esi, eax
push 6
pop ecx
rep movsd dword es:[edi], dword [esi]
sub ebx, 1
jne 0x1000593d
mov edx, dword [esp + 0x4c]
cmp edx, dword [esp + 0x50]
jae 0x10005c1a
and dword [esp + 0x1c], 0
imul esi, edx, 0x50
xor edx, edx
mov dword [esp + 0x44], edx
mov dword [esp + 0x48], esi
mov eax, dword [esp + 0x6c]
mov ebx, dword [esp + 0x10]
push 0x30
push 0
mov edi, dword [eax + 0xc]
mov eax, dword [esp + 0x64]
sub eax, dword [esp + 0x5c]
mov ebx, dword [ebx + 0xc]
mov dword [esp + 0x3c], eax
add ebx, edx
mov eax, dword [esp + 0x68]
sub eax, dword [esp + 0x60]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x70]
sub eax, dword [esp + 0x6c]
mov dword [esp + 0x30], eax
lea eax, [esp + 0x7c]
push eax
call sub.msvcrt.dll_memset
mov eax, dword [esp + 0x1c]
add esp, 0xc
mov ecx, dword [esp + 0xa0]
mov dword [esp + 0x74], eax
or ecx, 2
test byte [edi + 0x14], 3
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x78], eax
jne 0x10005a3b
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x80], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x8c], eax
mov eax, dword [esp + 0x34]
add eax, edx
mov dword [esp + 0x7c], edx
mov dword [esp + 0x84], eax
mov eax, dword [esp + 0xc]
add eax, dword [esp + 0x14]
mov dword [esp + 0x88], eax
mov eax, dword [esp + 0x28]
add eax, dword [esp + 0x18]
or ecx, 0x40
mov dword [esp + 0x90], eax
jmp 0x10005a51
and dword [esp + 0x7c], 0
or ecx, 0x10
mov eax, dword [esi + edi + 0xe0]
mov dword [esp + 0x80], eax
lea eax, [esp + 0x74]
mov dword [esp + 0xa0], ecx
mov ecx, dword [esp + 0x40]
push eax
call fcn.10006b73
test eax, eax
js 0x10005c16
test byte [esp + 0xa0], 0x40
je 0x10005b4b
mov ecx, dword [esi + edi + 0xdc]
imul ecx, dword [esp + 0x64]
mov eax, dword [esi + edi + 0xd8]
mov edx, dword [edi + 0x2c]
imul eax, dword [esp + 0x58]
mov dword [esp + 0x70], edx
imul edx, dword [esp + 0x54]
add ecx, eax
add ecx, edx
xor edx, edx
add ecx, dword [esi + edi + 0xe8]
mov dword [esp + 0x30], ecx
mov dword [esp + 0x24], edx
cmp dword [esp + 0x28], edx
jbe 0x10005b7a
mov ecx, dword [esp + 0x94]
mov ebx, dword [esp + 0xc]
mov dword [esp + 0x3c], ecx
xor eax, eax
mov dword [esp + 0x38], eax
test ebx, ebx
je 0x10005b33
mov ebx, dword [esp + 0x70]
imul ebx, dword [esp + 0x34]
mov dword [esp + 0x20], ecx
mov ecx, dword [esi + edi + 0xd8]
imul ecx, eax
mov eax, dword [esi + edi + 0xdc]
imul eax, edx
push ebx
add ecx, dword [esp + 0x34]
add eax, ecx
push eax
push dword [esp + 0x28]
call sub.msvcrt.dll_memcpy
mov eax, dword [esp + 0x44]
add esp, 0xc
mov ecx, dword [esp + 0x98]
inc eax
add dword [esp + 0x20], ecx
mov edx, dword [esp + 0x24]
mov dword [esp + 0x38], eax
cmp eax, dword [esp + 0xc]
jb 0x10005ae5
mov ecx, dword [esp + 0x3c]
mov ebx, dword [esp + 0xc]
add ecx, dword [esp + 0x9c]
inc edx
mov dword [esp + 0x24], edx
mov dword [esp + 0x3c], ecx
cmp edx, dword [esp + 0x28]
jb 0x10005ace
jmp 0x10005b7a
mov ecx, dword [esi + edi + 0xe8]
add ecx, dword [esp + 0x7c]
mov eax, dword [esi + edi + 0xe0]
mov edx, dword [ebx + 0xe0]
cmp eax, edx
jb 0x10005b69
mov eax, edx
push eax
push ecx
push dword [esp + 0x9c]
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov ecx, dword [esp + 0x40]
lea edi, [esp + 0xa4]
xor eax, eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0xa4], eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0xa8], eax
lea eax, [esp + 0xa4]
push eax
call fcn.10006fd4
mov ebx, eax
test ebx, ebx
js 0x10005c1e
sub esp, 0x18
lea eax, [esp + 0xe0]
lea esi, [esp + 0x6c]
push 6
pop ecx
mov edi, esp
rep movsd dword es:[edi], dword [esi]
push eax
call fcn.10010481
shr dword [esp + 0x2c], 1
lea edi, [esp + 0x54]
shr dword [esp + 0x14], 1
mov esi, eax
shr dword [esp + 0x18], 1
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 0x4c]
add edx, 0x50
push 6
pop ecx
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x1c]
mov esi, dword [esp + 0x48]
inc ecx
add esi, 0x50
mov dword [esp + 0x1c], ecx
add eax, ecx
mov dword [esp + 0x44], edx
mov dword [esp + 0x48], esi
cmp eax, dword [esp + 0x50]
jb 0x10005988
jmp 0x10005c1e
xor ebx, ebx
jmp 0x10005c1e
mov ebx, dword [esp + 0x30]
mov eax, ebx
jmp 0x10005c27
mov eax, 0x80004005
mov ecx, dword [esp + 0xe4]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.10011950
mov esp, ebp
pop ebp
ret 4