Function at 0x511f60
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0xb0
mov esi, esp
mov dword [esi + 0x98], ebp
lea eax, [esi + 0xa0]
mov dword [eax - 4], esp
xor edx, edx
dec edx
mov dword [eax + 8], edx
mov dword [eax + 4], 0x457d20
mov ecx, dword fs:[0]
mov dword [eax], ecx
mov dword fs:[0], eax
lea ecx, [esi + 0x30]
mov dword [ecx + 0x60], edx
pcmpeqd xmm0, xmm0
movdqa xmmword [ecx + 0x50], xmm0
movdqa xmmword [ecx + 0x40], xmm0
movdqa xmmword [ecx + 0x30], xmm0
movdqa xmmword [ecx + 0x20], xmm0
movdqa xmmword [ecx + 0x10], xmm0
movdqa xmmword [ecx], xmm0
mov dword [esi + 0x10], ecx
mov dword [esi + 0x1c], ecx
mov ecx, dword [ebp + 0x18]
mov dword [esi + 0x14], fcn.004ff490
mov dword [esi + 0x18], edx
mov dword [eax + 8], 1
lea eax, [esi + 0xc]
mov dword [eax], edx
push eax
call fcn.004b8140
mov edi, dword [esi + 0xc]
mov dword [esi + 0x20], 0x5c5df8
mov dword [esi + 0x24], 0x40ad00
mov eax, dword [0x5c5df8]
cmp eax, 0xffffffff
jne 0x5121a8
mov eax, dword [0x5c5dfc]
lea edx, [eax - 1]
mov ecx, dword [edi + 8]
mov edi, dword [edi + 0xc]
sub edi, ecx
sar edi, 2
cmp edi, edx
jbe 0x512199
mov edx, dword [ecx + eax*4 - 4]
mov dword [esi + 0xa8], 2
test edx, edx
je 0x512199
mov al, byte [ebp + 0x14]
lea ecx, [esi + 0x20]
mov byte [ecx], 0
lea ebx, [esi + 0x10]
movzx eax, al
lea edi, [esi + 0x94]
push edi
lea edi, [esi + 0x18]
push edi
push ebx
mov dword [esi + 8], edx
push edx
push ecx
push dword [ebp + 0x1c]
mov ecx, dword [ebp + 0x18]
push dword [ecx + 4]
lea ecx, [esi + 0xc]
push ecx
push eax
push dword [ebp + 0x10]
lea eax, [ebp + 0xc]
push eax
call fcn.00510b60
add esp, 0x2c
test al, al
je 0x5120e7
mov ecx, dword [ebp + 0x20]
cmp byte [ecx + 0xb], 0
js 0x512165
xor eax, eax
mov byte [ecx], al
mov byte [ecx + 0xb], al
cmp byte [esi + 0x20], 0
je 0x5120a9
mov ecx, dword [esi + 8]
mov eax, dword [ecx]
push 0x2d
call dword [eax + 0x1c]
movsx eax, al
mov ecx, dword [ebp + 0x20]
push eax
call fcn.004b8380
mov ecx, dword [esi + 8]
mov eax, dword [ecx]
push 0x30
call dword [eax + 0x1c]
mov edx, dword [esi + 0x10]
mov edi, dword [esi + 0x18]
lea ebx, [edi - 1]
cmp edx, ebx
jae 0x5120d3
lea ecx, [edx + 1]
cmp ebx, ecx
cmova ecx, ebx
cmp byte [edx], al
jne 0x5120d3
inc edx
cmp ecx, edx
jne 0x5120c8
mov edx, ecx
mov dword [esi + 0xa8], 2
mov ecx, dword [ebp + 0x20]
push edi
push edx
call fcn.0043b7b0
mov ecx, dword [ebp + 0xc]
xor edx, edx
test ecx, ecx
je 0x5120fa
mov eax, dword [ecx + 0xc]
cmp eax, dword [ecx + 0x10]
je 0x512176
mov edx, ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
jne 0x5121dd
test edx, edx
jne 0x51210f
mov eax, dword [ebp + 0x1c]
or byte [eax], 2
mov edi, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
mov dword [edi], eax
mov ecx, dword [esi + 0xc]
xor eax, eax
dec eax
lock xadd dword [ecx + 4], eax
test eax, eax
jne 0x51212b
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [esi + 0x10]
mov dword [esi + 0x10], 0
test eax, eax
je 0x51214d
mov dword [esi + 0xa8], 0
push eax
call dword [esi + 0x14]
mov edi, dword [ebp + 8]
add esp, 4
mov eax, dword [esi + 0xa0]
mov dword fs:[0], eax
mov eax, edi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret 0x1c
mov eax, dword [ecx]
mov byte [eax], 0
mov dword [ecx + 4], 0
jmp 0x51208d
mov eax, dword [ecx]
call dword [eax + 0x20]
cmp eax, 0xffffffff
mov edx, 0
jne 0x512191
mov dword [ebp + 0xc], 0
jmp 0x5120fa
mov edx, dword [ebp + 0xc]
jmp 0x5120fa
mov dword [esi + 0xa8], 2
call fcn.00504fd0
mov dword [esi + 8], edi
lea eax, [esi + 0x20]
lea ecx, [esi + 0x2c]
mov dword [ecx], eax
lea eax, [esi + 0x28]
mov dword [eax], ecx
mov dword [esi + 0xa8], 2
push 0x40acf0
push eax
push 0x5c5df8
call fcn.004176f0
add esp, 0xc
mov edi, dword [esi + 8]
jmp 0x512007
mov eax, dword [ecx + 0xc]
cmp eax, dword [ecx + 0x10]
je 0x5121f2
test edx, edx
jne 0x512109
jmp 0x51210f
mov dword [esi + 8], edx
mov eax, dword [ecx]
call dword [eax + 0x20]
cmp eax, 0xffffffff
mov edx, dword [esi + 8]
jne 0x5121e5
jmp 0x512105