Function at 0x1003ac5
Capabilities:
Access peb ldr_data

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
xor esi, esi
and dword [ebp - 8], esi
push edi
mov edi, dword [0x1038298]
mov ebx, 0x1038294
cmp edi, ebx
je 0x1003f99
mov eax, edi
test byte [eax + 8], 1
mov edi, dword [edi + 4]
mov dword [ebp - 4], eax
jne 0x1003ae0
mov ecx, dword [eax + 0xc]
test ecx, ecx
je 0x1003cc4
push 1
push dword [ebp + 8]
push dword [ebp + 0xc]
push ecx
call fcn.01003a83
test eax, eax
jne 0x1003cc1
mov esi, dword [ebp - 4]
mov dword [ebp - 8], 1
test esi, esi
je 0x1003b56
cmp dword [ebp - 8], 0
je 0x10040a6
mov eax, dword [ebp + 0x10]
mov ecx, dword [esi + 4]
or dword [esi + 8], 1
mov dword [esi + 0x1c], eax
mov eax, dword [esi]
mov dword [ecx], eax
mov dword [eax + 4], ecx
mov eax, dword [0x1038294]
mov dword [esi], eax
mov dword [esi + 4], ebx
mov dword [eax + 4], esi
mov dword [0x1038294], esi
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret 0xc
mov eax, dword [ebp - 4]
test esi, esi
jne 0x1003ae0
mov esi, eax
jmp 0x1003ae0
mov ax, word [0x10382a4]
cmp ax, word [0x10382a6]
jge 0x1003b21
lea eax, [ebp - 8]
push eax
movsx eax, word [0x10382a8]
push 4
pop ecx
mul ecx
push edx
push eax
call fcn.01005077
test eax, eax
jl 0x100409f
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 8]
push 0x28
call fcn.010050a4
test eax, eax
jl 0x100409f
mov eax, dword fs:[0x18]
mov ecx, dword [0x1038030]
push dword [ebp - 0xc]
mov eax, dword [eax + 0x30]
mov edi, dword [sym.imp.ntdll.dll_RtlAllocateHeap]
add ecx, 0xc0000
push ecx
push dword [eax + 0x18]
call edi
mov esi, eax
test esi, esi
je 0x100409f
mov ecx, dword [0x1038030]
push dword [ebp + 8]
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
add ecx, 0xc0000
push ecx
push dword [eax + 0x18]
call edi
mov dword [esi + 0xc], eax
test eax, eax
je 0x100bf9e
push dword [ebp + 8]
push dword [ebp + 0xc]
push eax
call dword [sym.imp.msvcrt.dll_memmove]
xor eax, eax
mov word [esi + 0x10], ax
or eax, 0xffffffff
mov word [esi + 0x12], ax
or eax, eax
mov word [esi + 0x14], ax
xor eax, eax
mov word [esi + 0x16], ax
mov dword [esi + 8], 1
mov ax, word [0x10382a8]
mov word [esi + 0x18], ax
mov eax, dword [0x1038294]
mov dword [esi], eax
mov dword [esi + 4], ebx
mov dword [eax + 4], esi
mov eax, dword [ebp + 0x10]
mov dword [0x1038294], esi
add esp, 0xc
inc word [0x10382a4]
mov dword [esi + 0x1c], eax
lea eax, [esi + 0x20]
mov dword [eax + 4], eax
mov dword [eax], eax
jmp 0x1003b56
xor eax, eax
jmp 0x1003b58
mov eax, dword [esi + 0xc]
mov edi, dword [sym.imp.ntdll.dll_RtlFreeHeap]
test eax, eax
je 0x10040c4
push eax
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push 0
push dword [eax + 0x18]
call edi
and dword [ebp - 4], 0
xor eax, eax
cmp ax, word [esi + 0x10]
jl 0x100bfb7
push dword [ebp + 8]
xor eax, eax
mov word [esi + 0x10], ax
or eax, 0xffffffff
mov word [esi + 0x12], ax
or eax, eax
mov word [esi + 0x14], ax
xor eax, eax
mov word [esi + 0x16], ax
mov ecx, dword [0x1038030]
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
add ecx, 0xc0000
push ecx
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov dword [esi + 0xc], eax
test eax, eax
je 0x100bfdb
push dword [ebp + 8]
push dword [ebp + 0xc]
push eax
call dword [sym.imp.msvcrt.dll_memmove]
add esp, 0xc
jmp 0x1003b2f
push esi
push eax
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
jmp 0x100409f
movsx eax, word [ebp - 4]
push dword [esi + eax*4 + 0x28]
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push 0
push dword [eax + 0x18]
call edi
inc dword [ebp - 4]
mov ax, word [ebp - 4]
jmp 0x10040ca
and dword [esi + 8], 0xfffffffe
jmp 0x100409f