Function at 0x51078254
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd4
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x2c], ebx
mov ebx, dword [ebp + 0x20]
mov esi, dword [ebp + 0x1c]
test esi, esi
js 0x51078273
mov edi, dword [ebx + esi*4]
dec esi
push edi
jns 0x5107826c
mov dword [ebp + 0x20], esp
mov ebx, dword [ebp + 0x28]
mov esi, dword [ebp + 0x24]
test esi, esi
js 0x51078287
mov edi, dword [ebx + esi*4]
dec esi
push edi
jns 0x51078280
mov dword [ebp + 0x28], esp
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov ebx, dword [ebp + 8]
mov eax, dword [ebp - 4]
call fcn.510049e0
mov eax, dword [ebp - 8]
call fcn.510049e0
mov eax, dword [ebp - 0xc]
call fcn.510049e0
mov ecx, dword [ebp + 0x24]
inc ecx
mov eax, dword [ebp + 0x28]
mov edx, dword [0x51001080]
call fcn.51005168
mov ecx, dword [ebp + 0x1c]
inc ecx
mov eax, dword [ebp + 0x20]
mov edx, dword [0x51001080]
call fcn.51005168
mov eax, dword [ebp + 0x10]
call fcn.510049e0
mov eax, dword [ebp + 0xc]
call fcn.510049e0
xor eax, eax
push ebp
push 0x51078520
push dword fs:[eax]
mov dword fs:[eax], esp
mov dl, 1
mov eax, dword [0x51078108]
call fcn.510785b4
mov dword [ebp - 0x14], eax
xor edx, edx
push ebp
push 0x510784c5
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [0x5107d928]
mov eax, dword [eax]
mov eax, dword [eax + 0x30]
mov edx, dword [ebp - 0x14]
mov dword [edx + 0x3c], eax
mov eax, dword [ebp - 0x14]
add eax, 0x14
mov edx, dword [ebp - 4]
call fcn.51004d7c
mov eax, dword [ebp - 0x14]
add eax, 0x18
mov edx, dword [ebp - 8]
call fcn.51004d7c
mov eax, dword [ebp - 0x14]
add eax, 0x1c
mov edx, dword [ebp - 0xc]
call fcn.51004d7c
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp + 0x30]
mov dword [eax + 0x48], edx
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp + 0x14]
mov dword [eax + 0xc], edx
mov eax, dword [ebp - 0x14]
mov dword [eax + 0x44], 8
test ebx, ebx
jle 0x5107836d
mov eax, dword [ebp - 0x14]
mov dword [eax + 0x54], ebx
cmp byte [0x5107f020], 0
je 0x51078384
mov byte [0x5107f020], 0
mov eax, dword [ebp - 0x14]
or dword [eax + 0x44], 0x40
cmp dword [ebp + 0x10], 0
je 0x510783b8
mov eax, dword [ebp - 0x14]
add eax, 0x2c
mov edx, 0x51078540
call fcn.51004c6c
mov eax, dword [ebp - 0x14]
add eax, 0x28
mov edx, 0x51078568
call fcn.51004c6c
mov eax, dword [ebp - 0x14]
add eax, 0x24
mov edx, dword [ebp + 0x10]
call fcn.51004d7c
cmp dword [ebp + 0x24], 0
jl 0x510783f1
mov eax, dword [ebp - 0x14]
or dword [eax + 0x44], 0x10
mov ebx, dword [ebp + 0x24]
test ebx, ebx
jl 0x510783f1
inc ebx
xor edi, edi
mov esi, dword [ebp + 0x28]
lea eax, [ebp - 0x2c]
mov edx, dword [esi]
call fcn.51004d7c
lea edx, [edi + 0xb]
mov ecx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x14]
call fcn.51078700
inc edi
add esi, 4
dec ebx
jne 0x510783d2
cmp dword [ebp + 0x1c], 0
jl 0x51078423
mov ebx, dword [ebp + 0x1c]
test ebx, ebx
jl 0x51078423
inc ebx
xor edi, edi
mov esi, dword [ebp + 0x20]
lea eax, [ebp - 0x2c]
mov edx, dword [esi]
call fcn.51004d7c
lea edx, [edi + 1]
mov ecx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x14]
call fcn.51078780
inc edi
add esi, 4
dec ebx
jne 0x51078404
mov eax, dword [ebp + 0x2c]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x24]
mov dword [eax + 0x34], edx
mov eax, dword [ebp - 0x14]
mov dword [eax + 0x4c], 0x510781e0
mov eax, dword [ebp - 0x14]
xor edx, edx
mov dword [eax + 0x50], edx
mov eax, dword [ebp - 0x14]
or dword [eax + 0x44], 1
cmp dword [ebp + 0xc], 0
je 0x5107845f
mov eax, dword [ebp - 0x14]
add eax, 0x30
mov edx, dword [ebp + 0xc]
call fcn.51004d7c
mov dword [ebp - 0x28], 0xfffc
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x28]
mov dword [eax + 0x38], edx
lea eax, [ebp - 0x1d]
push eax
lea ecx, [ebp - 0x1c]
lea edx, [ebp - 0x18]
mov eax, dword [ebp - 0x14]
call fcn.51078800
inc eax
jne 0x510784a1
push 0
mov ecx, 0x5107858c
mov edx, 0x51078594
mov eax, dword [0x5107d928]
mov eax, dword [eax]
call fcn.5103ebb0
call fcn.5100c2b8
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0x18]
mov edx, dword [ebp - 0x1c]
mov dword [eax], edx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x510784cc
mov eax, dword [ebp - 0x14]
call fcn.51003750
ret