Function at 0x512594
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
xor ecx, ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push ebx
push esi
push edi
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x51291e
push dword fs:[eax]
mov dword fs:[eax], esp
xor ecx, ecx
mov dl, 1
mov eax, dword [ebp - 4]
call fcn.0050d5ac
test al, al
je 0x5128f6
mov ecx, dword [ebp - 4]
mov dl, 1
mov eax, dword [0x47705c]
call fcn.00477cb8
mov dword [ebp - 0x14], eax
xor eax, eax
push ebp
push 0x5128ef
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 0x14]
mov byte [eax + 0x38], 0
mov eax, dword [ebp - 0x14]
mov byte [eax + 0x30], 1
mov eax, dword [ebp - 0x14]
add eax, 0x34
mov edx, 0x512934
call fcn.00403d74
mov eax, dword [ebp - 0x14]
mov byte [eax + 0x40], 1
lea eax, [ebp - 8]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x10ec]
mov edx, dword [edx + 0xc]
call fcn.00403db8
mov eax, dword [ebp - 4]
cmp dword [eax + 0xe2b], 0
je 0x512640
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0xe2b]
mov eax, dword [ebp - 0x14]
call fcn.004784a4
jmp 0x512658
lea edx, [ebp - 0x18]
mov eax, dword [0x541f28]
call fcn.0047cb44
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
call fcn.004784a4
mov eax, dword [ebp - 0x14]
mov edx, dword [eax]
call dword [edx + 0x34]
test al, al
jne 0x51266e
call fcn.00403818
jmp 0x5128f6
lea edx, [ebp - 0x1c]
mov eax, dword [ebp - 8]
call fcn.0040910c
mov eax, dword [ebp - 0x1c]
lea edx, [ebp - 0x18]
call fcn.0047cc50
mov eax, dword [ebp - 0x18]
push eax
lea edx, [ebp - 0x1c]
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x3c]
call fcn.0047cc50
mov edx, dword [ebp - 0x1c]
pop eax
call fcn.004040ac
jne 0x5126c0
push 0
mov cx, word [0x51294c]
mov dl, 1
mov eax, 0x512958
call fcn.004b93a4
call fcn.00403818
jmp 0x5128f6
lea edx, [ebp - 0x18]
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x3c]
call fcn.0047cc50
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 4]
add eax, 0xe2b
call fcn.00403d74
lea edx, [ebp - 0x18]
mov eax, dword [ebp - 8]
call fcn.004091d4
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0xe2b]
lea eax, [ebp - 0xc]
call fcn.00403fe8
mov eax, dword [ebp - 0xc]
call fcn.00408e88
test al, al
je 0x512746
push 0
push 0x512988
push dword [ebp - 0xc]
push 0x51299c
lea eax, [ebp - 0x18]
mov edx, 3
call fcn.0040405c
mov eax, dword [ebp - 0x18]
mov cx, word [0x5129cc]
mov dl, 3
call fcn.004b93a4
cmp ax, 6
je 0x512746
call fcn.00403818
jmp 0x5128f6
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x24c]
mov eax, dword [eax + 0x138]
mov edx, 6
call fcn.0047b2d8
mov edx, 0x5129d8
call fcn.0047a964
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x10ec]
call fcn.004ce930
mov byte [ebp - 0xd], al
mov eax, dword [0x541ef4]
mov eax, dword [eax]
mov dx, 0xfff5
call fcn.00434dfc
xor eax, eax
push ebp
push 0x5128d2
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
push ebp
push 0x512846
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x10ec]
mov edx, dword [ebp - 0xc]
call fcn.004d0150
mov ebx, eax
test ebx, ebx
jne 0x512805
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x24c]
mov eax, dword [eax + 0x138]
mov edx, 6
call fcn.0047b2d8
mov edx, 0x5129f4
call fcn.0047a964
push 0
lea eax, [ebp - 0x18]
mov ecx, dword [ebp - 0xc]
mov edx, 0x512a0c
call fcn.00403fe8
mov eax, dword [ebp - 0x18]
mov cx, word [0x51294c]
mov dl, 2
call fcn.004b93a4
jmp 0x51283c
push 0
push 0x512a38
lea edx, [ebp - 0x1c]
mov eax, ebx
call fcn.00408bd4
push dword [ebp - 0x1c]
push 0x512a54
lea eax, [ebp - 0x18]
mov edx, 3
call fcn.0040405c
mov eax, dword [ebp - 0x18]
mov cx, word [0x51294c]
mov dl, 1
call fcn.004b93a4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x512894
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5128d9
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x10ec]
mov edx, dword [ebp - 8]
call fcn.004d1d30
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x10ec]
mov dl, byte [ebp - 0xd]
call fcn.004cec44
mov eax, dword [0x541ef4]
mov eax, dword [eax]
xor edx, edx
call fcn.00434dfc
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x512925
lea eax, [ebp - 0x1c]
mov edx, 2
call fcn.00403d44
lea eax, [ebp - 0xc]
mov edx, 2
call fcn.00403d44
ret