Function at 0x40187a
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 [section..data]
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.0040151d
cmp byte [ebp - 0x20c], 0x22
jne 0x4018ee
lea eax, [ebp - 0x20b]
mov dword [ebp - 0x610], eax
push 0x4010fc
lea eax, [ebp - 0x610]
push eax
call fcn.0040180e
mov ebx, eax
mov dword [ebp - 0x614], ebx
jmp 0x401913
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x610], eax
push 0x401100
lea eax, [ebp - 0x610]
push eax
call fcn.0040180e
mov ebx, eax
mov dword [ebp - 0x614], eax
mov esi, dword [ebp - 0x610]
test esi, esi
je 0x401957
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401922
sub ecx, edx
cmp ecx, 3
jb 0x401957
mov al, byte [esi + 1]
cmp al, 0x3a
jne 0x40193d
cmp byte [esi + 2], 0x5c
je 0x401946
cmp byte [esi], 0x5c
jne 0x401957
cmp al, 0x5c
jne 0x401957
mov edx, esi
mov eax, edi
lea ecx, [ebp - 0x108]
call fcn.0040151d
jmp 0x401977
mov edx, 0x409604
mov eax, edi
lea ecx, [ebp - 0x108]
call fcn.0040151d
push edi
mov eax, esi
lea ecx, [ebp - 0x108]
call fcn.00406206
push 0x2e
mov eax, esi
call fcn.004062cd
mov edi, dword [sym.imp.KERNEL32.dll_CompareStringA]
test eax, eax
je 0x401b33
push 0xffffffffffffffff
push 0x401104
push 0xffffffffffffffff
push eax
push 1
push 0x7f
call edi
dec eax
dec eax
jne 0x401b33
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x401b14
shr eax, 4
not eax
and eax, 1
je 0x401b14
push 0x40110c
lea eax, [ebp - 0x610]
push eax
mov dword [ebp - 0x610], ebx
call fcn.0040180e
test eax, eax
je 0x401a01
cmp byte [eax], 0
je 0x4019f0
mov dword [ebp - 0x610], eax
push 0x401110
lea eax, [ebp - 0x610]
push eax
call fcn.0040180e
push 0x200
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
test edi, edi
jne 0x401a25
xor eax, eax
push eax
push 0x10
push eax
push eax
push 0x4b5
jmp 0x401b26
mov esi, dword [ebp - 0x610]
cmp byte [esi], 0
mov ebx, 0x4084e0
mov eax, esi
jne 0x401a39
mov eax, ebx
lea ecx, [ebp - 0x108]
push ecx
push 0
push 0x401114
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov dword [0x409e64], eax
mov eax, dword [ebp - 0x61c]
mov dword [eax], 1
lea eax, [ebp - 0x108]
push eax
push 8
push edi
push 0x4010d1
push 0x40111c
push 0x401128
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test eax, eax
je 0x401ab9
or dword [0x409e54], 4
cmp byte [esi], 0
jne 0x401a90
mov esi, ebx
mov ecx, dword [ebp - 0x618]
mov edx, esi
mov esi, 0x104
call fcn.00401425
lea edx, [ebp - 0x108]
mov esi, 0x200
mov ecx, edi
call fcn.00401425
jmp 0x401c33
and dword [0x409e54], 0xfffffffb
cmp word [0x409e60], 0
jne 0x401ae4
push 0x104
lea eax, [ebp - 0x108]
push eax
push eax
mov ebx, 0x401130
call dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
jmp 0x401ae9
mov ebx, 0x40113c
cmp byte [esi], 0
jne 0x401af3
mov esi, 0x4084e0
lea eax, [ebp - 0x108]
push eax
push esi
push ebx
push 0x40844c
push 0x200
push edi
call fcn.004014b5
add esp, 0x18
jmp 0x401c33
xor eax, eax
push eax
push 0x10
push eax
lea ecx, [ebp - 0x108]
push ecx
push 0x525
push eax
call fcn.00404172
xor eax, eax
jmp 0x401c3e
push 0x2e
mov eax, esi
call fcn.004062cd
test eax, eax
je 0x401ba8
push 0xffffffffffffffff
push 0x40114c
push 0xffffffffffffffff
push eax
push 1
push 0x7f
call edi
dec eax
dec eax
jne 0x401ba8
mov ebx, str.Command.com__c__s
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401b5e
sub ecx, edx
lea edx, [ebp - 0x108]
lea esi, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x401b70
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 0x401a14
lea eax, [ebp - 0x108]
push eax
push ebx
push esi
push edi
call fcn.004014b5
add esp, 0x10
jmp 0x401c33
mov esi, 0x400
push esi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
test edi, edi
je 0x401a14
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x401c13
test al, 0x10
jne 0x401c13
lea edx, [ebp - 0x108]
mov eax, esi
lea ecx, [ebp - 0x60c]
call fcn.0040151d
test ebx, ebx
je 0x401c26
cmp byte [ebx], 0
je 0x401c26
push 0x401100
mov eax, esi
lea ebx, [ebp - 0x60c]
call fcn.00401450
push dword [ebp - 0x614]
mov eax, esi
call fcn.00401450
jmp 0x401c26
mov edx, dword [ebp - 0x618]
mov eax, esi
lea ecx, [ebp - 0x60c]
call fcn.0040151d
mov edx, edi
lea ecx, [ebp - 0x60c]
call fcn.0040286a
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.00406935
leave
ret 8