Function at 0x4017ea
Capabilities:
Check if file exists
Get file attributes
Read .ini file

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x620
mov eax, dword [0x40700c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov dword [ebp - 0x620], ecx
mov ecx, dword [ebp + 0xc]
push edi
mov dword [ebp - 0x618], eax
mov dword [ebp - 0x61c], ecx
mov edx, eax
mov edi, 0x104
mov eax, edi
lea ecx, [ebp - 0x20c]
call fcn.0040148d
cmp byte [ebp - 0x20c], 0x22
jne 0x40185e
lea eax, [ebp - 0x20b]
mov dword [ebp - 0x610], eax
push 0x401070
lea eax, [ebp - 0x610]
push eax
call fcn.0040177e
mov ebx, eax
mov dword [ebp - 0x614], ebx
jmp 0x401883
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x610], eax
push 0x401074
lea eax, [ebp - 0x610]
push eax
call fcn.0040177e
mov ebx, eax
mov dword [ebp - 0x614], eax
mov esi, dword [ebp - 0x610]
test esi, esi
je 0x4018c7
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401892
sub ecx, edx
cmp ecx, 3
jb 0x4018c7
mov al, byte [esi + 1]
cmp al, 0x3a
jne 0x4018ad
cmp byte [esi + 2], 0x5c
je 0x4018b6
cmp byte [esi], 0x5c
jne 0x4018c7
cmp al, 0x5c
jne 0x4018c7
mov edx, esi
mov eax, edi
lea ecx, [ebp - 0x108]
call fcn.0040148d
jmp 0x4018e7
mov edx, 0x408304
mov eax, edi
lea ecx, [ebp - 0x108]
call fcn.0040148d
push edi
mov eax, esi
lea ecx, [ebp - 0x108]
call fcn.00406177
push 0x2e
mov eax, esi
call fcn.0040623e
mov edi, dword [sym.imp.KERNEL32.dll_CompareStringA]
test eax, eax
je 0x401aa3
push 0xffffffffffffffff
push 0x401078
push 0xffffffffffffffff
push eax
push 1
push 0x7f
call edi
dec eax
dec eax
jne 0x401aa3
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x401a84
shr eax, 4
not eax
and eax, 1
je 0x401a84
push 0x401080
lea eax, [ebp - 0x610]
push eax
mov dword [ebp - 0x610], ebx
call fcn.0040177e
test eax, eax
je 0x401971
cmp byte [eax], 0
je 0x401960
mov dword [ebp - 0x610], eax
push 0x401084
lea eax, [ebp - 0x610]
push eax
call fcn.0040177e
push 0x200
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
test edi, edi
jne 0x401995
xor eax, eax
push eax
push 0x10
push eax
push eax
push 0x4b5
jmp 0x401a96
mov esi, dword [ebp - 0x610]
cmp byte [esi], 0
mov ebx, 0x4071d8
mov eax, esi
jne 0x4019a9
mov eax, ebx
lea ecx, [ebp - 0x108]
push ecx
push 0
push 0x401088
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov dword [0x408b64], eax
mov eax, dword [ebp - 0x61c]
mov dword [eax], 1
lea eax, [ebp - 0x108]
push eax
push 8
push edi
push 0x401044
push 0x401090
push 0x40109c
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test eax, eax
je 0x401a29
or dword [0x408b54], 4
cmp byte [esi], 0
jne 0x401a00
mov esi, ebx
mov ecx, dword [ebp - 0x618]
mov edx, esi
mov esi, 0x104
call fcn.00401395
lea edx, [ebp - 0x108]
mov esi, 0x200
mov ecx, edi
call fcn.00401395
jmp 0x401ba3
and dword [0x408b54], 0xfffffffb
cmp word [0x408b60], 0
jne 0x401a54
push 0x104
lea eax, [ebp - 0x108]
push eax
push eax
mov ebx, 0x4010a4
call dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
jmp 0x401a59
mov ebx, 0x4010b0
cmp byte [esi], 0
jne 0x401a63
mov esi, 0x4071d8
lea eax, [ebp - 0x108]
push eax
push esi
push ebx
push 0x407144
push 0x200
push edi
call fcn.00401425
add esp, 0x18
jmp 0x401ba3
xor eax, eax
push eax
push 0x10
push eax
lea ecx, [ebp - 0x108]
push ecx
push 0x525
push eax
call fcn.004040e2
xor eax, eax
jmp 0x401bae
push 0x2e
mov eax, esi
call fcn.0040623e
test eax, eax
je 0x401b18
push 0xffffffffffffffff
push 0x4010c0
push 0xffffffffffffffff
push eax
push 1
push 0x7f
call edi
dec eax
dec eax
jne 0x401b18
mov ebx, str.Command.com__c__s
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401ace
sub ecx, edx
lea edx, [ebp - 0x108]
lea esi, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x401ae0
sub edx, esi
lea esi, [ecx + 8]
add esi, edx
push esi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
test edi, edi
je 0x401984
lea eax, [ebp - 0x108]
push eax
push ebx
push esi
push edi
call fcn.00401425
add esp, 0x10
jmp 0x401ba3
mov esi, 0x400
push esi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
test edi, edi
je 0x401984
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x401b83
test al, 0x10
jne 0x401b83
lea edx, [ebp - 0x108]
mov eax, esi
lea ecx, [ebp - 0x60c]
call fcn.0040148d
test ebx, ebx
je 0x401b96
cmp byte [ebx], 0
je 0x401b96
push 0x401074
mov eax, esi
lea ebx, [ebp - 0x60c]
call fcn.004013c0
push dword [ebp - 0x614]
mov eax, esi
call fcn.004013c0
jmp 0x401b96
mov edx, dword [ebp - 0x618]
mov eax, esi
lea ecx, [ebp - 0x60c]
call fcn.0040148d
mov edx, edi
lea ecx, [ebp - 0x60c]
call fcn.004027da
mov ecx, dword [ebp - 0x620]
xor eax, eax
mov dword [ecx], edi
inc eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004068a6
leave
ret 8