Function at 0x40b890
Capabilities:
Copy file
Create directory
Get common file path
Set file attributes

Disassembly:
sub esp, 0x480
push ebx
mov ebx, dword [esp + 0x490]
push ebp
push esi
push edi
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [ecx + ebx - 1], al
mov byte [esp + 0x18], al
lea eax, [esp + 0x10]
mov ecx, 0x428420
push eax
push 1
call fcn.0040aaa0
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40b926
mov eax, dword [0x42845c]
lea ecx, [esp + 0x290]
push 0x200
push ecx
push 0x45b
push eax
call dword [sym.imp.USER32.dll_LoadStringA]
mov edx, dword [0x422c84]
mov ecx, dword [esp + 0x494]
or edx, 4
lea eax, [esp + 0x290]
push edx
push 0x428504
push eax
push ecx
call dword [sym.imp.USER32.dll_MessageBoxA]
sub eax, 6
neg eax
sbb eax, eax
add eax, 0xfffffffe
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x480
ret
lea edx, [esp + 0x48]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea eax, [esp + 0x48]
push 0
push eax
call fcn.004136d0
add esp, 8
cmp eax, 0xffffffff
jne 0x40b957
lea ecx, [esp + 0x48]
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea edi, [esp + 0x48]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp byte [esp + ecx + 0x47], 0x5c
je 0x40b99a
mov edi, 0x4220bc
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x48]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ebp, dword [esp + 0x498]
or ecx, 0xffffffff
mov edi, ebp
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [ecx + ebp - 1]
mov cl, byte [ecx + ebp - 1]
cmp cl, 0x5c
je 0x40b9c9
mov esi, dword [sym.imp.USER32.dll_CharPrevA]
push eax
push ebp
call esi
cmp byte [eax], 0x5c
jne 0x40b9c0
push eax
call dword [sym.imp.USER32.dll_CharNextA]
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x48]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push eax
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x4c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
push ebp
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x40bb93
mov eax, dword [0x4290bc]
mov edi, 0x426bb0
or ecx, 0xffffffff
push 0x80
lea edx, [eax + 0x28c4]
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x4c]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov al, byte [0x428ee8]
test al, al
jne 0x40ba71
mov eax, dword [0x428ec4]
lea edx, [esp + 0x18]
test eax, eax
je 0x40ba6a
mov edi, 0x422c50
jmp 0x40ba7a
mov edi, 0x422c44
jmp 0x40ba7a
lea edx, [esp + 0x18]
mov edi, 0x428ee8
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov al, byte [esp + 0x18]
test al, al
je 0x40bac1
lea ecx, [esp + 0x18]
lea edx, [esp + 0x48]
push ecx
push ebx
push edx
lea eax, [esp + 0x19c]
push 0x422c34
push eax
call fcn.00413140
add esp, 0x14
jmp 0x40badc
lea ecx, [esp + 0x48]
push ebx
push ecx
lea edx, [esp + 0x198]
push 0x422c2c
push edx
call fcn.00413140
add esp, 0x10
lea eax, [esp + 0x38]
lea ecx, [esp + 0x14c]
push eax
lea edx, [esp + 0x194]
push ecx
lea eax, [esp + 0x50]
push edx
push eax
mov ecx, 0x428420
call fcn.00409b70
test eax, eax
je 0x40bb93
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
mov ebp, dword [sym.imp.USER32.dll_FindWindowA]
xor eax, eax
xor esi, esi
cmp esi, 0x78
jge 0x40bb32
push 0x1f4
call edi
push 0
push 0x422c18
call ebp
inc esi
test eax, eax
je 0x40bb18
test eax, eax
je 0x40bb93
lea ecx, [esp + 0x14]
push ecx
push eax
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov edx, dword [esp + 0x14]
push edx
push 0
push 0x100400
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edx, eax
test edx, edx
je 0x40bb93
mov eax, dword [0x4290bc]
lea edi, [esp + 0x48]
or ecx, 0xffffffff
lea ebx, [eax + 0x28c4]
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x480
ret
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x480
ret