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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4120f3
mov eax, dword fs:[0]
push eax
sub esp, 0x24
push ebx
push esi
push edi
mov eax, dword [0x41b014]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
cmp dword [0x41ba6c], 0
jne 0x405979
push 0x600
call fcn.00410a36
mov esi, eax
mov dword [ebp - 0x10], esi
push 0x600
push 0
push esi
mov dword [ebp - 4], 0
call sub.VCRUNTIME140.dll_memset
add esp, 0x10
mov ecx, esi
call fcn.00401d40
mov dword [ebp - 4], 0xffffffff
mov dword [0x41ba6c], eax
test eax, eax
jne 0x405979
push 0x600
call fcn.00410a36
mov esi, eax
mov dword [ebp - 0x10], esi
push 0x600
push 0
push esi
mov dword [ebp - 4], 1
call sub.VCRUNTIME140.dll_memset
add esp, 0x10
mov ecx, esi
call fcn.00401d40
mov dword [ebp - 4], 0xffffffff
mov dword [0x41ba6c], eax
push dword [edi + 4]
call fcn.00402750
push dword [edi + 8]
mov esi, eax
call fcn.00402750
nop dword [eax + eax]
mov cl, byte [eax]
cmp cl, byte [esi]
jne 0x4059b0
test cl, cl
je 0x4059ac
mov cl, byte [eax + 1]
cmp cl, byte [esi + 1]
jne 0x4059b0
add eax, 2
add esi, 2
test cl, cl
jne 0x405990
xor eax, eax
jmp 0x4059b5
sbb eax, eax
or eax, 1
test eax, eax
jne 0x4059cb
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [edi + 4]
mov ecx, edx
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0xf
mov byte [ebp - 0x30], 0
lea esi, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4059f0
sub ecx, esi
push ecx
push edx
lea ecx, [ebp - 0x30]
call fcn.0040f0c0
mov dword [ebp - 4], 2
cmp dword [0x41ba6c], 0
jne 0x405a42
push 0x600
call fcn.00410a36
mov esi, eax
mov dword [ebp - 0x10], esi
push 0x600
push 0
push esi
mov byte [ebp - 4], 3
call sub.VCRUNTIME140.dll_memset
add esp, 0x10
mov ecx, esi
call fcn.00401d40
mov dword [0x41ba6c], eax
mov dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0x30]
cmp dword [ebp - 0x1c], 0x10
cmovae eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x405ab2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x405ab2
mov edx, dword [ebp - 0x1c]
cmp edx, 0x10
jb 0x405a9b
mov ecx, dword [ebp - 0x30]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x405a91
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x405ad8
push edx
push ecx
call fcn.00410dcc
add esp, 8
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0xf
mov byte [ebp - 0x30], 0
jmp 0x405bbe
mov edx, dword [ebp - 0x1c]
cmp edx, 0x10
jb 0x405ae8
mov ecx, dword [ebp - 0x30]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x405ade
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x405ade
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.00410dcc
add esp, 8
mov esi, dword [edi + 0x10]
sub esp, 0x18
mov edx, esp
mov dword [ebp - 0x20], 0
mov ecx, esi
mov dword [ebp - 0x1c], 0xf
mov byte [ebp - 0x30], 0
mov dword [ebp - 0x10], esp
mov dword [edx], 0
mov dword [edx + 0x10], 0
lea ebx, [ecx + 1]
mov dword [edx + 0x14], 0xf
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405b20
sub ecx, ebx
push ecx
push esi
mov ecx, edx
call fcn.0040f0c0
mov dword [ebp - 4], 4
sub esp, 0x18
mov esi, dword [edi + 4]
mov edx, esp
mov ecx, esi
mov dword [ebp - 0x18], esp
mov dword [edx], 0
mov dword [edx + 0x10], 0
lea ebx, [ecx + 1]
mov dword [edx + 0x14], 0xf
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405b60
sub ecx, ebx
push ecx
push esi
mov ecx, edx
call fcn.0040f0c0
mov byte [ebp - 4], 5
cmp dword [0x41ba6c], 0
jne 0x405bb2
push 0x600
call fcn.00410a36
mov esi, eax
mov dword [ebp - 0x14], esi
push 0x600
push 0
push esi
mov byte [ebp - 4], 6
call sub.VCRUNTIME140.dll_memset
add esp, 0x10
mov ecx, esi
call fcn.00401d40
mov byte [ebp - 4], 5
mov dword [0x41ba6c], eax
mov dword [ebp - 4], 0xffffffff
call fcn.004027a0
mov eax, dword [0x41ba6c]
test eax, eax
jne 0x405c00
push 0x600
call fcn.00410a36
mov esi, eax
mov dword [ebp - 0x14], esi
push 0x600
push 0
push esi
mov dword [ebp - 4], 7
call sub.VCRUNTIME140.dll_memset
add esp, 0x10
mov ecx, esi
call fcn.00401d40
mov dword [ebp - 4], 0xffffffff
mov dword [0x41ba6c], eax
push dword [edi]
mov ecx, eax
call fcn.00402d50
test al, al
jne 0x405c97
mov esi, dword [edi]
sub esp, 0x18
mov edx, esp
mov dword [ebp - 0x14], esp
mov ecx, esi
mov dword [edx], 0
mov dword [edx + 0x10], 0
lea ebx, [ecx + 1]
mov dword [edx + 0x14], 0xf
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405c34
sub ecx, ebx
push ecx
push esi
mov ecx, edx
call fcn.0040f0c0
mov dword [ebp - 4], 8
mov eax, dword [0x41ba6c]
test eax, eax
jne 0x405c89
push 0x600
call fcn.00410a36
mov esi, eax
mov dword [ebp - 0x18], esi
push 0x600
push 0
push esi
mov byte [ebp - 4], 9
call sub.VCRUNTIME140.dll_memset
add esp, 0x10
mov ecx, esi
call fcn.00401d40
mov byte [ebp - 4], 8
mov dword [0x41ba6c], eax
mov ecx, eax
mov dword [ebp - 4], 0xffffffff
call fcn.00402450
mov ecx, edi
call fcn.00405f40
push 1
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x14], esp
push 0
push 0x41469c
mov dword [ecx], 0
mov dword [ecx + 0x10], 0
mov dword [ecx + 0x14], 0xf
call fcn.0040f0c0
mov dword [ebp - 4], 0xa
sub esp, 0x18
mov esi, dword [edi + 4]
mov edx, esp
mov ecx, esi
mov dword [ebp - 0x18], esp
mov dword [edx], 0
mov dword [edx + 0x10], 0
lea edi, [ecx + 1]
mov dword [edx + 0x14], 0xf
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405cf3
sub ecx, edi
push ecx
push esi
mov ecx, edx
call fcn.0040f0c0
mov byte [ebp - 4], 0xb
mov eax, dword [0x41ba6c]
test eax, eax
jne 0x405d45
push 0x600
call fcn.00410a36
mov esi, eax
mov dword [ebp - 0x10], esi
push 0x600
push 0
push esi
mov byte [ebp - 4], 0xc
call sub.VCRUNTIME140.dll_memset
add esp, 0x10
mov ecx, esi
call fcn.00401d40
mov byte [ebp - 4], 0xb
mov dword [0x41ba6c], eax
mov ecx, eax
mov dword [ebp - 4], 0xffffffff
call fcn.00402250
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret