Function at 0x507fec
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x50819b
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x244]
mov edx, dword [ebp + 0xc]
mov dword [edx + 0xc], eax
mov eax, dword [ebp + 0xc]
mov byte [eax + 0x10], 0
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp - 8]
mov dword [eax], edx
mov eax, dword [0x5baf18]
mov eax, dword [eax + 0x34]
mov edx, dword [ebp + 0xc]
mov dword [edx + 0x24], eax
mov eax, dword [0x5baf18]
mov eax, dword [eax + 0x38]
mov edx, dword [ebp + 0xc]
mov dword [edx + 0x28], eax
mov eax, dword [ebp + 0xc]
mov dword [eax + 0x50], pe_nt_image_headers32
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp - 0xc]
mov dword [eax + 0x14], edx
mov eax, dword [0x5b9a8c]
sub eax, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
mov dword [edx + 0x18], eax
mov eax, dword [ebp + 0xc]
push dword [eax + 0x50]
mov eax, dword [ebp - 0xc]
pop edx
mov ecx, edx
cdq
idiv ecx
mov edx, dword [ebp + 0xc]
imul dword [edx + 0x50]
mov edx, dword [ebp + 0xc]
add eax, dword [edx + 0x50]
mov edx, dword [ebp + 0xc]
mov dword [edx + 0x1c], eax
mov eax, dword [ebp + 0xc]
xor edx, edx
mov dword [eax + 0x20], edx
mov eax, dword [ebp + 0xc]
mov dword [eax + 0x38], 0x15
mov eax, dword [ebp + 0xc]
xor edx, edx
mov dword [eax + 0x30], edx
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 0x38]
dec eax
mov edx, dword [ebp + 0xc]
mov dword [edx + 0x34], eax
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
mov dword [eax + 0x40], edx
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
mov dword [eax + 0x44], edx
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
mov dword [eax + 0x48], edx
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 0x38]
dec eax
mov edx, dword [ebp + 0xc]
imul dword [edx + 0x50]
add eax, dword [ebp + 8]
dec eax
mov edx, dword [ebp + 0xc]
mov dword [edx + 0x4c], eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 0x1c]
mov edx, dword [ebp + 0xc]
mov ecx, dword [edx + 0x50]
cdq
idiv ecx
mov edx, dword [ebp + 0xc]
imul dword [edx + 0x50]
mov edx, dword [ebp + 0xc]
add eax, dword [edx + 0x50]
mov edx, dword [ebp + 0xc]
mov dword [edx + 0x3c], eax
mov eax, dword [ebp + 0xc]
xor edx, edx
mov dword [eax + 0x58], edx
mov eax, dword [ebp + 0xc]
xor edx, edx
mov dword [eax + 0x54], edx
mov eax, dword [ebp + 0xc]
mov byte [eax + 0x5c], 1
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
call fcn.0053ea64
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5081a2
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
mov dl, 1
call fcn.0042398c
mov eax, dword [0x5b9a98]
mov dword [0x5b9ab0], eax
mov eax, dword [0x5b9a98]
add eax, dword [0x5b9a90]
mov dword [0x5b9ab8], eax
mov eax, dword [0x5b9ab0]
cmp eax, dword [0x5b9ab8]
jne 0x508178
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x260]
mov edx, 2
call fcn.0042345c
jmp 0x508192
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x264]
mov edx, dword [eax + 0x30]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x260]
call fcn.0042345c
mov eax, dword [ebp - 4]
call fcn.00507e6c
ret