Function at 0x10037ed
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 0x1003e69
mov eax, edi
test byte [eax + 8], 1
mov edi, dword [edi + 4]
mov dword [ebp - 4], eax
jne 0x1003808
mov ecx, dword [eax + 0xc]
test ecx, ecx
je 0x1003b4c
push 1
push dword [ebp + 8]
push dword [ebp + 0xc]
push ecx
call fcn.010039ea
test eax, eax
jne 0x1003b49
mov esi, dword [ebp - 4]
mov dword [ebp - 8], 1
test esi, esi
je 0x100387e
cmp dword [ebp - 8], 0
je 0x1003f76
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 0x1003808
mov esi, eax
jmp 0x1003808
mov ax, word [0x10382a4]
cmp ax, word [0x10382a6]
jge 0x1003849
lea eax, [ebp - 8]
push eax
movsx eax, word [0x10382a8]
push 4
pop ecx
mul ecx
push edx
push eax
call fcn.01004ee2
test eax, eax
jl 0x1003f6f
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 8]
push 0x28
call fcn.01004f0f
test eax, eax
jl 0x1003f6f
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 0x1003f6f
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 0x100bc9a
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 0x100387e
xor eax, eax
jmp 0x1003880
mov eax, dword [esi + 0xc]
mov edi, dword [sym.imp.ntdll.dll_RtlFreeHeap]
test eax, eax
je 0x1003f94
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 0x100bcb3
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 0x100bcd7
push dword [ebp + 8]
push dword [ebp + 0xc]
push eax
call dword [sym.imp.msvcrt.dll_memmove]
add esp, 0xc
jmp 0x1003857
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 0x1003f6f
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 0x1003f9a
and dword [esi + 8], 0xfffffffe
jmp 0x1003f6f