Function at 0x509ce0
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffdc
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x509f8b
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 0xd], 1
mov eax, dword [ebp - 4]
cmp byte [eax + 0xc0], 0
jne 0x509d46
mov eax, dword [ebp - 4]
cmp byte [eax + 0x48], 0
je 0x509d3f
lea edx, [ebp - 0x24]
mov eax, dword [0x551e9c]
call fcn.00406a58
mov ecx, dword [ebp - 0x24]
mov dl, 1
mov eax, dword [0x507320]
call fcn.0040d308
call fcn.004040fc
mov eax, dword [ebp - 4]
mov byte [eax + 0x48], 1
xor eax, eax
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x74]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 4]
test byte [eax + 0x68], 2
je 0x509da6
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x70]
push eax
push 1
mov eax, dword [ebp - 4]
lea ecx, [eax + 0x70]
lea edx, [ebp - 0x20]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x58]
call fcn.005008e8
test al, al
je 0x509da6
xor ecx, ecx
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 4]
call fcn.0050a46c
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0x20]
mov dword [eax + 0x6c], edx
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x70]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0x1c]
mov dword [eax + 0x74], edx
xor edx, edx
push ebp
push 0x509f6e
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [ebp - 4]
cmp word [eax + 0x42], 0
je 0x509dca
mov ebx, dword [ebp - 4]
mov edx, dword [ebp - 8]
mov eax, dword [ebx + 0x44]
call dword [ebx + 0x40]
xor edx, edx
push ebp
push 0x509ec4
push dword fs:[edx]
mov dword fs:[edx], esp
push 0
push 0
mov eax, dword [ebp - 8]
call fcn.004213fc
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x30]
mov edx, dword [eax]
call dword [edx + 0xc]
test al, al
je 0x509e6e
mov dl, 1
mov eax, dword [0x41c3a4]
call fcn.0040392c
mov dword [ebp - 0x14], eax
mov dl, 1
mov eax, dword [0x41c3a4]
call fcn.0040392c
mov dword [ebp - 0x18], eax
xor eax, eax
push ebp
push 0x509e67
push dword fs:[eax]
mov dword fs:[eax], esp
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 4]
mov ebx, dword [eax]
call dword [ebx + 0x30]
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 4]
mov ebx, dword [eax]
call dword [ebx + 0x40]
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 4]
mov ebx, dword [eax]
call dword [ebx + 0x34]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x509e7c
mov eax, dword [ebp - 0x14]
call fcn.0040395c
mov eax, dword [ebp - 0x18]
call fcn.0040395c
ret
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 4]
mov ebx, dword [eax]
call dword [ebx + 0x40]
push 0
push 0
mov eax, dword [ebp - 0xc]
call fcn.004213fc
mov eax, dword [ebp - 4]
cmp word [eax + 0x3a], 0
je 0x509eaa
mov ebx, dword [ebp - 4]
mov edx, dword [ebp - 0xc]
mov eax, dword [ebx + 0x3c]
call dword [ebx + 0x38]
push 0
push 0
mov eax, dword [ebp - 0xc]
call fcn.004213fc
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
call fcn.004041a8
jmp 0x509f75
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x509f92
lea eax, [ebp - 0x24]
call fcn.004047a8
ret