Function at 0x408330
Capabilities:
Check if file exists
Copy file
Move file
Read .ini file

Disassembly:
sub esp, 0xcf8
push ebx
push ebp
mov ebp, ecx
push edi
xor ebx, ebx
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0xa1]
mov byte [esp + 0xa0], bl
mov word [esp + 0x6fc], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x6fe]
mov byte [esp + 0x2ec], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x2ed]
mov byte [esp + 0x1e8], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x1e9]
mov byte [esp + 0x904], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0xff
xor eax, eax
lea edi, [esp + 0x905]
mov byte [esp + 0x60], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0xf
xor eax, eax
lea edi, [esp + 0x61]
mov byte [esp + 0x20], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0xf
xor eax, eax
lea edi, [esp + 0x21]
mov byte [esp + 0x4f4], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x4f5]
mov dword [esp + 0xc], ebx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esp + 0xd08]
cmp eax, ebx
je 0x408412
mov dword [eax], ebx
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea esi, [ebp + 0x14]
lea eax, [esp + 0x64]
push esi
push 0x40
push eax
push ebx
push 0x420998
push 0x420a44
call edi
test eax, eax
je 0x40877b
push esi
lea ecx, [esp + 0x90c]
push 0x400
push ecx
push ebx
push 0x420a40
push 0x420a44
call edi
test eax, eax
je 0x40877b
lea edx, [esp + 0xa4]
push 0x104
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x4084d4
lea eax, [esp + 0x24]
push 0x40
lea ecx, [esp + 0xa8]
push eax
push ecx
call fcn.0040ad20
add esp, 0xc
test eax, eax
je 0x4084c7
lea edx, [esp + 0x24]
push 1
lea eax, [esp + 0x68]
push edx
push eax
mov byte [esp + 0xb0], bl
call fcn.0040a6e0
add esp, 0xc
test eax, eax
jg 0x4084b8
mov ebx, 1
jmp 0x40877f
mov ecx, dword [esp + 0xd0c]
mov dword [ecx], 1
jmp 0x4084d4
mov edx, dword [esp + 0xd0c]
mov dword [edx], 1
lea eax, [ebp + 0x118]
push 0x104
lea ecx, [esp + 0xa8]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea edx, [esp + 0xa4]
push 0x4202a0
push edx
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
push esi
lea eax, [esp + 0x4fc]
push 0x104
push eax
push ebx
push 0x420a38
push 0x420a44
call edi
test eax, eax
je 0x40877b
lea ecx, [esp + 0x4f8]
lea edx, [esp + 0xa4]
push ecx
lea eax, [esp + 0x90c]
push edx
push eax
mov ecx, ebp
call fcn.00409440
test eax, eax
je 0x40877b
lea ecx, [esp + 0x700]
push 0x104
push ecx
lea edx, [esp + 0xac]
push 0xffffffffffffffff
push edx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
je 0x40877f
lea eax, [esp + 0x700]
push eax
call fcn.0040afc0
test eax, eax
je 0x40877f
cmp dword [ebp + 4], ebx
jne 0x40877b
lea ecx, [esp + 0x24]
push 0x40
lea edx, [esp + 0xa8]
push ecx
push edx
call fcn.0040ad20
add esp, 0xc
test eax, eax
je 0x40877f
lea eax, [esp + 0x24]
push 1
lea ecx, [esp + 0x68]
push eax
push ecx
call fcn.0040a6e0
add esp, 0xc
test eax, eax
jne 0x40877f
lea edx, [esp + 0x2f0]
push 0x104
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x40877f
lea eax, [esp + 0x2f0]
push 0x104
lea ecx, [esp + 0x1f0]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea edx, [esp + 0x1ec]
push edx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x3f5]
mov byte [esp + 0x3f4], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x4209a0
push 0x420258
stosb byte es:[edi], al
push 0x420694
lea eax, [esp + 0x400]
push 0x104
push eax
call dword [sym.imp.SHLWAPI.dll_wnsprintfA]
add esp, 0x14
lea ecx, [esp + 0x3f4]
lea edx, [esp + 0x1ec]
push ecx
push edx
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
mov esi, dword [sym.imp.KERNEL32.dll_MoveFileExA]
lea eax, [esp + 0x1ec]
push 1
lea ecx, [esp + 0x2f4]
push eax
push ecx
call esi
test eax, eax
je 0x40877f
lea edx, [esp + 0x2f0]
push ebx
lea eax, [esp + 0xa8]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
lea ecx, [esp + 0xa4]
push 1
test eax, eax
push ecx
jne 0x4086cd
call fcn.00402410
add esp, 8
lea edx, [esp + 0x2f0]
lea eax, [esp + 0x1ec]
push 2
push edx
push eax
call esi
jmp 0x40877f
call fcn.00402410
lea edx, [esp + 0x1f4]
push 1
push edx
call fcn.00402410
mov ecx, 0x11
xor eax, eax
lea edi, [esp + 0x1b8]
lea edx, [esp + 0x60c]
rep stosd dword es:[edi], eax
mov dword [esp + 0x24], eax
lea ecx, [esp + 0x300]
mov dword [esp + 0x28], eax
push ecx
push 0x42039c
mov dword [esp + 0x34], eax
push 0x104
push edx
mov dword [esp + 0x1c8], 0x44
mov dword [esp + 0x40], eax
call sub.MSVCRT.dll__snprintf
add esp, 0x20
lea eax, [esp + 0x14]
lea ecx, [esp + 0x1a8]
lea edx, [esp + 0x5fc]
push eax
push ecx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push edx
push ebx
call fcn.00405810
test eax, eax
je 0x40877f
mov eax, dword [esp + 0x14]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call esi
mov ecx, dword [esp + 0x18]
push ecx
call esi
mov edx, dword [0x421940]
push edx
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov ebx, 1
jmp 0x40877f
mov ebx, dword [esp + 0x10]
lea eax, [esp + 0xa4]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
pop esi
je 0x4087a4
lea ecx, [esp + 0xa0]
push 1
push ecx
call fcn.00402410
add esp, 8
pop edi
mov eax, ebx
pop ebp
pop ebx
add esp, 0xcf8
ret 4