Function at 0x402396
Capabilities:
Copy file
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x240
push 0x104
lea eax, [ebp - 0x218]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [ebp - 0x110]
push ecx
call fcn.0040235f
add esp, 4
push 0
lea edx, [ebp - 0x110]
push edx
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
push 0
lea ecx, [ebp - 0x110]
push ecx
call fcn.00402cd6
add esp, 8
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x220], 0
lea edx, [ebp - 0x220]
push edx
push 0x400
push 0x4013f0
push 0xa
mov eax, dword [ebp - 0xc]
push eax
call fcn.00403f19
add esp, 0x14
mov dword [ebp - 0x21c], eax
mov dword [ebp - 0x224], 0
cmp dword [ebp - 0x220], 0
je 0x40246c
mov ecx, dword [ebp - 0x220]
push ecx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [ebp - 0x22c], eax
mov edx, dword [ebp - 0x22c]
mov dword [ebp - 0x224], edx
mov eax, dword [ebp - 0x220]
push eax
mov ecx, dword [ebp - 0x21c]
push ecx
mov edx, dword [ebp - 0x224]
push edx
call sub.MSVCRT.dll_memcpy
add esp, 0xc
push 1
mov eax, dword [ebp - 0xc]
push eax
call fcn.004041c4
add esp, 8
lea ecx, [ebp - 0x110]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [ebp - 0x224], 0
je 0x402499
cmp dword [ebp - 0x220], 0
jne 0x4024af
push 0x4012a8
push 4
call fcn.00401940
add esp, 8
xor eax, eax
jmp 0x40267d
mov dword [ebp - 8], 8
mov eax, dword [ebp - 0x220]
xor edx, edx
div dword [ebp - 8]
mov ecx, eax
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x220]
lea eax, [eax + edx - 1]
xor edx, edx
div dword [ebp - 8]
cmp ecx, eax
jne 0x4024ec
mov eax, dword [ebp - 0x220]
xor edx, edx
div dword [ebp - 8]
mov dword [ebp - 0x238], eax
jmp 0x402500
mov eax, dword [ebp - 0x220]
xor edx, edx
div dword [ebp - 8]
add eax, 1
mov dword [ebp - 0x238], eax
mov ecx, dword [ebp - 0x238]
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 4]
imul edx, dword [ebp - 8]
mov dword [ebp - 0x114], edx
mov eax, dword [ebp - 0x220]
cmp eax, dword [ebp - 0x114]
je 0x402613
mov ecx, dword [ebp - 0x114]
push ecx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [ebp - 0x230], eax
mov edx, dword [ebp - 0x230]
mov dword [ebp - 0x228], edx
mov eax, dword [ebp - 8]
push eax
push 0
mov ecx, dword [ebp - 4]
sub ecx, 1
imul ecx, dword [ebp - 8]
mov edx, dword [ebp - 0x228]
add edx, ecx
push edx
call sub.MSVCRT.dll_memset
add esp, 0xc
mov eax, dword [ebp - 0x220]
push eax
mov ecx, dword [ebp - 0x224]
push ecx
mov edx, dword [ebp - 0x228]
push edx
call sub.MSVCRT.dll_memcpy
add esp, 0xc
mov eax, dword [ebp - 0x224]
mov dword [ebp - 0x234], eax
mov ecx, dword [ebp - 0x234]
push ecx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov edx, dword [ebp - 0x114]
shr edx, 2
mov eax, dword [ebp - 0x114]
add eax, 3
shr eax, 2
cmp edx, eax
jne 0x4025cc
mov ecx, dword [ebp - 0x114]
shr ecx, 2
mov dword [ebp - 0x23c], ecx
jmp 0x4025de
mov edx, dword [ebp - 0x114]
shr edx, 2
add edx, 1
mov dword [ebp - 0x23c], edx
push 0x401140
mov eax, dword [ebp - 0x23c]
push eax
mov ecx, dword [ebp - 0x228]
push ecx
call fcn.004016df
add esp, 0xc
mov edx, dword [ebp - 0x228]
mov dword [ebp - 0x224], edx
mov eax, dword [ebp - 0x114]
mov dword [ebp - 0x220], eax
jmp 0x40266a
mov ecx, dword [ebp - 0x114]
shr ecx, 2
mov edx, dword [ebp - 0x114]
add edx, 3
shr edx, 2
cmp ecx, edx
jne 0x40263d
mov eax, dword [ebp - 0x114]
shr eax, 2
mov dword [ebp - 0x240], eax
jmp 0x40264f
mov ecx, dword [ebp - 0x114]
shr ecx, 2
add ecx, 1
mov dword [ebp - 0x240], ecx
push 0x401140
mov edx, dword [ebp - 0x240]
push edx
mov eax, dword [ebp - 0x224]
push eax
call fcn.004016df
add esp, 0xc
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 0x224]
push edx
call fcn.00401cd9
add esp, 8
mov esp, ebp
pop ebp
ret