Function at 0x40b539
Capabilities:
Check if file exists
Copy file
Delete file
Get file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x724
push ebx
push esi
push edi
mov dword [ebp - 0x4c], ecx
push dword [ebp + 8]
call fcn.0040bd0d
lea ecx, [ebp - 0x38]
mov ebx, eax
call fcn.00407a28
push 0
sub esp, 0x1c
mov ecx, esp
push 1
pop esi
push esi
push dword [ebp + 8]
call fcn.0040c835
lea ecx, [ebp - 0x38]
call fcn.00407a5f
test al, al
je 0x40bcec
push 0
push ebx
lea ecx, [ebp - 0x38]
call fcn.0040ce3c
lea eax, [ebp - 0x724]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
jne 0x40b5a7
mov esi, 0xfffffcdb
jmp 0x40bc01
mov edi, dword [ebp - 0x704]
push eax
mov dword [ebp - 0x44], edi
call dword [sym.imp.KERNEL32.dll_FindClose]
push 0x4000
call fcn.00420be5
mov dword [ebp - 4], eax
xor eax, eax
cmp dword [ebp + 0x10], eax
pop ecx
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
je 0x40b603
push eax
lea eax, [ebp - 0x10c]
push str.Folder_d
push eax
mov dword [ebp - 0xc], esi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x10c]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push eax
push str.Folders
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
cmp ebx, edi
mov dword [ebp + 8], ebx
jae 0x40bb94
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
push 0
lea ecx, [ebp - 0x38]
push dword [ebp + 8]
call fcn.0040ce3c
mov ebx, 0x104
lea ecx, [ebp - 0x38]
push ebx
push dword [ebp - 4]
call fcn.0040817b
push dword [ebp - 4]
lea eax, [ebp - 0x2cc]
push eax
call esi
lea eax, [ebp - 0x2cc]
push eax
call edi
mov ecx, dword [ebp + 8]
push 0
lea eax, [ecx + eax + 1]
lea ecx, [ebp - 0x38]
push eax
mov dword [ebp + 8], eax
call fcn.0040ce3c
push ebx
lea ecx, [ebp - 0x38]
push dword [ebp - 4]
call fcn.0040817b
push dword [ebp - 4]
lea eax, [ebp - 0x4d4]
push eax
call esi
lea eax, [ebp - 0x4d4]
push eax
call edi
mov ecx, dword [ebp + 8]
push 0
lea eax, [ecx + eax + 1]
lea ecx, [ebp - 0x38]
push eax
mov dword [ebp + 8], eax
call fcn.0040ce3c
push ebx
lea ecx, [ebp - 0x38]
push dword [ebp - 4]
call fcn.0040817b
push dword [ebp - 4]
lea eax, [ebp - 0x128]
push eax
call esi
lea eax, [ebp - 0x128]
push eax
call edi
mov ecx, dword [ebp + 8]
push 0
lea ebx, [ecx + eax + 1]
lea ecx, [ebp - 0x38]
push ebx
call fcn.0040ce3c
push 0xf
lea ecx, [ebp - 0x38]
push dword [ebp - 4]
call fcn.0040817b
push 0xa
push dword [ebp - 4]
call fcn.0040c79b
pop ecx
mov dword [ebp - 8], eax
pop ecx
push dword [ebp - 4]
call edi
lea eax, [ebx + eax + 1]
push 0
mov dword [ebp + 8], eax
lea eax, [ebp - 0x4d4]
push eax
lea ecx, [ebp - 0xe0]
mov dword [ebp - 0xd4], 0x446564
mov dword [ebp - 0xcc], 0x44655c
call fcn.00403177
mov ebx, 0x446558
mov dword [ebp - 0xe0], ebx
lea eax, [ebp - 0x1c8]
lea ecx, [ebp - 0xe0]
push eax
call fcn.004071b2
push 0
push eax
lea ecx, [ebp - 0x70]
mov dword [ebp - 0x64], 0x446564
mov dword [ebp - 0x5c], 0x44655c
call fcn.00406d6c
lea ecx, [ebp - 0x1c8]
mov dword [ebp - 0x70], ebx
call fcn.0040252a
push dword [ebp + 0xc]
lea eax, [ebp - 0x3d0]
push eax
call esi
lea eax, [ebp - 0x3d0]
push 0x44caa4
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
cmp dword [ebp - 0x60], 0
je 0x40b852
push dword [ebp - 0x60]
call dword [sym.imp.OLEAUT32.dll_VariantInit]
test eax, eax
jbe 0x40b852
lea ecx, [ebp - 0x70]
call fcn.00402db3
push dword [ebp - 0x6c]
lea eax, [ebp - 0x3d0]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x3d0]
push 0
push eax
lea ecx, [ebp - 0xfc]
mov dword [ebp - 0xf0], 0x446564
mov dword [ebp - 0xe8], 0x44655c
call fcn.00403177
lea ecx, [ebp - 0xfc]
mov dword [ebp - 0xfc], ebx
call fcn.00402db3
push dword [ebp - 0xf8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40b847
mov ecx, dword [ebp - 0x4c]
lea eax, [ebp - 0xfc]
push eax
call fcn.0040bdd4
cmp dword [ebp + 0x10], 0
je 0x40b847
mov eax, dword [ebp - 0xc]
inc dword [ebp - 0xc]
push eax
lea eax, [ebp - 0x10c]
push str.Folder_d
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x3d0]
push dword [ebp + 0x10]
push eax
lea eax, [ebp - 0x10c]
push eax
push str.Folders
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
lea ecx, [ebp - 0xfc]
call fcn.0040252a
lea eax, [ebp - 0x2cc]
push eax
lea eax, [ebp - 0x3d0]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x2cc]
push 0
push eax
lea ecx, [ebp - 0xc4]
mov dword [ebp - 0xb8], 0x446564
mov dword [ebp - 0xb0], 0x44655c
call fcn.00403177
lea eax, [ebp - 0x1a0]
push 0
push eax
lea ecx, [ebp - 0xc4]
mov dword [ebp - 0xc4], ebx
call fcn.0040c8ea
mov ebx, eax
mov ecx, ebx
call fcn.00402db3
mov ebx, dword [ebx + 4]
push 0x44ca9c
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
mov ebx, eax
lea ecx, [ebp - 0x1a0]
neg ebx
sbb bl, bl
inc bl
call fcn.0040252a
test bl, bl
je 0x40b925
lea eax, [ebp - 0x2cc]
push 5
push eax
lea eax, [ebp - 0x54]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
lea eax, [ebp - 0x54]
push str.data
push eax
call ebx
test eax, eax
jne 0x40b925
lea eax, [ebp - 0x2cc]
push str.data1.cab
push eax
call ebx
test eax, eax
je 0x40b925
cmp byte [ebp + 0x14], 0
jne 0x40b925
mov ebx, dword [ebp + 8]
add ebx, dword [ebp - 8]
mov dword [ebp + 8], ebx
jmp 0x40bb6d
lea ecx, [ebp - 0xa8]
call fcn.00407a28
push 2
lea eax, [ebp - 0x3d0]
sub esp, 0x1c
mov ecx, esp
push 1
push eax
call fcn.0040c835
lea ecx, [ebp - 0xa8]
call fcn.0040808d
test al, al
je 0x40bc1f
mov ebx, 0x4000
cmp dword [ebp - 8], ebx
jl 0x40b9ae
push 0
lea ecx, [ebp - 0x38]
push dword [ebp + 8]
call fcn.0040ce3c
push ebx
lea ecx, [ebp - 0x38]
push dword [ebp - 4]
call fcn.0040817b
lea eax, [ebp - 0x48]
push 0
add dword [ebp + 8], ebx
push eax
push ebx
push dword [ebp - 4]
push dword [ebp - 0xa4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40b99d
mov eax, dword [ebp - 0x48]
jmp 0x40b9a0
or eax, 0xffffffff
cmp eax, 0xffffffff
je 0x40bc26
sub dword [ebp - 8], ebx
jmp 0x40b95d
cmp dword [ebp - 8], 0
jle 0x40b9fe
push 0
lea ecx, [ebp - 0x38]
push dword [ebp + 8]
call fcn.0040ce3c
mov ebx, dword [ebp - 8]
lea ecx, [ebp - 0x38]
push ebx
push dword [ebp - 4]
call fcn.0040817b
lea eax, [ebp - 0x3c]
push 0
add dword [ebp + 8], ebx
push eax
push ebx
push dword [ebp - 4]
push dword [ebp - 0xa4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40b9f2
mov eax, dword [ebp - 0x3c]
jmp 0x40b9f5
or eax, 0xffffffff
cmp eax, 0xffffffff
je 0x40bc8a
lea ecx, [ebp - 0xa8]
call fcn.00407f58
lea eax, [ebp - 0x178]
lea ecx, [ebp - 0xe0]
push eax
call fcn.0040c8a6
mov ebx, eax
mov ecx, ebx
call fcn.00402db3
mov eax, dword [ebx + 4]
lea ecx, [ebp - 0xc4]
mov dword [ebp - 8], eax
lea eax, [ebp - 0x150]
push eax
call fcn.0040c8a6
mov ebx, eax
mov ecx, ebx
call fcn.00402db3
push dword [ebp - 8]
mov ebx, dword [ebx + 4]
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
lea ecx, [ebp - 0x150]
setne bl
call fcn.0040252a
lea ecx, [ebp - 0x178]
call fcn.0040252a
test bl, bl
je 0x40bb12
push dword [ebp + 0xc]
lea eax, [ebp - 0x2cc]
push eax
call esi
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x2cc]
push 0x44caa4
push eax
call ebx
lea eax, [ebp - 0x4d4]
push eax
lea eax, [ebp - 0x2cc]
push eax
call ebx
lea eax, [ebp - 0x5e4]
push 0
push eax
lea eax, [ebp - 0x3d0]
push eax
call sub.LZ32.dll_LZOpenFileA
mov ebx, eax
lea eax, [ebp - 0x55c]
push 0x1001
push eax
lea eax, [ebp - 0x2cc]
push eax
call sub.LZ32.dll_LZOpenFileA
push eax
push ebx
mov dword [ebp - 8], eax
call sub.LZ32.dll_LZCopy
push ebx
mov dword [ebp - 0x40], eax
call sub.LZ32.dll_LZClose
push dword [ebp - 8]
call sub.LZ32.dll_LZClose
cmp dword [ebp - 0x40], 0
jle 0x40bb12
lea eax, [ebp - 0x3d0]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea eax, [ebp - 0x2cc]
push eax
lea eax, [ebp - 0x3d0]
push eax
call esi
cmp dword [ebp + 0x10], 0
je 0x40bb4a
mov eax, dword [ebp - 0x10]
inc dword [ebp - 0x10]
push eax
lea eax, [ebp - 0x80]
push str.File_d
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x3d0]
push dword [ebp + 0x10]
push eax
lea eax, [ebp - 0x80]
push eax
push str.Files
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
lea ecx, [ebp - 0xa8]
mov dword [ebp - 0xa8], 0x4465c8
call fcn.00407f58
lea ecx, [ebp - 0xa0]
call fcn.0040252a
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 0xc4]
call fcn.0040252a
lea ecx, [ebp - 0x70]
call fcn.0040252a
lea ecx, [ebp - 0xe0]
call fcn.0040252a
cmp ebx, dword [ebp - 0x44]
jb 0x40b61a
cmp dword [ebp + 0x10], 0
je 0x40bbf6
push dword [ebp - 0x10]
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0x80]
push str.File_d
push eax
call edi
add esp, 0xc
mov ebx, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
lea eax, [ebp - 0x80]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push eax
push str.Files
call ebx
push dword [ebp - 0xc]
lea eax, [ebp + 0x14]
push 0x44ca84
push eax
call edi
add esp, 0xc
lea eax, [ebp - 0x80]
push str.FolderCount
push eax
call esi
push dword [ebp + 0x10]
lea eax, [ebp + 0x14]
push eax
lea eax, [ebp - 0x80]
push eax
push str.Folders
call ebx
push dword [ebp - 4]
call fcn.00420754
pop ecx
xor esi, esi
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x38], 0x4465c8
call fcn.00407f58
lea ecx, [ebp - 0x30]
call fcn.0040252a
mov eax, esi
jmp 0x40bd06
mov edi, 0xfffffce0
jmp 0x40bc2b
mov edi, 0xfffffcda
push dword [ebp - 4]
call fcn.00420754
pop ecx
mov esi, 0x4465c8
lea ecx, [ebp - 0xa8]
mov dword [ebp - 0xa8], esi
call fcn.00407f58
lea ecx, [ebp - 0xa0]
call fcn.0040252a
lea ecx, [ebp - 0xc4]
call fcn.0040252a
lea ecx, [ebp - 0x70]
call fcn.0040252a
lea ecx, [ebp - 0xe0]
call fcn.0040252a
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x38], esi
call fcn.00407f58
lea ecx, [ebp - 0x30]
call fcn.0040252a
mov eax, edi
jmp 0x40bd06
push dword [ebp - 4]
call fcn.00420754
pop ecx
mov esi, 0x4465c8
lea ecx, [ebp - 0xa8]
mov dword [ebp - 0xa8], esi
call fcn.00407f58
lea ecx, [ebp - 0xa0]
call fcn.0040252a
lea ecx, [ebp - 0xc4]
call fcn.0040252a
lea ecx, [ebp - 0x70]
call fcn.0040252a
lea ecx, [ebp - 0xe0]
call fcn.0040252a
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x38], esi
call fcn.00407f58
lea ecx, [ebp - 0x30]
call fcn.0040252a
mov eax, 0xfffffcda
jmp 0x40bd06
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x38], 0x4465c8
call fcn.00407f58
lea ecx, [ebp - 0x30]
call fcn.0040252a
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret 0x10