Function at 0x4119a0
Capabilities:
Check if file exists
Enumerate files on windows
Get common file path
Read .ini file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xf44
mov eax, dword [0x5f3008]
xor eax, esp
mov dword [esp + 0xf40], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [0x616724]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0x10]
push edi
mov edi, dword [0x6167a4]
cmp word [edi + 0x1932], 0
mov dword [esp + 0x20], eax
mov eax, dword [ebp + 0x18]
mov dword [esp + 0x1c], eax
lea eax, [edi + 0x1932]
mov dword [esp + 0xc], esi
mov dword [esp + 0x24], edi
mov word [esp + 0x28], 0xfeff
jne 0x411a86
push esi
push 0x200
lea eax, [esp + 0x350]
push eax
push 0x5aaa4c
push str.Default
push str.Path
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov ecx, 0x5aaa4c
lea eax, [esp + 0x348]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x411a56
test dx, dx
je 0x411a52
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x411a56
add eax, 4
add ecx, 4
test dx, dx
jne 0x411a30
xor eax, eax
jmp 0x411a5b
sbb eax, eax
or eax, 1
test eax, eax
je 0x411a71
lea eax, [esp + 0x348]
push eax
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x411ada
lea eax, [esp + 0x348]
push eax
push 0x200
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
jmp 0x411ada
push eax
lea eax, [esp + 0x34c]
or esi, 0xffffffff
push 0x200
push eax
call fcn.00565fee
mov ax, word [esp + 0x354]
add esp, 0xc
xor ecx, ecx
test ax, ax
je 0x411acc
movzx edx, ax
cmp dx, 0x5c
mov eax, ecx
cmovne eax, esi
inc ecx
mov esi, eax
movzx eax, word [esp + ecx*2 + 0x348]
mov edx, eax
test ax, ax
jne 0x411ab1
xor eax, eax
mov word [esp + esi*2 + 0x34a], ax
mov esi, dword [esp + 0xc]
xor eax, eax
lea ebx, [edi + 0x1d32]
push 0x50
push eax
mov word [ebx], ax
lea eax, [edi + 0x18e2]
push eax
call fcn.00563680
mov eax, dword [esp + 0x1c]
add esp, 0xc
mov dword [edi + 0x18da], 0x58
mov dword [edi + 0x18de], eax
push 0xfffffffffffffffa
push eax
call dword [sym.imp.USER32.dll_GetWindowLongW]
mov dword [edi + 0x18e2], eax
mov ecx, 0x5aaa70
lea eax, [esp + 0x348]
mov dword [edi + 0x18f6], ebx
mov dword [edi + 0x1906], eax
mov eax, 0x5aaae8
mov dword [edi + 0x18fa], 0x200
cmp word [esi + 0x634c], 1
cmove eax, ecx
mov dword [edi + 0x18e6], eax
mov eax, dword [esp + 0x20]
mov dword [edi + 0x190a], 0x5aab5c
mov dword [edi + 0x190e], 0x88187c
mov dword [edi + 0x191e], 0x410de0
mov dword [edi + 0x1922], 0x422
mov dword [eax], 0
mov al, byte [edi + 0x1839]
mov byte [0x5f64df], al
test al, al
je 0x411b9c
movzx eax, word [edi + 0x183a]
jmp 0x411b9e
xor eax, eax
mov word [0x6160bc], ax
mov eax, 0x378
cmp word [esi + 0x7570], ax
jne 0x411bbe
mov ebx, 1
mov eax, 0x5f64e8
jmp 0x411bdc
push 0x5aab94
push 0x41
push 0x5f64e8
call fcn.00565fee
add esp, 0xc
mov ebx, 2
mov eax, 0x5f656a
push 0x5aab7c
push 0x41
push eax
call fcn.00565fee
imul eax, ebx, 0x82
add esp, 0xc
push 0x5aaa4c
push 0x41
lea esi, [eax + 0x5f64e8]
push esi
call fcn.00565fee
mov edx, dword [esp + 0x18]
lea eax, [esp + 0xb54]
add esp, 0xc
mov cl, 1
push eax
call fcn.004089c0
add esp, 4
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0xb4c]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [esp + 0x18], eax
cmp eax, 0xffffffff
mov eax, dword [sym.imp.USER32.dll_MessageBoxW]
mov dword [esp + 0x14], eax
je 0x411d44
mov edi, dword [esp + 0xc]
nop dword [eax + eax]
mov edx, esi
lea ecx, [esp + 0x5c]
call fcn.00408b30
push 0x5aaa4c
lea eax, [esi + 0x82]
push 0x41
push eax
call fcn.00565fee
add esp, 0xc
cmp word [edi + 0x3802], 0
je 0x411cc4
mov ecx, esi
lea eax, [edi + 0x3802]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x411ca9
test dx, dx
je 0x411ca5
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x411ca9
add eax, 4
add ecx, 4
test dx, dx
jne 0x411c83
xor edx, edx
jmp 0x411cae
sbb edx, edx
or edx, 1
movzx ecx, word [0x5f64dc]
test edx, edx
movzx eax, bx
cmove ecx, eax
mov word [0x5f64dc], cx
lea eax, [esp + 0x30]
push eax
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x411ce3
inc ebx
add esi, 0x82
jmp 0x411c50
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp edi, 0x12
je 0x411d36
push 0x7d0
call fcn.00560858
add esp, 4
mov esi, eax
push edi
push 0xbb9
push 0x5aabac
push 0x5aa1dc
push 0x1f4
push esi
call fcn.00406c50
add esp, 0x18
push 0x30
push 0x591508
push esi
push dword [esp + 0x1c]
call dword [esp + 0x24]
push esi
call fcn.00560853
add esp, 4
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_FindClose]
mov edi, dword [esp + 0x24]
lea eax, [edi + 0x18da]
push eax
call dword [sym.imp.COMDLG32.dll_GetOpenFileNameW]
mov ebx, eax
mov esi, 1
mov eax, dword [esp + 0xc]
lea edx, [esi + 1]
movzx ecx, word [eax + 0x634c]
cmp cx, si
jne 0x411d84
cmp dword [edi + 0x18f2], esi
je 0x411d9f
cmp dword [edi + 0x18f2], edx
jne 0x411d91
mov word [eax + 0x634c], dx
jmp 0x411d98
cmp cx, dx
jne 0x411d91
cmp dword [edi + 0x18f2], esi
je 0x411d9f
mov word [eax + 0x634c], si
mov eax, dword [esp + 0x1c]
mov byte [eax], 1
mov dword [0x5f64b8], 0
test ebx, ebx
je 0x4120f6
lea eax, [edi + 0x1d32]
or esi, 0xffffffff
push eax
lea eax, [esp + 0x74c]
push 0x200
push eax
call fcn.00565fee
mov ax, word [esp + 0x754]
add esp, 0xc
xor ecx, ecx
test ax, ax
je 0x411dfd
movzx edx, ax
cmp dx, 0x5c
mov eax, ecx
cmovne eax, esi
inc ecx
mov esi, eax
movzx eax, word [esp + ecx*2 + 0x748]
mov edx, eax
test ax, ax
jne 0x411de2
xor eax, eax
lea ecx, [esp + 0x748]
mov word [esp + esi*2 + 0x74a], ax
lea eax, [esp + 0x348]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x411e3b
test dx, dx
je 0x411e37
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x411e3b
add eax, 4
add ecx, 4
test dx, dx
jne 0x411e15
xor eax, eax
jmp 0x411e40
sbb eax, eax
or eax, 1
test eax, eax
je 0x411f18
mov esi, dword [esp + 0xc]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x411eff
push eax
push 0x80
push 2
push eax
push eax
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x411edf
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x7d0
mov esi, eax
call fcn.00560858
add esp, 4
mov edi, eax
push esi
push 0xf9f
push 0x5aabc8
push 0x5aa1dc
push 0x1f4
push edi
call fcn.00406c50
add esp, 0x18
push 0x30
push 0x591508
push edi
push dword [esp + 0x1c]
call dword [esp + 0x24]
push edi
call fcn.00560853
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xf40]
xor ecx, esp
call fcn.0056060a
mov esp, ebp
pop ebp
ret 0x14
push 0
lea eax, [esp + 0x30]
push eax
push 2
lea eax, [esp + 0x34]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [esp + 0xc]
push esi
lea eax, [esp + 0x74c]
push eax
push str.Default
push str.Path
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
cmp byte [0x5f64df], 0
mov ax, word [0x6160bc]
je 0x411f29
inc ax
mov word [edi + 0x3932], ax
lea esi, [edi + 0x3936]
mov eax, dword [esp + 0xc]
mov edx, 0x378
cmp word [eax + 0x7570], dx
jne 0x411f87
mov ax, word [0x5f64dc]
test ax, ax
jne 0x411f6b
mov edx, 1
mov eax, 0x5aaa4c
mov word [edi + 0x3934], dx
mov ecx, esi
jmp 0x411fe3
cwde
mov edx, 3
imul eax, eax, 0x82
mov ecx, esi
mov word [edi + 0x3934], dx
add eax, 0x5f64e8
jmp 0x411fe3
movsx edx, word [0x5f64dc]
mov eax, edx
sub eax, 0
je 0x411fba
sub eax, 1
je 0x411fb3
mov eax, 3
mov word [edi + 0x3934], ax
imul eax, edx, 0x82
add eax, 0x5f64e8
jmp 0x411fcb
mov eax, 1
jmp 0x411fbf
mov eax, 2
mov word [edi + 0x3934], ax
mov eax, 0x5aaa4c
push eax
push 0x41
push esi
call fcn.00565fee
mov ecx, dword [esp + 0x18]
add esp, 0xc
add ecx, 0x3802
mov eax, esi
push eax
push 0x41
push ecx
call fcn.00565fee
add esp, 0xc
lea esi, [edi + 0x1d32]
mov ecx, esi
call fcn.0040d890
test eax, eax
jne 0x4120cf
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp eax, 5
jl 0x4120cf
cmp word [esi + eax*2 - 8], 0x2e
jne 0x4120cf
movzx ecx, word [esi + eax*2 - 6]
cmp ecx, 0x7a
je 0x412033
cmp ecx, 0x5a
jne 0x4120cf
movzx ecx, word [esi + eax*2 - 4]
cmp ecx, 0x69
je 0x412046
cmp ecx, 0x49
jne 0x4120cf
movzx eax, word [esi + eax*2 - 2]
cmp eax, 0x70
je 0x412055
cmp eax, 0x50
jne 0x4120cf
xor eax, eax
lea edi, [esp + 0x280]
mov ecx, 0x32
lea edx, [esp + 0x280]
rep stosd dword es:[edi], eax
mov ecx, esi
call fcn.0040b6d0
mov ecx, dword [esp + 0x20]
mov dword [ecx], eax
test eax, eax
jne 0x412095
push 0x30
push 0x591508
push 0x5aabe4
push dword [esp + 0x1c]
call dword [esp + 0x24]
xor ebx, ebx
jmp 0x4120f6
xor esi, esi
nop word [eax + eax]
mov eax, dword [esi + 0x616938]
test eax, eax
je 0x4120b5
push 2
push eax
call fcn.00560815
add esp, 8
mov eax, dword [esp + esi + 0x280]
mov dword [esi + 0x616938], eax
add esi, 4
cmp esi, 0xc8
jl 0x4120a0
jmp 0x4120f6
mov esi, 0x616938
mov eax, dword [esi]
test eax, eax
je 0x4120f6
push 2
push eax
call fcn.00560815
mov dword [esi], 0
add esp, 8
add esi, 4
cmp esi, 0x616a00
jl 0x4120d4
mov ecx, dword [esp + 0xf4c]
mov eax, ebx
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0056060a
mov esp, ebp
pop ebp
ret 0x14