Function at 0x51f450
Capabilities:
Access peb ldr_data
Get kernel32 base address
Get process heap force flags

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffe80
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x14], ebx
test dl, dl
je 0x51f47f
add esp, 0xfffffff0
call fcn.0040406c
mov edi, ecx
mov byte [ebp - 1], dl
mov ebx, eax
mov esi, dword [ebp + 0x10]
mov eax, dword [ebp + 0x20]
call fcn.00404fac
mov eax, dword [ebp + 0x1c]
call fcn.00404fac
mov eax, dword [ebp + 0x18]
call fcn.00404fac
xor eax, eax
push ebp
push 0x51f6a5
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebx + 0xc], esi
lea eax, [ebx + 0x10]
mov edx, dword [ebp + 0x20]
call fcn.00404b50
lea eax, [ebx + 0x14]
mov edx, dword [ebp + 0x1c]
call fcn.00404b50
lea eax, [ebx + 0x18]
mov edx, dword [ebp + 0x18]
call fcn.00404b50
mov eax, dword [ebx + 0x1c]
mov dword [ebx + 0x1c], eax
lea eax, [ebx + 0x34]
mov edx, 0x10
call fcn.004f6a54
lea eax, [ebx + 0x30]
mov edx, edi
call fcn.00404b50
mov eax, edi
call fcn.00404dbc
test eax, eax
jle 0x51f534
lea eax, [ebp - 0xc]
push eax
mov dword [ebp - 0x1c], edi
mov byte [ebp - 0x18], 0xb
lea edx, [ebp - 0x1c]
xor ecx, ecx
mov eax, 0x51f6d8
call fcn.004f9394
lea eax, [ebp - 0x20]
push eax
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
mov eax, dword [ebp - 0xc]
call fcn.004f9394
mov edx, dword [ebp - 0x20]
lea eax, [ebp - 0xc]
call fcn.00404b94
jmp 0x51f53c
lea eax, [ebp - 0xc]
call fcn.00404afc
mov eax, dword [ebp + 0x20]
call fcn.00404dbc
test eax, eax
jne 0x51f555
lea eax, [ebp + 0x20]
mov edx, 0x51f6f4
call fcn.00404b94
mov eax, dword [ebp + 0x1c]
call fcn.00404dbc
test eax, eax
jne 0x51f56e
lea eax, [ebp + 0x1c]
mov edx, 0x51f708
call fcn.00404b94
mov eax, dword [ebp + 0x18]
call fcn.00404dbc
test eax, eax
jne 0x51f587
lea eax, [ebp + 0x18]
mov edx, 0x51f71c
call fcn.00404b94
lea eax, [ebp - 0x10]
push eax
mov dword [ebp - 0x38], esi
mov byte [ebp - 0x34], 0
mov eax, esi
xor edx, edx
push edx
push eax
lea edx, [ebp - 0x3c]
mov eax, 1
call fcn.0040b22c
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x30], eax
mov byte [ebp - 0x2c], 0xb
lea ecx, [ebp - 0x40]
mov eax, dword [ebx]
mov edx, esi
call dword [eax + 0x10]
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x28], eax
mov byte [ebp - 0x24], 0xb
lea edx, [ebp - 0x38]
mov ecx, 2
mov eax, 0x51f730
call fcn.004f9394
lea eax, [ebp - 0x14]
call fcn.00404afc
lea eax, [ebp - 8]
push eax
lea edx, [ebp - 0x180]
mov eax, dword [ebx]
call fcn.00403c30
lea eax, [ebp - 0x180]
mov dword [ebp - 0x80], eax
mov byte [ebp - 0x7c], 4
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0x78], eax
mov byte [ebp - 0x74], 0xb
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x70], eax
mov byte [ebp - 0x6c], 0xb
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x68], eax
mov byte [ebp - 0x64], 0xb
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x60], eax
mov byte [ebp - 0x5c], 0
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x58], eax
mov byte [ebp - 0x54], 0xb
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x50], eax
mov byte [ebp - 0x4c], 0xb
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x48], eax
mov byte [ebp - 0x44], 0xb
lea edx, [ebp - 0x80]
mov ecx, 7
mov eax, 0x51f778
call fcn.004f9394
mov ecx, dword [ebp - 8]
xor edx, edx
mov eax, ebx
call fcn.0040f13c
mov dl, 4
mov eax, ebx
call fcn.0051f294
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51f6ac
lea eax, [ebp - 0x40]
mov edx, 2
call fcn.00404b20
lea eax, [ebp - 0x20]
call fcn.00404afc
lea eax, [ebp - 0x14]
mov edx, 4
call fcn.00404b20
lea eax, [ebp + 0x18]
mov edx, 3
call fcn.00404b20
ret