Function at 0x51b51c
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push ebx
push esi
push edi
mov esi, ecx
mov ebx, edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x51b9d5
push dword fs:[eax]
mov dword fs:[eax], esp
cmp byte [ebp + 8], 0
jne 0x51b55b
mov eax, dword [ebp - 4]
test byte [eax + 0x369], 1
je 0x51b82a
mov byte [ebp - 5], 0
test bl, bl
je 0x51b571
mov dl, 1
mov eax, dword [ebp - 4]
call fcn.0052d8fc
test al, al
jne 0x51b575
xor eax, eax
jmp 0x51b577
mov al, 1
mov ebx, eax
mov byte [ebp - 6], 0
mov eax, dword [ebp - 4]
call fcn.00517084
xor eax, eax
push ebp
push 0x51b823
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x2b0]
mov edx, dword [eax]
call dword [edx + 0x38]
mov ecx, eax
mov eax, esi
cdq
xor eax, edx
sub eax, edx
cmp ecx, eax
setle al
or al, byte [ebp + 0xc]
je 0x51b5e2
test esi, esi
jle 0x51b5cc
mov eax, dword [ebp - 4]
call fcn.0051ad4c
mov eax, dword [eax + 0x30]
cmp byte [eax + 0xa1], 0
je 0x51b5e2
test esi, esi
jge 0x51b5e2
mov eax, dword [ebp - 4]
call fcn.0051ad4c
mov eax, dword [eax + 0x30]
cmp byte [eax + 0xa0], 0
xor eax, eax
push ebp
push 0x51b7e3
push dword fs:[eax]
mov dword fs:[eax], esp
test esi, esi
je 0x51b7bf
mov eax, dword [ebp - 4]
test byte [eax + 0x369], 0x10
je 0x51b731
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x2b0]
cmp byte [eax + 0x15], 0
je 0x51b731
test bl, bl
je 0x51b729
mov eax, dword [ebp - 4]
cmp byte [eax + 0x375], 0
jne 0x51b6b3
lea edx, [ebp - 0x10]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x29c]
call fcn.004eba30
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 4]
add eax, 0x37c
call fcn.004043c8
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x29c]
call fcn.004eb928
mov edx, dword [ebp - 4]
mov byte [edx + 0x496], al
mov eax, dword [ebp - 4]
cmp byte [eax + 0x3f2], 0
je 0x51b693
mov eax, dword [ebp - 4]
mov dl, byte [eax + 0x496]
xor dl, 1
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x29c]
mov ecx, dword [eax]
call dword [ecx + 0xc]
jmp 0x51b6a3
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x29c]
mov dl, 1
mov ecx, dword [eax]
call dword [ecx + 0xc]
mov eax, dword [ebp - 4]
mov byte [eax + 0x375], 1
mov byte [ebp - 5], 1
jmp 0x51b731
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x29c]
mov dword [ebp - 0xc], eax
lea edx, [ebp - 0x14]
mov eax, dword [ebp - 0xc]
call fcn.004eba30
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x37c]
mov eax, dword [ebp - 0xc]
call fcn.004eba98
mov ecx, eax
mov eax, esi
cdq
xor eax, edx
sub eax, edx
push eax
mov eax, esi
pop edx
mov edi, edx
cdq
idiv edi
neg eax
cmp ecx, eax
setne byte [ebp - 5]
cmp byte [ebp - 5], 0
jne 0x51b731
mov eax, dword [ebp - 4]
cmp byte [eax + 0x3f2], 0
je 0x51b71d
mov eax, dword [ebp - 4]
mov dl, byte [eax + 0x496]
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax]
call dword [ecx + 0xc]
jmp 0x51b731
xor edx, edx
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax]
call dword [ecx + 0xc]
jmp 0x51b731
mov eax, dword [ebp - 4]
call fcn.0051b4c0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x2b0]
call fcn.004aaf84
push eax
mov eax, esi
cdq
xor eax, edx
sub eax, edx
push eax
mov eax, esi
pop edx
mov ecx, edx
cdq
idiv ecx
mov edx, eax
pop eax
call fcn.004afb94
test eax, eax
jne 0x51b76b
call fcn.00403e20
call fcn.00403e20
jmp 0x51b9ba
cmp byte [ebp - 5], 0
je 0x51b7a9
mov eax, dword [ebp - 4]
cmp byte [eax + 0x3f2], 0
je 0x51b799
mov eax, dword [ebp - 4]
mov dl, byte [eax + 0x496]
xor dl, 1
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x29c]
mov ecx, dword [eax]
call dword [ecx + 0xc]
jmp 0x51b7a9
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x29c]
mov dl, 1
mov ecx, dword [eax]
call dword [ecx + 0xc]
cmp byte [ebp + 0xc], 0
jne 0x51b7b7
test esi, esi
jle 0x51b7b6
dec esi
jmp 0x51b7b7
inc esi
test esi, esi
jne 0x51b5f8
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51b7ea
cmp byte [ebp - 6], 0
je 0x51b7e2
mov eax, dword [ebp - 4]
call fcn.0051ad4c
mov eax, dword [eax + 0x30]
call fcn.004aef90
ret
test bl, bl
je 0x51b83c
mov dl, 2
mov eax, dword [ebp - 4]
call fcn.0052d8fc
test al, al
jne 0x51b840
xor eax, eax
jmp 0x51b842
mov al, 1
mov ebx, eax
test bl, bl
jne 0x51b862
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x2b0]
call fcn.004aaf84
mov edx, esi
call fcn.004afb94
jmp 0x51b9a3
mov eax, dword [ebp - 4]
call fcn.00517084
xor edx, edx
push ebp
push 0x51b99c
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x378]
cmp byte [eax + 0x10], 2
je 0x51b8d5
mov eax, dword [eax + 0xc]
call fcn.0052fb3c
push 1
lea edx, [ebp - 0x18]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x2b0]
mov eax, dword [eax + 4]
mov eax, dword [eax + 0x30]
mov ecx, dword [eax]
call dword [ecx + 0x11c]
mov eax, dword [ebp - 0x18]
push eax
mov eax, dword [ebp - 4]
call fcn.0052cf98
mov edx, eax
mov eax, dword [ebp - 4]
call fcn.0051701c
mov edx, eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x378]
mov eax, dword [eax + 0xc]
pop ecx
call fcn.00530078
cmp byte [ebp + 0xc], 0
je 0x51b908
dec esi
jne 0x51b8f3
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x2b0]
call fcn.004aaf84
call fcn.004afaf8
jmp 0x51b91d
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x2b0]
call fcn.004aaf84
call fcn.004afa20
jmp 0x51b91d
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x2b0]
call fcn.004aaf84
mov edx, esi
call fcn.004afb94
push 1
lea edx, [ebp - 0x1c]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x2b0]
mov eax, dword [eax + 4]
mov eax, dword [eax + 0x30]
mov ecx, dword [eax]
call dword [ecx + 0x11c]
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [ebp - 4]
call fcn.0052cf98
mov edx, eax
mov eax, dword [ebp - 4]
call fcn.0051701c
mov edx, eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x378]
mov eax, dword [eax + 0xc]
pop ecx
call fcn.00530078
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51b9a3
mov eax, dword [ebp - 4]
call fcn.0051ad3c
mov eax, dword [ebp - 4]
cmp byte [eax + 0x3b0], 0
jne 0x51b99b
mov eax, dword [ebp - 4]
cmp byte [eax + 0x3e5], 0
je 0x51b99b
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x13c]
ret
mov eax, dword [ebp - 4]
cmp byte [eax + 0x3b0], 0
jne 0x51b9ba
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x88]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51b9dc
lea eax, [ebp - 0x1c]
mov edx, 4
call fcn.00404398
ret