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

Disassembly:
sub esp, 0x54
push ebx
mov ebx, dword [esp + 0x6c]
lea eax, [esp + 4]
push ebp
push esi
push 0x100
push dword [ebx]
xor ebp, ebp
mov dword [esp + 0x1c], 0
push 0x4000
push eax
mov dword [esp + 0x1c], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x20], ebp
call fcn.1002a6e0
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x100056e6
push 0x100
push dword [ebx]
lea eax, [esp + 0x20]
push 0x2000
push eax
call fcn.1002a6e0
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x100056e6
push 0x100
push dword [ebx]
lea eax, [esp + 0x18]
push 0x4000
push eax
call fcn.1002a6e0
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x100056e6
push 0x4000
push eax
push dword [esp + 0x18]
call sub.MSVCR120.dll_memset
push dword [ebx]
lea eax, [esp + 0x58]
push eax
call fcn.1000e2d0
push dword [ebx]
lea eax, [esp + 0x48]
push eax
call fcn.1000e2d0
mov ecx, dword [esp + 0x84]
add esp, 0x1c
cmp dword [ecx + 8], ebp
jbe 0x1000545f
mov eax, dword [ecx + 4]
test byte [eax], 1
jne 0x10005478
push ebx
push dword [esp + 0x74]
push ecx
push ecx
call fcn.1000edc0
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x100056e6
mov eax, dword [esp + 0x70]
push ebx
push eax
push eax
call fcn.1000ef60
mov esi, eax
add esp, 0xc
mov dword [esp + 0x1c], esi
test esi, esi
jne 0x100056e6
mov ebx, dword [esp + 0x64]
push edi
mov edi, 1
cmp dword [ebx + 0xc], edi
jle 0x100054d6
mov ebp, dword [esp + 0x6c]
mov esi, dword [esp + 0x78]
lea esp, [esp]
mov eax, dword [ebx + 4]
push esi
movzx eax, word [eax + edi*2]
push eax
mov eax, dword [esp + 0x18]
push ebp
lea eax, [eax + edi*4]
push eax
call fcn.10040f61
inc edi
add esp, 0x10
cmp edi, dword [ebx + 0xc]
jl 0x100054b0
mov esi, dword [esp + 0x20]
xor ebp, ebp
mov edx, dword [ebx + 0xc]
xor eax, eax
lea ecx, [eax + 1]
cmp edx, ecx
jle 0x100054f9
mov edi, dword [esp + 0x10]
test eax, eax
jne 0x1000553b
cmp dword [edi + ecx*4], eax
sete al
inc ecx
cmp ecx, edx
jl 0x100054e6
test eax, eax
jne 0x1000553b
push dword [esp + 0x78]
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x3c]
push eax
lea eax, [esp + 0x58]
push eax
push dword [esp + 0x80]
push dword [esp + 0x80]
push ebx
call fcn.10005730
mov esi, eax
mov dword [esp + 0x3c], eax
add esp, 0x1c
test esi, esi
jne 0x100056e1
cmp dword [esp + 0x18], eax
jne 0x100056e1
mov ecx, 1
mov dword [esp + 0x24], ecx
cmp dword [ebx + 0xc], ecx
jle 0x100055b8
mov esi, dword [esp + 0x74]
lea ecx, [ecx]
mov eax, dword [ebx + 4]
xorps xmm0, xmm0
mov edi, dword [esi + 8]
dec edi
movlpd qword [esp + 0x2c], xmm0
movzx ebp, word [eax + ecx*2]
mov eax, dword [esp + 0x14]
lea eax, [eax + ecx*4]
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x28], eax
js 0x100055a2
mov eax, dword [esi + 4]
lea ebx, [eax + edi*4]
jmp 0x10005580
push 0
push ebp
xor eax, eax
or eax, dword [ebx]
push ecx
push eax
call fcn.1002be10
dec edi
mov dword [esp + 0x30], edx
mov ecx, eax
lea ebx, [ebx - 4]
jns 0x10005580
mov ebx, dword [esp + 0x68]
mov eax, dword [esp + 0x28]
mov dword [eax], ecx
mov ecx, dword [esp + 0x24]
inc ecx
mov dword [esp + 0x24], ecx
cmp ecx, dword [ebx + 0xc]
jl 0x10005550
mov esi, dword [esp + 0x20]
xor ebp, ebp
push 0x2000
push 0
push dword [esp + 0x24]
call sub.MSVCR120.dll_memset
add esp, 0xc
cmp dword [esp + 0x18], 0
jne 0x100056e1
jmp 0x100055e0
push dword [esp + 0x78]
mov eax, dword [esp + 0x70]
push dword [esp + 0x78]
push eax
push eax
call fcn.1000edc0
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x100056e1
mov ecx, 1
inc ebp
cmp dword [ebx + 0xc], ecx
jle 0x100056a7
mov esi, dword [esp + 0x10]
test bp, bp
jne 0x10005634
lea ebx, [ecx*4]
cmp dword [ebx + esi], 0
jne 0x10005634
mov eax, dword [esp + 0x14]
mov eax, dword [ebx + eax]
shl eax, 0x10
mov dword [ebx + esi], eax
jmp 0x10005653
mov eax, dword [esp + 0x1c]
lea ebx, [ecx*4]
movzx edx, bp
movzx eax, word [eax + ecx*2]
sub edx, eax
mov eax, dword [esp + 0x14]
imul edx, dword [ebx + eax]
add dword [ebx + esi], edx
mov eax, dword [esp + 0x68]
xor edx, edx
mov edi, dword [esp + 0x10]
mov eax, dword [eax + 4]
movzx esi, word [eax + ecx*2]
mov eax, dword [edi + ebx]
div esi
mov dword [edi + ebx], edx
mov eax, dword [esp + 0x1c]
mov word [eax + ecx*2], bp
xor eax, eax
mov esi, dword [esp + 0x10]
cmp dword [ebx + esi], eax
sete al
test bp, bp
je 0x10005691
mov ebx, dword [esp + 0x68]
test eax, eax
jne 0x100055e0
mov ebx, dword [esp + 0x68]
inc ecx
cmp ecx, dword [ebx + 0xc]
jl 0x10005613
test eax, eax
jne 0x100055e0
push dword [esp + 0x78]
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x3c]
push eax
lea eax, [esp + 0x58]
push eax
push dword [esp + 0x80]
push dword [esp + 0x80]
push ebx
call fcn.10005730
mov esi, eax
add esp, 0x1c
test esi, esi
jne 0x100056e1
cmp dword [esp + 0x18], eax
je 0x100055e0
mov ebx, dword [esp + 0x78]
pop edi
push dword [ebx]
push dword [esp + 0x10]
call fcn.1002a6f0
push dword [ebx]
push dword [esp + 0x24]
call fcn.1002a6f0
push dword [ebx]
push dword [esp + 0x24]
call fcn.1002a6f0
lea eax, [esp + 0x48]
push 0
push eax
call fcn.1000e240
lea eax, [esp + 0x68]
push 0
push eax
call fcn.1000e240
add esp, 0x28
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret