Function at 0x404a5f
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push 0x3c
push 0x4015b8
call fcn.0041ae80
xor ebx, ebx
mov dword [ebp - 0x2c], ebx
cmp dword [ebp + 8], ebx
je 0x404c3c
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x28], ebx
mov dword [0x424d84], ebx
mov dword [0x424d80], ebx
mov dword [0x424d7c], ebx
mov dword [0x424d78], ebx
mov dword [ebp - 4], ebx
push 0x424d60
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
xor edi, edi
inc edi
mov dword [0x424d78], edi
lea eax, [ebp - 0x24]
push eax
push edi
push ebx
push 0x401558
push 0x80000002
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
call esi
mov dword [ebp - 0x34], eax
cmp eax, ebx
jne 0x404b57
lea eax, [ebp - 0x20]
push eax
push 0x401544
push dword [ebp - 0x24]
call fcn.004189f6
test eax, eax
je 0x404aec
mov dword [ebp - 0x20], ebx
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x1c]
push eax
push 0x401534
push dword [ebp - 0x24]
call fcn.00418966
test eax, eax
je 0x404b0c
mov dword [ebp - 0x1c], ebx
lea eax, [ebp - 0x30]
push eax
push edi
push ebx
push 0x401518
push dword [ebp - 0x24]
call esi
mov dword [ebp - 0x34], eax
cmp eax, ebx
jne 0x404b4e
lea eax, [ebp - 0x38]
push eax
push dword [0x4235cc]
call fcn.0041a3b2
push eax
push dword [ebp - 0x30]
call fcn.004189f6
test eax, eax
jne 0x404b45
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x20], eax
push dword [ebp - 0x30]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x1c]
cmp eax, ebx
je 0x404bab
cmp word [eax], bx
je 0x404ba1
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [ebp - 0x1c]
lea eax, [ecx + eax*2]
push eax
push ecx
call dword [sym.imp.USER32.dll_CharPrevW]
movzx eax, word [eax]
mov dword [ebp - 0x48], eax
cmp ax, 0x5c
je 0x404bbd
cmp ax, 0x2f
je 0x404bbd
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [ebp - 0x4c], eax
cmp eax, 0xffffffff
je 0x404bc0
test al, 0x10
je 0x404bc0
jmp 0x404bbd
cmp eax, ebx
je 0x404bab
push eax
call fcn.0041a0e7
push dword [0x4235d0]
call fcn.0041a138
mov dword [ebp - 0x1c], eax
cmp eax, ebx
je 0x404c2d
mov dword [ebp - 0x28], edi
cmp dword [ebp - 0x28], ebx
je 0x404bf2
lea eax, [ebp - 0x3c]
push eax
push 0x4014fc
push dword [ebp - 0x1c]
call fcn.0040cdf9
push dword [ebp - 0x1c]
test eax, eax
jne 0x404be7
call fcn.0041a0e7
mov dword [ebp - 0x1c], ebx
jmp 0x404c2d
call fcn.0041a0e7
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x1c], eax
push dword [ebp - 0x1c]
call fcn.0041a8fb
and word [ebp - 0x1e], 0xf800
cmp byte [ebp - 0x20], bl
jne 0x404c09
or dword [ebp - 0x20], 0x20
test byte [ebp - 0x1f], 0xff
jne 0x404c13
or byte [ebp - 0x1f], 0x30
mov eax, dword [ebp - 0x20]
mov dword [0x424d80], eax
mov eax, dword [ebp - 0x1c]
mov dword [0x424d84], eax
mov dword [ebp - 0x1c], ebx
cmp eax, ebx
je 0x404c2d
mov dword [ebp - 0x2c], edi
or dword [ebp - 4], 0xffffffff
jmp 0x404c6b
mov eax, dword [0x424d84]
cmp eax, ebx
je 0x404c51
push eax
call fcn.0041a0e7
mov dword [0x424d84], ebx
cmp dword [0x424d78], ebx
je 0x404c64
push 0x424d60
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov dword [ebp - 0x2c], 1
mov eax, dword [ebp - 0x2c]
call fcn.0041aebb
ret 4