Function at 0x52046e
Capabilities:
Inspect section memory permissions

Disassembly:
mov eax, 0x61f45a
call fcn.005f77f4
sub esp, 0x34
push ebx
push esi
xor ebx, ebx
push edi
mov esi, ecx
mov dword [ebp - 0x14], ebx
call fcn.00520144
cmp dword [ebp + 8], ebx
je 0x5204ae
push 0xffffffffffffffff
push dword [ebp + 8]
lea eax, [ebp - 0x40]
push eax
call fcn.0051b593
add esp, 0xc
mov eax, dword [eax]
mov dword [ebp - 4], ebx
mov dword [ebp - 0x14], 1
jmp 0x5204b1
mov eax, dword [ebp + 0xc]
lea edi, [esi + 4]
push eax
mov dword [ebp - 0x18], edi
call fcn.0051e4cf
push eax
call fcn.005fc107
pop ecx
pop ecx
push eax
mov ecx, edi
call fcn.0052011a
or dword [ebp - 4], 0xffffffff
test byte [ebp - 0x14], 1
je 0x5204e9
cmp dword [ebp - 0x40], 0x6575cc
je 0x5204e9
push dword [ebp - 0x40]
call fcn.005f7371
pop ecx
cmp dword [edi], ebx
jne 0x520510
cmp byte [ebp + 0x14], 0
jne 0x5204fa
xor al, al
jmp 0x5207d6
lea ecx, [ebp + 0x14]
call fcn.0051c377
push 0x6952c4
lea eax, [ebp + 0x14]
push eax
call fcn.005f8355
mov ecx, dword [ebp + 0x10]
test cl, 1
mov dword [ebp - 0x14], ebx
je 0x520522
mov dword [ebp - 0x14], CreateStatusWindowA
test cl, 2
je 0x52052e
or dword [ebp - 0x14], 0x40000000
test cl, 0x10
push 3
pop edx
mov dword [ebp - 0x10], edx
je 0x520540
mov dword [ebp - 0x10], 2
test cl, 0x20
je 0x520549
and dword [ebp - 0x10], 0xfffffffd
mov eax, ecx
and eax, 0xff00
cmp eax, 0x100
je 0x52057e
cmp eax, 0x200
je 0x5206c7
cmp eax, 0x300
je 0x5206bb
xor edx, edx
cmp eax, 0x400
setne dl
lea edx, [edx*4 + 1]
mov dword [ebp + 0x10], edx
test ecx, 0x10000
mov ebx, 0x80
je 0x520593
mov ebx, 0x8000080
test ecx, 0x20000
je 0x5205a1
or ebx, 0x10000000
test ecx, 0x80000
je 0x5205af
or ebx, 0x80000000
test ecx, 0x40000
je 0x5205bd
or ebx, 0x20000000
mov edi, 0x6575c8
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x2c], edi
mov eax, 0x6575cc
mov dword [ebp - 4], 1
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
mov byte [ebp - 4], 2
call fcn.0051fedd
test al, al
je 0x5206d3
cmp dword [ebp + 8], 0
je 0x520639
push 0xffffffffffffffff
push dword [ebp + 8]
lea eax, [ebp - 0x40]
push eax
call fcn.0051b593
add esp, 0xc
push dword [eax + 4]
lea ecx, [ebp - 0x28]
push dword [eax]
mov byte [ebp - 4], 3
call fcn.00403670
cmp dword [ebp - 0x40], 0x6575cc
mov byte [ebp - 4], 2
je 0x52062f
push dword [ebp - 0x40]
call fcn.005f7371
pop ecx
mov eax, dword [ebp - 0x28]
and dword [ebp + 8], 0
mov dword [ebp + 0xc], eax
push dword [ebp + 0xc]
call fcn.0051ff02
pop ecx
push 0
push ebx
push dword [ebp + 0x10]
push 0
push dword [ebp - 0x10]
push dword [ebp - 0x14]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [esi], 0xffffffff
jne 0x5207ac
cmp eax, 2
je 0x520750
cmp eax, 3
je 0x520750
test ebx, 0x20000000
je 0x520750
and ebx, 0xdfffffff
or ebx, 0x80000000
mov eax, ebx
xor ebx, ebx
cmp dword [ebp + 8], ebx
push ebx
push eax
push dword [ebp + 0x10]
push ebx
push dword [ebp - 0x10]
push dword [ebp - 0x14]
je 0x52073d
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
jmp 0x520746
mov dword [ebp + 0x10], 2
jmp 0x520581
mov dword [ebp + 0x10], 4
jmp 0x520581
cmp dword [ebp + 0xc], 0
je 0x520717
push 0xffffffffffffffff
push dword [ebp + 0xc]
lea eax, [ebp - 0x40]
push eax
call fcn.0051b523
add esp, 0xc
push dword [eax + 4]
lea ecx, [ebp - 0x34]
push dword [eax]
mov byte [ebp - 4], 4
call fcn.004022a0
cmp dword [ebp - 0x40], edi
mov byte [ebp - 4], 2
je 0x52070d
push dword [ebp - 0x40]
call fcn.005f7371
pop ecx
mov eax, dword [ebp - 0x34]
and dword [ebp + 0xc], 0
mov dword [ebp + 8], eax
cmp dword [ebp + 8], 0
je 0x520639
push 0
push ebx
push dword [ebp + 0x10]
push 0
push dword [ebp - 0x10]
push dword [ebp - 0x14]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
jmp 0x520659
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x520752
xor ebx, ebx
cmp dword [esi], 0xffffffff
jne 0x5207ae
cmp byte [ebp + 0x14], 0
mov dword [esi], ebx
jne 0x520788
cmp dword [ebp - 0x28], 0x6575cc
je 0x520771
push dword [ebp - 0x28]
call fcn.005f7371
pop ecx
cmp dword [ebp - 0x34], edi
je 0x5204f3
push dword [ebp - 0x34]
call fcn.005f7371
pop ecx
jmp 0x5204f3
mov ecx, dword [ebp - 0x18]
push dword [ecx]
push eax
lea eax, [ebp - 0x1c]
push str.Cannot_open_file___ls_:_n__s
push eax
call fcn.0051d61a
add esp, 0x10
push 0x697a88
lea eax, [ebp - 0x1c]
jmp 0x52050a
xor ebx, ebx
cmp dword [ebp - 0x28], 0x6575cc
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
je 0x5207c6
push dword [ebp - 0x28]
call fcn.005f7371
pop ecx
cmp dword [ebp - 0x34], edi
je 0x5207d4
push dword [ebp - 0x34]
call fcn.005f7371
pop ecx
mov al, 1
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0x10