Function at 0x409f70
Capabilities:
Copy file
Move file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x500
mov al, byte [0x4a1bdd]
test al, al
push ebx
push esi
jne 0x409f9a
mov eax, dword [0x4a1bc4]
push eax
call fcn.00406870
add esp, 4
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov al, byte [0x4a1bdc]
test al, al
jne 0x409fba
mov ecx, dword [0x4a1bc4]
push ecx
call fcn.00406870
add esp, 4
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [0x4a1bc4]
push edx
call dword [sym.imp.USER32.dll_GetDC]
push eax
mov dword [0x49ea5c], eax
call fcn.00401000
mov eax, dword [0x49ea5c]
add esp, 4
push 1
push eax
call dword [sym.imp.GDI32.dll_SetBkMode]
lea ecx, [ebp - 0x3fc]
push str.bwdraw.ses
push ecx
mov dword [0x4c8d60], 0
mov dword [0x4c8c90], 0
call sub.MSVCRT.dll_strcpy
push 0x4c8c30
push 0x49ee80
call fcn.0040d130
lea edx, [ebp - 0x17c]
push 0x4c8c30
push edx
call sub.MSVCRT.dll_strcpy
mov eax, dword [ebp + 8]
add esp, 0x18
cmp eax, 2
mov byte [0x4c8280], 0
jl 0x40a064
mov esi, dword [ebp + 0xc]
mov eax, dword [esi + 4]
push 0x47a09c
push eax
call dword [sym.imp.MSVCRT.dll__stricmp]
add esp, 8
test eax, eax
je 0x40a064
mov ecx, dword [esi + 4]
push ecx
push 0x4c8280
call sub.MSVCRT.dll_strcpy
add esp, 8
push 0x10
lea edx, [ebp - 0x17c]
push 0x47a0a8
push edx
call dword [sym.imp.MSVCRT.dll__fsopen]
mov ebx, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
add esp, 0xc
mov dword [0x4c8c90], eax
mov eax, dword [0x4a02f0]
push 0xffffffffffffffff
push eax
call ebx
call fcn.0040d020
mov ecx, dword [0x4a02f0]
mov esi, dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push ecx
call esi
call fcn.0040de30
call fcn.00409480
test eax, eax
jg 0x40a105
call dword [sym.imp.MSVCRT.dll__fcloseall]
lea edx, [ebp - 0x17c]
push edx
call dword [sym.imp.MSVCRT.dll__unlink]
mov eax, dword [0x49ea5c]
mov ecx, dword [0x4a1bc4]
add esp, 4
push eax
push ecx
call dword [sym.imp.USER32.dll_ReleaseDC]
mov edx, dword [0x4a02f0]
push 0xffffffffffffffff
push edx
call ebx
mov eax, dword [0x4a1bc4]
push eax
call fcn.00406870
mov ecx, dword [0x4a02f0]
add esp, 4
push ecx
call esi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [0x4a1bc4]
push edx
call fcn.0040d610
add esp, 4
call fcn.0040d2e0
call fcn.00409d60
mov eax, dword [0x49ea6c]
test eax, eax
jne 0x40a134
push 0x47a0ac
call fcn.0045c1f0
add esp, 4
mov al, byte [0x4c8280]
test al, al
je 0x40a210
push 0x4c8280
xor esi, esi
call sub.MSVCRT.dll_strlen
add esp, 4
test eax, eax
jbe 0x40a17d
mov bl, 0x20
cmp byte [esi + 0x4c8280], 0x22
jne 0x40a165
mov byte [esi + 0x4c8280], bl
push 0x4c8280
inc esi
call sub.MSVCRT.dll_strlen
add esp, 4
cmp esi, eax
jb 0x40a156
mov ebx, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0x4c8280
call fcn.0045fde0
lea eax, [ebp - 0x280]
push 0x4c8280
push eax
call sub.MSVCRT.dll_strcpy
push 0x2e
push 0x4c8280
call dword [sym.imp.MSVCRT.dll_strrchr]
add esp, 0x14
test eax, eax
je 0x40a1af
mov byte [eax], 0
lea ecx, [ebp - 0x500]
push ecx
push 0x4c8280
push 0x4c86a0
call fcn.004107c0
add esp, 0xc
push 1
lea edx, [ebp - 0x500]
push edx
lea eax, [ebp - 0x280]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
mov esi, dword [sym.imp.MSVCRT.dll__unlink]
lea ecx, [ebp - 0x280]
push ecx
call esi
push 0x4795e0
push 0x4c8280
push 0x4c86a0
call fcn.00438580
push 0x4c8280
call fcn.004105c0
add esp, 0x14
jmp 0x40a223
push 0x47a0b8
call fcn.004105c0
mov esi, dword [sym.imp.MSVCRT.dll__unlink]
add esp, 4
call fcn.0040ddf0
call fcn.0045e590
call fcn.0044d310
cmp dword [0x49eadc], 0x38
jne 0x40a251
mov edx, dword [0x49ec7c]
mov eax, dword [edx + 5]
test eax, eax
je 0x40a274
call fcn.0040d660
test eax, eax
jne 0x40a274
mov eax, dword [0x49eadc]
push eax
call fcn.0040bb50
mov ecx, dword [0x49ea5c]
push 0
push 0x49ea70
push ecx
call fcn.0040ca50
add esp, 0x10
jmp 0x40a22d
call fcn.0040d630
call fcn.00402d90
mov eax, dword [0x4c8c90]
test eax, eax
je 0x40a293
push eax
push 0x1a
call dword [sym.imp.MSVCRT.dll_putc]
add esp, 8
call dword [sym.imp.MSVCRT.dll__fcloseall]
lea edx, [ebp - 0x3fc]
push edx
lea eax, [ebp - 0x17c]
push eax
call fcn.0040d1b0
add esp, 8
test eax, eax
jne 0x40a2d3
lea ecx, [ebp - 0x3fc]
push ecx
call esi
lea edx, [ebp - 0x3fc]
push edx
lea eax, [ebp - 0x17c]
push eax
call dword [sym.imp.MSVCRT.dll_rename]
add esp, 0xc
lea ecx, [ebp - 0x17c]
push ecx
call esi
add esp, 4
call fcn.0040d0e0
call fcn.00451830
call fcn.0040dd30
mov edx, dword [0x49ea5c]
mov eax, dword [0x4a1bc4]
push edx
push eax
call dword [sym.imp.USER32.dll_ReleaseDC]
mov ecx, dword [0x4a02f0]
push 0xffffffffffffffff
push ecx
call ebx
mov edx, dword [0x4a1bc4]
push edx
call fcn.00406870
mov eax, dword [0x4a02f0]
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret