Function at 0x512f50
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
push 0xffffffffffffffff
push 0x5f5871
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xec
push ebx
push ebp
push esi
push edi
mov edi, ecx
lea ecx, [esp + 0x14]
mov dword [esp + 0x104], 0
call fcn.004e21e0
lea eax, [edi + 0xd8]
lea ecx, [esp + 0x24]
push eax
push ecx
lea ecx, [esp + 0x1c]
call fcn.004e2200
lea ecx, [esp + 0x34]
call fcn.004dcda0
lea edx, [edi + 0x100]
lea eax, [esp + 0x74]
push edx
push eax
lea ecx, [esp + 0x3c]
mov byte [esp + 0x10c], 1
call fcn.004dcf90
lea ecx, [esp + 0x74]
call fcn.004dce40
mov ebp, dword [esp + 0x110]
mov ecx, edi
push ebp
call fcn.0050cff0
mov ebx, dword [esp + 0x114]
mov esi, eax
test esi, esi
je 0x513073
lea ecx, [esi + 0xc8]
mov edx, dword [esi + 0xc8]
mov dword [esp + 0x24], edx
mov eax, dword [ecx + 4]
mov dword [esp + 0x28], eax
mov edx, dword [ecx + 8]
mov dword [esp + 0x2c], edx
lea edx, [esp + 0xb0]
mov eax, dword [ecx + 0xc]
lea ecx, [esp + 0x24]
push ecx
push edx
lea ecx, [esp + 0x1c]
mov dword [esp + 0x38], eax
call fcn.004e2200
push ebx
mov ecx, esi
call fcn.004e3c30
test eax, eax
je 0x513073
lea ecx, [esp + 0xc0]
push ecx
mov ecx, eax
call fcn.004dc560
lea edx, [esp + 0x74]
push eax
push edx
lea ecx, [esp + 0x3c]
mov byte [esp + 0x10c], 2
call fcn.004dcf90
lea ecx, [esp + 0x74]
call fcn.004dce40
lea ecx, [esp + 0xc0]
mov byte [esp + 0x104], 1
call fcn.004dce40
sub esp, 0x3c
lea eax, [esp + 0x70]
mov esi, esp
mov dword [esp + 0xac], esp
push eax
mov ecx, esi
mov dword [esp + 0x50], esi
call fcn.005c4e59
mov ecx, dword [esp + 0x74]
mov byte [esp + 0x140], 3
mov dword [esi + 4], ecx
mov edx, dword [esp + 0x78]
mov dword [esi + 8], edx
mov eax, dword [esp + 0x7c]
mov dword [esi + 0xc], eax
mov ecx, dword [esp + 0x80]
mov dword [esi + 0x10], ecx
mov edx, dword [esp + 0x84]
mov dword [esi + 0x14], edx
mov eax, dword [esp + 0x88]
mov dword [esi + 0x18], eax
mov ecx, dword [esp + 0x8c]
mov dword [esi + 0x1c], ecx
mov edx, dword [esp + 0x90]
lea eax, [esp + 0x94]
lea ecx, [esi + 0x24]
push eax
mov dword [esi + 0x20], edx
call fcn.005c4e59
mov ecx, dword [esp + 0x98]
mov dword [esi + 0x28], ecx
mov edx, dword [esp + 0x9c]
mov dword [esi + 0x2c], edx
mov eax, dword [esp + 0xa0]
mov dword [esi + 0x30], eax
mov ecx, dword [esp + 0xa4]
mov dword [esi + 0x34], ecx
mov edx, dword [esp + 0xa8]
mov dword [esi + 0x38], edx
mov ecx, dword [esp + 0x50]
mov edx, dword [esp + 0x54]
sub esp, 0x10
mov byte [esp + 0x150], 4
mov eax, esp
mov dword [eax], ecx
mov ecx, dword [esp + 0x68]
push ecx
mov dword [eax + 4], edx
mov edx, dword [esp + 0x70]
mov dword [esp + 0x60], esp
mov dword [eax + 8], ecx
mov ecx, esp
mov dword [eax + 0xc], edx
lea eax, [esp + 0x16c]
push eax
call fcn.005c4e59
sub esp, 0xc
mov edx, dword [esp + 0x174]
mov ecx, esp
mov eax, dword [esp + 0x168]
push eax
mov byte [esp + 0x164], 1
mov dword [ecx], ebp
mov dword [ecx + 4], ebx
mov dword [ecx + 8], edx
mov ecx, edi
call fcn.005131d0
lea ecx, [esp + 0x34]
mov esi, eax
mov byte [esp + 0x104], 0
call fcn.004dce40
lea ecx, [esp + 0x11c]
mov dword [esp + 0x104], 0xffffffff
call fcn.005c50e4
mov ecx, dword [esp + 0xfc]
mov eax, esi
pop edi
mov dword fs:[0], ecx
pop esi
pop ebp
pop ebx
add esp, 0xf8
ret 0x14