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

Disassembly:
sub esp, 0x5c
push ebx
push esi
push edi
xor ebx, ebx
mov dword [esp + 0xc], ebx
push ebp
mov dword [esp + 0x18], ebx
push 0x10042790
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebp, dword [esp + 0x70]
mov eax, dword [esp + 0x78]
inc dword [0x1003e84c]
mov esi, dword [ebp]
mov edi, dword [eax]
add edi, eax
xor eax, eax
mov ax, word [edi + 0x10]
lea eax, [eax + edi + 0x12]
add eax, 4
test byte [ebp + 9], 4
mov ecx, dword [eax - 4]
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], ecx
je 0x1000b0e5
mov eax, dword [ebp + 0x24]
test eax, eax
je 0x1000b0e5
mov edx, dword [esp + 0x20]
mov dword [ebp + 0x38], ebx
mov dword [ebp + 0x3c], ebx
mov dword [ebp + 0x1c], ecx
mov dword [ebp + 0x18], edx
mov dword [ebp + 0x30], ebx
mov dword [ebp + 0x34], ebx
mov dword [esp + 0x10], eax
jmp 0x1000b423
cmp dword [esi + 0x94], 0
jne 0x1000b10d
mov eax, dword [esp + 0x74]
push eax
push esi
call fcn.1000aed0
add esp, 8
test eax, eax
je 0x1000b10d
mov dword [esp + 0x18], 1
jmp 0x1000b423
mov ax, word [edi + 0xe]
xor ecx, ecx
mov cx, word [edi + 2]
shr ax, 3
movzx edx, ax
imul ecx, edx
lea edx, [esp + 0x3c]
mov eax, dword [edi]
imul ecx, dword [edi + 4]
mov dword [edx], eax
mov ebx, dword [edi + 4]
mov dword [edx + 4], ebx
mov eax, dword [edi + 8]
mov dword [edx + 8], eax
xor eax, eax
mov ebx, dword [edi + 0xc]
mov dword [edx + 0xc], ebx
mov word [esp + 0x4c], 0
mov ebx, 0x64
mov dword [esp + 0x44], ecx
shl ecx, 3
mov ax, word [edi + 0xe]
lea edx, [ecx + ecx*2]
mov ecx, 6
mov dword [ebp + 0xc], eax
lea eax, [edx + edx*4]
sub edx, edx
div ebx
sub edx, edx
div ecx
mov dword [ebp + 0x2c], eax
lea edx, [eax + eax*2]
lea eax, [esp + 0x54]
lea edi, [edx*2]
mov dword [ebp + 0x28], edi
mov dword [eax], 0
mov dword [eax + 4], 0
mov dword [eax + 8], 0
mov dword [eax + 0xc], 0
mov dword [eax + 0x10], 0
mov dword [esp + 0x54], 0x14
mov dword [esp + 0x58], 0xe0
test byte [esi + 0x1e], 4
je 0x1000b1c2
mov dword [esp + 0x58], 0x40e0
lea eax, [esp + 0x3c]
push 0
lea edx, [esp + 0x14]
mov dword [esp + 0x60], edi
mov dword [esp + 0x68], eax
push edx
mov ecx, dword [esi + 0x94]
lea eax, [esp + 0x5c]
mov ebx, dword [ecx]
push eax
push ecx
call dword [ebx + 0xc]
test eax, eax
je 0x1000b1f7
mov dword [esp + 0x18], 1
jmp 0x1000b423
xor ebx, ebx
lea eax, [esp + 0x28]
mov dword [ebp + 0x38], ebx
mov dword [ebp + 0x3c], ebx
push ebx
mov dword [eax], ebx
lea ecx, [esp + 0x2c]
push 0x12
push ecx
mov dword [eax + 4], ebx
mov dword [eax + 8], ebx
mov dword [eax + 0xc], ebx
mov word [eax + 0x10], bx
mov eax, dword [esi + 0x98]
push eax
mov eax, dword [eax]
call dword [eax + 0x14]
test eax, eax
jne 0x1000b2bd
mov ax, word [esp + 0x36]
cmp word [esp + 0x4a], ax
jbe 0x1000b249
mov ax, word [esp + 0x4a]
mov ebx, 1
mov word [esp + 0x36], ax
mov eax, dword [esp + 0x2c]
cmp dword [esp + 0x40], eax
jbe 0x1000b260
mov eax, dword [esp + 0x40]
mov ebx, 1
mov dword [esp + 0x2c], eax
mov ax, word [esp + 0x2a]
cmp word [esp + 0x3e], ax
jbe 0x1000b27b
mov ax, word [esp + 0x3e]
mov ebx, 1
mov word [esp + 0x2a], ax
test ebx, ebx
je 0x1000b2bd
mov ax, word [esp + 0x36]
shr ax, 3
mov cx, word [esp + 0x2a]
imul cx, ax
mov word [esp + 0x34], cx
xor ecx, ecx
movzx eax, ax
mov cx, word [esp + 0x2a]
lea edx, [esp + 0x28]
imul ecx, eax
imul ecx, dword [esp + 0x2c]
mov dword [esp + 0x30], ecx
push edx
mov eax, dword [esi + 0x98]
push eax
mov ebx, dword [eax]
call dword [ebx + 0x38]
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x68]
push 0
push edx
mov dword [ebp + 0x1c], ecx
lea ecx, [esp + 0x58]
lea edx, [esp + 0x2c]
push ecx
mov dword [ebp + 0x18], eax
lea eax, [esp + 0x20]
mov ecx, dword [esp + 0x1c]
push eax
push edx
push edi
mov eax, dword [ecx]
push 0
push ecx
call dword [eax + 0x2c]
test eax, eax
je 0x1000b309
mov eax, dword [esp + 0x10]
push eax
mov ebx, dword [eax]
call dword [ebx + 8]
mov dword [esp + 0x18], 0xffffffff
jmp 0x1000b423
cmp dword [esp + 0x14], 0
je 0x1000b3e5
mov ebx, dword [ebp + 0x1c]
mov eax, dword [esp + 0x14]
cmp ebx, eax
jb 0x1000b321
mov ebx, eax
mov edi, dword [esp + 0x24]
mov esi, dword [ebp + 0x18]
mov ecx, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
add dword [ebp + 0x18], ebx
sub dword [ebp + 0x1c], ebx
cmp ebx, dword [esp + 0x14]
jae 0x1000b3e5
cmp dword [ebp + 0x20], 1
jbe 0x1000b39c
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x14]
add eax, ebx
mov ecx, dword [esp + 0x20]
sub dword [esp + 0x14], ebx
mov dword [ebp + 0x18], ecx
mov ebx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x14]
mov dword [ebp + 0x1c], ebx
cmp ebx, ecx
jb 0x1000b372
mov ebx, ecx
test ebx, ebx
je 0x1000b390
mov edi, eax
mov esi, dword [esp + 0x20]
mov ecx, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
add dword [ebp + 0x18], ebx
sub dword [ebp + 0x1c], ebx
cmp ebx, dword [esp + 0x14]
jb 0x1000b354
mov dword [esp + 0x14], edx
jmp 0x1000b3e5
mov eax, ebx
sub edx, edx
div dword [ebp + 0x2c]
mov edx, dword [esp + 0x14]
mov dword [ebp + 0x3c], eax
sub edx, ebx
mov eax, dword [ebp + 0xc]
mov dword [ebp + 0x38], 1
sub eax, 8
cmp eax, 1
sbb eax, eax
and eax, 0x80
mov edi, dword [esp + 0x24]
mov cl, al
add edi, ebx
mov ch, cl
mov cl, al
mov eax, ecx
shl eax, 0x10
mov ax, cx
mov ecx, edx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
xor esi, esi
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x14]
push esi
mov edx, dword [esp + 0x28]
push eax
mov eax, dword [esp + 0x18]
push ecx
mov ebx, dword [eax]
push edx
push eax
call dword [ebx + 0x4c]
push 1
mov dword [ebp + 0x30], esi
mov ecx, dword [esp + 0x14]
push esi
push esi
mov dword [ebp + 0x34], esi
mov dword [ebp + 0x40], 4
or dword [ebp + 8], 0x100
push ecx
mov eax, dword [ecx]
call dword [eax + 0x30]
cmp dword [esp + 0x18], 0
jne 0x1000b431
mov eax, dword [esp + 0x10]
mov dword [ebp + 0x24], eax
push 0x10042790
dec dword [0x1003e84c]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [esp + 0x18]
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x5c
ret 0xc