Function at 0x40b300
Capabilities:
Copy file
Create directory
Delete file
Move file

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x258
mov eax, dword [0x43300c]
mov edi, edx
mov esi, ecx
xor eax, ebp
mov dword [ebp - 0x10], eax
push dword [edx + 4]
push dword [ecx + 4]
call dword [sym.imp.KERNEL32.dll_MoveFileW]
xor ebx, ebx
test eax, eax
je 0x40b343
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040e271
mov eax, ebx
add esp, 0x258
pop esi
pop edi
pop ebx
pop ebp
ret
mov edx, esi
mov dword [ebp - 0x238], 2
mov dword [ebp - 0x234], 0xffffffff
mov dword [ebp - 0x230], 0xffffffff
mov dword [ebp - 0x22c], 0
mov dword [ebp - 0x228], 0
lea ecx, [ebp - 0x238]
push 0
call fcn.0040ade0
add esp, 4
mov edx, dword [ebp - 0x234]
cmp edx, 0xffffffff
je 0x40b3cf
mov eax, edx
and eax, 0x10
je 0x40b3cf
mov eax, dword [ebp + 8]
mov dword [ebp - 0x224], edx
add eax, 0x80
push eax
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x40b49f
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
jmp 0x40b449
mov eax, dword [ebp - 0x230]
lea ecx, [eax + 1]
cmp ecx, 2
jb 0x40b3e8
push eax
mov ebx, edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, ebx
cmp edx, 0xffffffff
mov dword [ebp - 0x230], 0xffffffff
setne al
xor ebx, ebx
cmp edx, 0xffffffff
je 0x40b43c
mov ecx, dword [ebp - 0x238]
cmp ecx, 2
je 0x40b43c
shr edx, 0xa
and dl, al
jne 0x40b43c
cmp ecx, 1
je 0x40b43c
push 1
push dword [edi + 4]
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x40b43c
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x40b484
mov eax, dword [ebp - 0x228]
mov dword [ebp - 0x228], 0
test eax, eax
je 0x40b466
push eax
call fcn.0040da4a
add esp, 4
mov eax, dword [ebp - 0x230]
lea ecx, [eax + 1]
cmp ecx, 2
jb 0x40b32c
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40b32c
push 4
push 0
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test ebx, ebx
js 0x40b449
test eax, eax
je 0x40b3b9
jmp 0x40b449
mov dword [ebp - 0x25c], 2
mov dword [ebp - 0x258], 0xffffffff
mov dword [ebp - 0x254], 0xffffffff
mov dword [ebp - 0x250], 0
mov dword [ebp - 0x24c], 0
lea ecx, [ebp - 0x25c]
mov edx, edi
push 0
call fcn.0040ade0
add esp, 4
push 0x20a
call fcn.0040da41
add esp, 4
mov ebx, eax
add eax, 2
push 0x208
push 0
push eax
call fcn.00410040
add esp, 0xc
mov dword [ebp - 0x244], ebx
mov dword [ebp - 0x248], 0
mov word [ebx], 0
push 0x20a
call fcn.0040da41
add esp, 4
mov ebx, eax
add eax, 2
push 0x208
push 0
push eax
call fcn.00410040
add esp, 0xc
cmp dword [ebp - 0x230], 0xffffffff
mov dword [ebp - 0x23c], ebx
mov word [ebx], 0
mov ebx, 0x80004005
mov dword [ebp - 0x240], 0
je 0x40b5ac
cmp dword [ebp - 0x254], 0xffffffff
je 0x40b5ac
mov eax, dword [ebp - 0x258]
cmp eax, 0xffffffff
je 0x40b5ac
mov ecx, eax
and ecx, 0x10
je 0x40b5ac
test eax, 0x400
jne 0x40b5ac
mov eax, dword [ebp - 0x25c]
dec eax
cmp eax, 2
mov eax, dword [ebp - 0x224]
jb 0x40b5ac
xor ebx, ebx
test eax, 0x400
jne 0x40b5ac
mov eax, dword [ebp - 0x238]
dec eax
cmp eax, 2
jae 0x40b65b
lea edx, [ebp - 0x238]
mov ecx, esi
call fcn.0040b1b0
test eax, eax
jns 0x40b5e6
push 4
push 0
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test ebx, ebx
js 0x40b5e6
test eax, eax
jne 0x40b5e6
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
mov eax, dword [ebp - 0x23c]
mov dword [ebp - 0x23c], 0
test eax, eax
je 0x40b603
push eax
call fcn.0040da4a
add esp, 4
mov eax, dword [ebp - 0x244]
mov dword [ebp - 0x244], 0
test eax, eax
je 0x40b620
push eax
call fcn.0040da4a
add esp, 4
mov eax, dword [ebp - 0x24c]
mov dword [ebp - 0x24c], 0
test eax, eax
je 0x40b63d
push eax
call fcn.0040da4a
add esp, 4
mov eax, dword [ebp - 0x254]
lea ecx, [eax + 1]
cmp ecx, 2
jb 0x40b449
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40b449
lea ebx, [ebp - 0x220]
mov ecx, ebx
push dword [esi + 4]
call fcn.0040d720
call fcn.0041423c
mov dword [eax], 0
push ebx
call fcn.0040d780
add esp, 4
test eax, eax
mov dword [ebp - 0x224], 0
jne 0x40b6c3
call fcn.0041423c
cmp dword [eax], 0
mov eax, dword [ebp - 0x224]
mov ebx, 0x80004005
cmove ebx, eax
test eax, eax
cmovs ebx, eax
mov eax, dword [ebp - 0x220]
cmp eax, 0xffffffff
je 0x40b5ac
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x40b5ac
mov edx, dword [ebp - 0x22c]
mov ecx, dword [ebp - 0x228]
mov ebx, eax
mov dword [ebp - 0x224], 0
mov dword [ebp - 0x264], edx
mov dword [ebp - 0x260], ecx
jmp 0x40b718
mov eax, dword [ebp - 0x224]
mov ecx, 0x8007006f
test eax, eax
cmovns eax, ecx
mov dword [ebp - 0x224], eax
lea eax, [ebp - 0x220]
push eax
call fcn.0040d780
add esp, 4
mov ebx, eax
test eax, eax
je 0x40b68d
push 0x42e024
push ebx
call fcn.00416ae0
add esp, 8
test eax, eax
je 0x40b6ff
push 0x42e022
push ebx
call fcn.00416ae0
add esp, 8
test eax, eax
je 0x40b6ff
cmp dword [ebp - 0x264], 0
je 0x40b758
push dword [ebp - 0x260]
push ebx
call fcn.00416ae0
add esp, 8
test eax, eax
je 0x40b6ff
push ebx
push dword [esi + 4]
push 0x42db84
push 0x105
lea eax, [ebp - 0x248]
push eax
call fcn.0040b170
add esp, 0x14
cmp dword [ebp - 0x248], 0
je 0x40b6e9
push ebx
push dword [edi + 4]
push 0x42db84
push 0x105
lea eax, [ebp - 0x240]
push eax
call fcn.0040b170
add esp, 0x14
cmp dword [ebp - 0x240], 0
je 0x40b6e9
lea ecx, [ebp - 0x248]
lea edx, [ebp - 0x240]
push dword [ebp + 8]
call fcn.0040b300
add esp, 4
mov edx, dword [ebp - 0x224]
mov ecx, eax
test edx, edx
cmovs ecx, edx
test eax, eax
cmovs edx, ecx
mov dword [ebp - 0x224], edx
call fcn.0041423c
mov dword [eax], 0
jmp 0x40b6ff