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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x728
push ebx
push esi
push edi
mov dword [ebp - 0x4c], ecx
push dword [ebp + 8]
call fcn.0040be20
lea ecx, [ebp - 0x40]
mov ebx, eax
call fcn.00407a46
push 0
sub esp, 0x1c
mov ecx, esp
push 1
pop esi
push esi
push dword [ebp + 8]
call fcn.0040c8b2
lea ecx, [ebp - 0x40]
call fcn.00407a7d
test al, al
je 0x40bdff
push 0
push ebx
lea ecx, [ebp - 0x40]
call fcn.0040cf2a
lea eax, [ebp - 0x728]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [ebp - 8], eax
jne 0x40b5fd
lea ecx, [ebp - 8]
call fcn.0041fda6
mov esi, 0xfffffcdb
jmp 0x40bc95
mov edi, dword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, dword [ebp - 0x708]
test edi, edi
mov dword [ebp - 0x18], ecx
je 0x40b617
push eax
call edi
or dword [ebp - 8], 0xffffffff
push 0x4000
call fcn.00420f25
mov dword [ebp + 8], eax
xor eax, eax
cmp dword [ebp + 0x10], eax
pop ecx
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
je 0x40b663
push eax
lea eax, [ebp - 0x110]
push 0x44c410
push eax
mov dword [ebp - 0x10], esi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x110]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push eax
push 0x44c41c
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
cmp ebx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov dword [ebp - 4], ebx
jae 0x40bc07
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
push 0
lea ecx, [ebp - 0x40]
push dword [ebp - 4]
call fcn.0040cf2a
mov ebx, 0x104
lea ecx, [ebp - 0x40]
push ebx
push dword [ebp + 8]
call fcn.004081a0
push dword [ebp + 8]
lea eax, [ebp - 0x2d0]
push eax
call esi
lea eax, [ebp - 0x2d0]
push eax
call edi
mov ecx, dword [ebp - 4]
push 0
lea eax, [ecx + eax + 1]
lea ecx, [ebp - 0x40]
push eax
mov dword [ebp - 4], eax
call fcn.0040cf2a
push ebx
lea ecx, [ebp - 0x40]
push dword [ebp + 8]
call fcn.004081a0
push dword [ebp + 8]
lea eax, [ebp - 0x4d8]
push eax
call esi
lea eax, [ebp - 0x4d8]
push eax
call edi
mov ecx, dword [ebp - 4]
push 0
lea eax, [ecx + eax + 1]
lea ecx, [ebp - 0x40]
push eax
mov dword [ebp - 4], eax
call fcn.0040cf2a
push ebx
lea ecx, [ebp - 0x40]
push dword [ebp + 8]
call fcn.004081a0
push dword [ebp + 8]
lea eax, [ebp - 0x12c]
push eax
call esi
lea eax, [ebp - 0x12c]
push eax
call edi
mov ecx, dword [ebp - 4]
push 0
lea ebx, [ecx + eax + 1]
lea ecx, [ebp - 0x40]
push ebx
call fcn.0040cf2a
push 0xf
lea ecx, [ebp - 0x40]
push dword [ebp + 8]
call fcn.004081a0
push 0xa
push dword [ebp + 8]
call fcn.0040c8e3
pop ecx
mov dword [ebp - 0xc], eax
pop ecx
push dword [ebp + 8]
call edi
lea eax, [ebx + eax + 1]
push 0
mov dword [ebp - 4], eax
lea eax, [ebp - 0x4d8]
push eax
lea ecx, [ebp - 0xe4]
mov dword [ebp - 0xd8], 0x44655c
mov dword [ebp - 0xd0], 0x446554
call fcn.00403191
mov ebx, 0x446550
mov dword [ebp - 0xe4], ebx
lea eax, [ebp - 0x154]
lea ecx, [ebp - 0xe4]
push eax
call fcn.004071b4
push 0
push eax
lea ecx, [ebp - 0x6c]
mov dword [ebp - 0x60], 0x44655c
mov dword [ebp - 0x58], 0x446554
call fcn.00406d6e
lea ecx, [ebp - 0x154]
mov dword [ebp - 0x6c], ebx
call fcn.00402544
push dword [ebp + 0xc]
lea eax, [ebp - 0x3d4]
push eax
call esi
lea eax, [ebp - 0x3d4]
push 0x44caa4
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
cmp dword [ebp - 0x5c], 0
je 0x40b8b3
push dword [ebp - 0x5c]
call dword [sym.imp.OLEAUT32.dll_VariantInit]
test eax, eax
jbe 0x40b8b3
lea ecx, [ebp - 0x6c]
call fcn.00402c9d
push dword [ebp - 0x68]
lea eax, [ebp - 0x3d4]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x3d4]
push 0
push eax
lea ecx, [ebp - 0x100]
mov dword [ebp - 0xf4], 0x44655c
mov dword [ebp - 0xec], 0x446554
call fcn.00403191
lea ecx, [ebp - 0x100]
mov dword [ebp - 0x100], ebx
call fcn.00402c9d
push dword [ebp - 0xfc]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40b8a8
mov ecx, dword [ebp - 0x4c]
lea eax, [ebp - 0x100]
push eax
call fcn.0040bee7
cmp dword [ebp + 0x10], 0
je 0x40b8a8
mov eax, dword [ebp - 0x10]
inc dword [ebp - 0x10]
push eax
lea eax, [ebp - 0x110]
push 0x44c410
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x3d4]
push dword [ebp + 0x10]
push eax
lea eax, [ebp - 0x110]
push eax
push 0x44c41c
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
lea ecx, [ebp - 0x100]
call fcn.00402544
lea eax, [ebp - 0x2d0]
push eax
lea eax, [ebp - 0x3d4]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x2d0]
push 0
push eax
lea ecx, [ebp - 0xc8]
mov dword [ebp - 0xbc], 0x44655c
mov dword [ebp - 0xb4], 0x446554
call fcn.00403191
lea eax, [ebp - 0x1a4]
push 0
push eax
lea ecx, [ebp - 0xc8]
mov dword [ebp - 0xc8], ebx
call fcn.0040ca01
mov ebx, eax
mov ecx, ebx
call fcn.00402c9d
mov ebx, dword [ebx + 4]
push 0x44ca9c
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
mov ebx, eax
lea ecx, [ebp - 0x1a4]
neg ebx
sbb bl, bl
inc bl
call fcn.00402544
test bl, bl
je 0x40b98c
lea eax, [ebp - 0x2d0]
push 5
push eax
lea eax, [ebp - 0x9c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
lea eax, [ebp - 0x9c]
push 0x44ca94
push eax
call ebx
test eax, eax
jne 0x40b98c
lea eax, [ebp - 0x2d0]
push 0x44ca88
push eax
call ebx
test eax, eax
je 0x40b98c
cmp byte [ebp + 0x14], 0
jne 0x40b98c
mov ebx, dword [ebp - 4]
add ebx, dword [ebp - 0xc]
mov dword [ebp - 4], ebx
jmp 0x40bbda
lea ecx, [ebp - 0x94]
call fcn.00407a46
push 2
lea eax, [ebp - 0x3d4]
sub esp, 0x1c
mov ecx, esp
push 1
push eax
call fcn.0040c8b2
lea ecx, [ebp - 0x94]
call fcn.004080b2
test al, al
je 0x40bcb3
mov ebx, 0x4000
cmp dword [ebp - 0xc], ebx
jl 0x40ba15
push 0
lea ecx, [ebp - 0x40]
push dword [ebp - 4]
call fcn.0040cf2a
push ebx
lea ecx, [ebp - 0x40]
push dword [ebp + 8]
call fcn.004081a0
lea eax, [ebp - 0x50]
push 0
add dword [ebp - 4], ebx
push eax
push ebx
push dword [ebp + 8]
push dword [ebp - 0x90]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40ba04
mov eax, dword [ebp - 0x50]
jmp 0x40ba07
or eax, 0xffffffff
cmp eax, 0xffffffff
je 0x40bd1c
sub dword [ebp - 0xc], ebx
jmp 0x40b9c4
cmp dword [ebp - 0xc], 0
jle 0x40ba65
push 0
lea ecx, [ebp - 0x40]
push dword [ebp - 4]
call fcn.0040cf2a
mov ebx, dword [ebp - 0xc]
lea ecx, [ebp - 0x40]
push ebx
push dword [ebp + 8]
call fcn.004081a0
lea eax, [ebp - 0x44]
push 0
add dword [ebp - 4], ebx
push eax
push ebx
push dword [ebp + 8]
push dword [ebp - 0x90]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40ba59
mov eax, dword [ebp - 0x44]
jmp 0x40ba5c
or eax, 0xffffffff
cmp eax, 0xffffffff
je 0x40bd85
lea ecx, [ebp - 0x94]
call fcn.00407f7d
lea eax, [ebp - 0x17c]
lea ecx, [ebp - 0xe4]
push eax
call fcn.0040c9bd
mov ebx, eax
mov ecx, ebx
call fcn.00402c9d
mov eax, dword [ebx + 4]
lea ecx, [ebp - 0xc8]
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x1cc]
push eax
call fcn.0040c9bd
mov ebx, eax
mov ecx, ebx
call fcn.00402c9d
push dword [ebp - 0xc]
mov ebx, dword [ebx + 4]
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
lea ecx, [ebp - 0x1cc]
setne bl
call fcn.00402544
lea ecx, [ebp - 0x17c]
call fcn.00402544
test bl, bl
je 0x40bb79
push dword [ebp + 0xc]
lea eax, [ebp - 0x2d0]
push eax
call esi
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x2d0]
push 0x44caa4
push eax
call ebx
lea eax, [ebp - 0x4d8]
push eax
lea eax, [ebp - 0x2d0]
push eax
call ebx
lea eax, [ebp - 0x5e8]
push 0
push eax
lea eax, [ebp - 0x3d4]
push eax
call sub.LZ32.dll_LZOpenFileA
mov ebx, eax
lea eax, [ebp - 0x560]
push 0x1001
push eax
lea eax, [ebp - 0x2d0]
push eax
call sub.LZ32.dll_LZOpenFileA
push eax
push ebx
mov dword [ebp - 0xc], eax
call sub.LZ32.dll_LZCopy
push ebx
mov dword [ebp - 0x48], eax
call sub.LZ32.dll_LZClose
push dword [ebp - 0xc]
call sub.LZ32.dll_LZClose
cmp dword [ebp - 0x48], 0
jle 0x40bb79
lea eax, [ebp - 0x3d4]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea eax, [ebp - 0x2d0]
push eax
lea eax, [ebp - 0x3d4]
push eax
call esi
cmp dword [ebp + 0x10], 0
je 0x40bbb7
mov eax, dword [ebp - 0x14]
inc dword [ebp - 0x14]
push eax
lea eax, [ebp - 0xac]
push 0x44c474
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x3d4]
push dword [ebp + 0x10]
push eax
lea eax, [ebp - 0xac]
push eax
push 0x44c46c
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
lea ecx, [ebp - 0x94]
mov dword [ebp - 0x94], 0x4465c0
call fcn.00407f7d
lea ecx, [ebp - 0x8c]
call fcn.00402544
mov ebx, dword [ebp - 4]
lea ecx, [ebp - 0xc8]
call fcn.00402544
lea ecx, [ebp - 0x6c]
call fcn.00402544
lea ecx, [ebp - 0xe4]
call fcn.00402544
cmp ebx, dword [ebp - 0x18]
jb 0x40b67b
mov edi, dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp + 0x10], 0
je 0x40bc77
push dword [ebp - 0x14]
mov ebx, dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0xac]
push 0x44c474
push eax
call ebx
add esp, 0xc
lea eax, [ebp - 0xac]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push eax
push 0x44c46c
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
push dword [ebp - 0x10]
lea eax, [ebp + 0x14]
push 0x44ca84
push eax
call ebx
add esp, 0xc
lea eax, [ebp - 0xac]
push 0x44c3fc
push eax
call esi
push dword [ebp + 0x10]
lea eax, [ebp + 0x14]
push eax
lea eax, [ebp - 0xac]
push eax
push 0x44c41c
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
push dword [ebp + 8]
call fcn.00420a94
cmp dword [ebp - 8], 0xffffffff
pop ecx
je 0x40bc93
test edi, edi
je 0x40bc93
push dword [ebp - 8]
call edi
or dword [ebp - 8], 0xffffffff
xor esi, esi
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x40], 0x4465c0
call fcn.00407f7d
lea ecx, [ebp - 0x38]
call fcn.00402544
mov eax, esi
jmp 0x40be19
push dword [ebp + 8]
call fcn.00420a94
pop ecx
mov dword [ebp - 0x94], 0x4465c0
lea ecx, [ebp - 0x94]
call fcn.00407f7d
lea ecx, [ebp - 0x8c]
call fcn.00402544
lea ecx, [ebp - 0xc8]
call fcn.00402544
lea ecx, [ebp - 0x6c]
call fcn.00402544
lea ecx, [ebp - 0xe4]
call fcn.00402544
cmp dword [ebp - 8], 0xffffffff
je 0x40bd12
mov eax, dword [sym.imp.KERNEL32.dll_FindClose]
test eax, eax
je 0x40bd12
push dword [ebp - 8]
call eax
or dword [ebp - 8], 0xffffffff
mov esi, 0xfffffce0
jmp 0x40bc95
push dword [ebp + 8]
call fcn.00420a94
pop ecx
mov dword [ebp - 0x94], 0x4465c0
lea ecx, [ebp - 0x94]
call fcn.00407f7d
lea ecx, [ebp - 0x8c]
call fcn.00402544
lea ecx, [ebp - 0xc8]
call fcn.00402544
lea ecx, [ebp - 0x6c]
call fcn.00402544
lea ecx, [ebp - 0xe4]
call fcn.00402544
cmp dword [ebp - 8], 0xffffffff
je 0x40bd7b
mov eax, dword [sym.imp.KERNEL32.dll_FindClose]
test eax, eax
je 0x40bd7b
push dword [ebp - 8]
call eax
or dword [ebp - 8], 0xffffffff
mov esi, 0xfffffcda
jmp 0x40bc95
push dword [ebp + 8]
call fcn.00420a94
pop ecx
mov esi, 0x4465c0
lea ecx, [ebp - 0x94]
mov dword [ebp - 0x94], esi
call fcn.00407f7d
lea ecx, [ebp - 0x8c]
call fcn.00402544
lea ecx, [ebp - 0xc8]
call fcn.00402544
lea ecx, [ebp - 0x6c]
call fcn.00402544
lea ecx, [ebp - 0xe4]
call fcn.00402544
cmp dword [ebp - 8], 0xffffffff
je 0x40bde5
mov eax, dword [sym.imp.KERNEL32.dll_FindClose]
test eax, eax
je 0x40bde5
push dword [ebp - 8]
call eax
or dword [ebp - 8], 0xffffffff
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x40], esi
call fcn.00407f7d
lea ecx, [ebp - 0x38]
call fcn.00402544
mov eax, 0xfffffcda
jmp 0x40be19
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x40], 0x4465c0
call fcn.00407f7d
lea ecx, [ebp - 0x38]
call fcn.00402544
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret 0x10