Function at 0x401c70
Capabilities:
Enumerate files on windows
Get common file path
Get file attributes
Read .ini file
Set current directory
Set file attributes

Disassembly:
push 0xffffffffffffffff
push 0x423112
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x390
mov eax, dword [0x42d350]
push ebx
push ebp
mov ebp, ecx
push esi
push edi
mov dword [esp + 0x14], ebp
mov dword [esp + 0x10], eax
lea ecx, [esp + 0x29c]
mov dword [esp + 0x3a8], 0
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
jne 0x401cd1
push eax
push eax
push str.Cannot_retrieve_file_path
call fcn.0041ec03
jmp 0x402429
lea edi, [ebp + 0x90]
lea edx, [esp + 0x29c]
push edx
mov ecx, edi
call fcn.004191a4
lea eax, [esp + 0x58]
push eax
push 0x42d1b4
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x18], eax
jne 0x401d41
push str.No_setup_files_found._n
lea ecx, [esp + 0x14]
call fcn.004191a4
lea ecx, [esp + 0x10]
lea esi, [ebp + 0x5c]
push ecx
lea edx, [esp + 0x1c]
push esi
push edx
call fcn.0041924a
push eax
mov ecx, esi
mov byte [esp + 0x3ac], 1
call fcn.00419154
mov byte [esp + 0x3a8], 0
lea ecx, [esp + 0x18]
jmp 0x402424
mov eax, dword [0x42d350]
mov dword [esp + 0x24], eax
mov byte [esp + 0x3a8], 2
mov bl, 3
mov esi, 0x42d198
lea eax, [esp + 0x84]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x401d84
test cl, cl
je 0x401d80
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x401d84
add eax, 2
add esi, 2
test cl, cl
jne 0x401d60
xor eax, eax
jmp 0x401d89
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x401e6d
mov esi, 0x42d194
lea eax, [esp + 0x84]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x401dc1
test cl, cl
je 0x401dbd
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x401dc1
add eax, 2
add esi, 2
test cl, cl
jne 0x401d9d
xor eax, eax
jmp 0x401dc6
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x401e6d
lea eax, [esp + 0x84]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test al, 0x10
je 0x401e54
push 0x42d190
lea ecx, [esp + 0x24]
push edi
push ecx
call fcn.004192b0
lea edx, [esp + 0x84]
mov byte [esp + 0x3a8], bl
push edx
push eax
lea eax, [esp + 0x30]
push eax
call fcn.004192b0
push eax
lea ecx, [esp + 0x28]
mov byte [esp + 0x3ac], 4
call fcn.00419154
lea ecx, [esp + 0x28]
mov byte [esp + 0x3a8], bl
call fcn.0041901b
lea ecx, [esp + 0x20]
mov byte [esp + 0x3a8], 2
call fcn.0041901b
mov eax, dword [ebp + 0x9c]
lea ecx, [ebp + 0x94]
lea edx, [esp + 0x24]
push edx
push eax
call fcn.00417348
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x58]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
je 0x401e85
jmp 0x401d54
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x58]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x401d54
mov eax, dword [ebp + 0x9c]
test eax, eax
jne 0x401ed1
push str.No_setup_files_found._n
lea ecx, [esp + 0x14]
call fcn.004191a4
lea ecx, [esp + 0x10]
lea esi, [ebp + 0x5c]
push ecx
lea edx, [esp + 0x24]
push esi
push edx
call fcn.0041924a
push eax
mov ecx, esi
mov byte [esp + 0x3ac], 5
call fcn.00419154
mov byte [esp + 0x3a8], 2
lea ecx, [esp + 0x20]
jmp 0x402413
xor edi, edi
test eax, eax
jle 0x402007
add ebp, 0x94
mov bl, 7
lea eax, [esp + 0x20]
push edi
push eax
mov ecx, ebp
call fcn.00402810
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea ecx, [esp + 0x20]
call fcn.0041901b
lea ecx, [esp + 0x58]
push ecx
push str..inf
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x18], eax
je 0x401ff4
mov edx, dword [esp + 0x14]
lea esi, [edx + 0x68]
lea eax, [esp + 0x1c]
push edi
push eax
mov ecx, ebp
call fcn.00402810
push 0x42d190
lea ecx, [esp + 0x3c]
push eax
push ecx
mov byte [esp + 0x3b4], 6
call fcn.004192b0
lea edx, [esp + 0x84]
mov byte [esp + 0x3a8], bl
push edx
push eax
lea eax, [esp + 0x30]
push eax
call fcn.004192b0
push eax
lea ecx, [esp + 0x28]
mov byte [esp + 0x3ac], 8
call fcn.00419154
lea ecx, [esp + 0x28]
mov byte [esp + 0x3a8], bl
call fcn.0041901b
lea ecx, [esp + 0x38]
mov byte [esp + 0x3a8], 6
call fcn.0041901b
lea ecx, [esp + 0x1c]
mov byte [esp + 0x3a8], 2
call fcn.0041901b
mov eax, dword [esi + 8]
lea ecx, [esp + 0x24]
push ecx
push eax
mov ecx, esi
call fcn.00417348
lea edx, [esp + 0x84]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test al, 1
je 0x401fdc
and al, 0xfe
push eax
lea eax, [esp + 0x88]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x58]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x401f26
mov eax, dword [esp + 0x14]
inc edi
cmp edi, dword [eax + 0x9c]
jl 0x401ee3
mov ebp, eax
mov eax, dword [ebp + 0x70]
test eax, eax
jne 0x402050
push str.No_setup_files_found._n
lea ecx, [esp + 0x14]
call fcn.004191a4
lea ecx, [esp + 0x10]
lea esi, [ebp + 0x5c]
push ecx
lea edx, [esp + 0x20]
push esi
push edx
call fcn.0041924a
push eax
mov ecx, esi
mov byte [esp + 0x3ac], 9
call fcn.00419154
mov byte [esp + 0x3a8], 2
lea ecx, [esp + 0x1c]
jmp 0x402413
push str.set_up_files_found.
push eax
lea eax, [esp + 0x18]
push str._d__s
push eax
call fcn.00416dcf
add esp, 0x10
lea ecx, [esp + 0x10]
lea esi, [ebp + 0x5c]
lea edx, [esp + 0x1c]
push ecx
push esi
push edx
call fcn.0041924a
push eax
mov ecx, esi
mov byte [esp + 0x3ac], 0xa
call fcn.00419154
lea ecx, [esp + 0x1c]
mov byte [esp + 0x3a8], 2
call fcn.0041901b
mov eax, dword [0x42d350]
mov dword [esp + 0x30], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x34], eax
push str.Strings
lea ecx, [esp + 0x34]
mov byte [esp + 0x3ac], 0xd
call fcn.004191a4
push str.DEFAULT
lea ecx, [esp + 0x38]
call fcn.004191a4
mov eax, dword [ebp + 0x84]
xor esi, esi
test eax, eax
jle 0x4023e5
lea edi, [ebp + 0x7c]
lea eax, [esp + 0x1c]
push esi
push eax
mov ecx, edi
call fcn.00402810
push str.MANUFACTURER
mov ecx, eax
mov byte [esp + 0x3ac], 0xe
call fcn.00416a8e
cmp eax, 0xffffffff
lea ecx, [esp + 0x1c]
setne bl
mov byte [esp + 0x3a8], 0xd
call fcn.0041901b
test bl, bl
je 0x40225c
lea ecx, [esp + 0x38]
push esi
push ecx
mov ecx, edi
call fcn.00402810
push 0x3d
mov ecx, eax
mov byte [esp + 0x3ac], 0xf
call fcn.004193bb
lea ecx, [esp + 0x38]
mov ebx, eax
mov byte [esp + 0x3a8], 0xd
call fcn.0041901b
lea edx, [esp + 0x20]
push esi
push edx
mov ecx, edi
call fcn.00402810
mov eax, dword [eax]
lea ecx, [esp + 0x20]
mov ebp, dword [eax - 8]
call fcn.0041901b
lea ecx, [esp + 0x18]
push esi
push ecx
mov ecx, edi
call fcn.00402810
sub ebp, ebx
lea edx, [esp + 0x28]
dec ebp
mov ecx, eax
push ebp
push edx
mov byte [esp + 0x3b0], 0x10
call fcn.00416a12
push eax
lea ecx, [esp + 0x30]
mov byte [esp + 0x3ac], 0x11
call fcn.00419154
lea ecx, [esp + 0x28]
mov byte [esp + 0x3a8], 0x10
call fcn.0041901b
lea ecx, [esp + 0x18]
mov byte [esp + 0x3a8], 0xd
call fcn.0041901b
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x44]
push 0
push eax
add ecx, 0x68
call fcn.00402810
mov eax, dword [eax]
mov ecx, dword [esp + 0x2c]
push eax
mov eax, dword [esp + 0x38]
lea edx, [esp + 0x19c]
push 0x104
push edx
mov edx, dword [esp + 0x3c]
push eax
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea ecx, [esp + 0x44]
call fcn.0041901b
mov ebp, str.DEFAULT
lea eax, [esp + 0x198]
mov dl, byte [eax]
mov bl, byte [ebp]
mov cl, dl
cmp dl, bl
jne 0x40223f
test cl, cl
je 0x40223b
mov dl, byte [eax + 1]
mov bl, byte [ebp + 1]
mov cl, dl
cmp dl, bl
jne 0x40223f
add eax, 2
add ebp, 2
test cl, cl
jne 0x402216
xor eax, eax
jmp 0x402244
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40225c
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x198]
push eax
add ecx, 0x60
call fcn.004191a4
lea edx, [esp + 0x3c]
push esi
push edx
mov ecx, edi
call fcn.00402810
push str.PROVIDER
mov ecx, eax
mov byte [esp + 0x3ac], 0x12
call fcn.00416a8e
cmp eax, 0xffffffff
lea ecx, [esp + 0x3c]
setne bl
mov byte [esp + 0x3a8], 0xd
call fcn.0041901b
test bl, bl
je 0x4023d4
lea eax, [esp + 0x54]
push esi
push eax
mov ecx, edi
call fcn.00402810
push 0x3d
mov ecx, eax
mov byte [esp + 0x3ac], 0x13
call fcn.004193bb
lea ecx, [esp + 0x54]
mov ebx, eax
mov byte [esp + 0x3a8], 0xd
call fcn.0041901b
lea ecx, [esp + 0x4c]
push esi
push ecx
mov ecx, edi
call fcn.00402810
mov edx, dword [eax]
lea ecx, [esp + 0x4c]
mov ebp, dword [edx - 8]
call fcn.0041901b
lea eax, [esp + 0x40]
push esi
push eax
mov ecx, edi
call fcn.00402810
sub ebp, ebx
lea ecx, [esp + 0x50]
dec ebp
mov byte [esp + 0x3a8], 0x14
push ebp
push ecx
mov ecx, eax
call fcn.00416a12
push eax
lea ecx, [esp + 0x30]
mov byte [esp + 0x3ac], 0x15
call fcn.00419154
lea ecx, [esp + 0x50]
mov byte [esp + 0x3a8], 0x14
call fcn.0041901b
lea ecx, [esp + 0x40]
mov byte [esp + 0x3a8], 0xd
call fcn.0041901b
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x48]
push 0
push edx
lea ecx, [eax + 0x68]
call fcn.00402810
mov eax, dword [eax]
mov edx, dword [esp + 0x34]
push eax
mov eax, dword [esp + 0x30]
lea ecx, [esp + 0x19c]
push 0x104
push ecx
mov ecx, dword [esp + 0x3c]
push edx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea ecx, [esp + 0x48]
call fcn.0041901b
mov ebp, str.DEFAULT
lea eax, [esp + 0x198]
mov dl, byte [eax]
mov bl, byte [ebp]
mov cl, dl
cmp dl, bl
jne 0x4023b7
test cl, cl
je 0x4023b3
mov dl, byte [eax + 1]
mov bl, byte [ebp + 1]
mov cl, dl
cmp dl, bl
jne 0x4023b7
add eax, 2
add ebp, 2
test cl, cl
jne 0x40238e
xor eax, eax
jmp 0x4023bc
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4023d4
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x198]
push eax
add ecx, 0x64
call fcn.004191a4
mov edx, dword [esp + 0x14]
inc esi
cmp esi, dword [edx + 0x84]
jl 0x4020e4
lea ecx, [esp + 0x34]
mov byte [esp + 0x3a8], 0xc
call fcn.0041901b
lea ecx, [esp + 0x2c]
mov byte [esp + 0x3a8], 0xb
call fcn.0041901b
mov byte [esp + 0x3a8], 2
lea ecx, [esp + 0x30]
call fcn.0041901b
mov byte [esp + 0x3a8], 0
lea ecx, [esp + 0x24]
call fcn.0041901b
lea ecx, [esp + 0x10]
mov dword [esp + 0x3a8], 0xffffffff
call fcn.0041901b
mov ecx, dword [esp + 0x3a0]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x39c
ret