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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
push ebx
lea ecx, [ebp - 0x20c]
push esi
push edi
push dword [ebp + 8]
push ecx
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
call edi
cmp byte [ebp - 0x20c], 0x22
jne 0x1002228
lea eax, [ebp - 0x20b]
push 0x1001374
mov dword [ebp - 4], eax
jmp 0x1002236
lea eax, [ebp - 0x20c]
push 0x1001370
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
call fcn.01002176
push dword [ebp - 4]
mov ebx, eax
call fcn.01002934
test eax, eax
jne 0x100226c
push 0x10113d4
lea eax, [ebp - 0x108]
push eax
call edi
push dword [ebp - 4]
lea ecx, [ebp - 0x108]
push ecx
call fcn.010028f3
jmp 0x1002278
push dword [ebp - 4]
lea ecx, [ebp - 0x108]
push ecx
call edi
push 0x2e
push dword [ebp - 4]
call fcn.01006870
add esp, 8
test eax, eax
je 0x10023d4
push 0x1001368
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x10023d4
push 0x1001364
mov dword [ebp - 4], ebx
lea ebx, [ebp - 4]
push ebx
call fcn.01002176
mov esi, eax
push 0x10110e8
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test esi, esi
je 0x10022e8
cmp byte [esi], 0
je 0x10022cb
mov dword [ebp - 4], esi
push 0x1001360
lea eax, [ebp - 4]
push eax
call fcn.01002176
mov eax, dword [ebp - 4]
cmp byte [eax], 0
je 0x10022e8
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push 0x200
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
xor eax, eax
test esi, esi
jne 0x1002314
push eax
push 0x10
push eax
push eax
push 0x4b5
push eax
call fcn.010044fb
xor eax, eax
jmp 0x10024ea
mov eax, dword [ebp - 4]
mov ecx, eax
cmp byte [eax], 0
jne 0x1002323
mov ecx, 0x10110e8
lea eax, [ebp - 0x108]
push eax
push 0
push 0x1001358
push ecx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov ecx, dword [ebp + 0x10]
lea edx, [ebp - 0x108]
push edx
mov dword [0x1017b2c], eax
push 8
mov dword [ecx], 1
push esi
push 0x1001354
push 0x1001348
push 0x1001340
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test eax, eax
je 0x100238f
mov eax, dword [ebp - 4]
or byte [0x1011c24], 4
cmp byte [eax], 0
jne 0x100237d
mov eax, 0x10110e8
push eax
push dword [ebp + 8]
call edi
lea ecx, [ebp - 0x108]
push ecx
jmp 0x10024dd
mov eax, dword [ebp - 4]
and byte [0x1011c24], 0xfb
cmp byte [eax], 0
jne 0x10023a3
mov eax, 0x10110e8
cmp word [0x1017ef4], 0
lea ecx, [ebp - 0x108]
push ecx
push eax
mov eax, 0x1001334
je 0x10023bf
mov eax, 0x1001324
push eax
push 0x1011048
push esi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x14
jmp 0x10024e0
push 0x2e
push dword [ebp - 4]
call fcn.01006870
add esp, 8
test eax, eax
je 0x1002459
push 0x100131c
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x1002459
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
push str.Command.com__c__s
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add esi, eax
add esi, 8
push esi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
jne 0x100243e
push 0
push 0x10
push 0
push 0
push 0x4b5
push 0
call fcn.010044fb
xor eax, eax
jmp 0x10024ea
lea eax, [ebp - 0x108]
push eax
push str.Command.com__c__s
push esi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
jmp 0x10024e0
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add esi, eax
add esi, 0xa
push esi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
xor eax, eax
test esi, esi
jne 0x100249b
push eax
push 0x10
push eax
push eax
push 0x4b5
push eax
call fcn.010044fb
xor eax, eax
jmp 0x10024ea
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x10024da
test al, 0x10
jne 0x10024da
lea eax, [ebp - 0x108]
push eax
push esi
call edi
test ebx, ebx
je 0x10024e0
cmp byte [ebx], 0
je 0x10024e0
push 0x1001370
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatA]
jmp 0x10024e0
push dword [ebp + 8]
push esi
call edi
mov eax, dword [ebp + 0xc]
mov dword [eax], esi
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc