Function at 0x402420
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.004023e9
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.00402c92
add esp, 8
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x220], 0
lea edx, [ebp - 0x220]
push edx
push 0x400
push 0x401360
push 0xa
mov eax, dword [ebp - 0xc]
push eax
call fcn.00403ebf
add esp, 0x14
mov dword [ebp - 0x21c], eax
mov dword [ebp - 0x224], 0
cmp dword [ebp - 0x220], 0
je 0x4024f8
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
jmp 0x4024ff
xor eax, eax
jmp 0x4026f8
push 1
mov eax, dword [ebp - 0xc]
push eax
call fcn.0040416a
add esp, 8
lea ecx, [ebp - 0x110]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [ebp - 0x224], 0
jne 0x40252a
xor eax, eax
jmp 0x4026f8
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 0x402567
mov eax, dword [ebp - 0x220]
xor edx, edx
div dword [ebp - 8]
mov dword [ebp - 0x238], eax
jmp 0x40257b
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 0x40268e
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 0x402647
mov ecx, dword [ebp - 0x114]
shr ecx, 2
mov dword [ebp - 0x23c], ecx
jmp 0x402659
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.0040180f
add esp, 0xc
mov edx, dword [ebp - 0x228]
mov dword [ebp - 0x224], edx
mov eax, dword [ebp - 0x114]
mov dword [ebp - 0x220], eax
jmp 0x4026e5
mov ecx, dword [ebp - 0x114]
shr ecx, 2
mov edx, dword [ebp - 0x114]
add edx, 3
shr edx, 2
cmp ecx, edx
jne 0x4026b8
mov eax, dword [ebp - 0x114]
shr eax, 2
mov dword [ebp - 0x240], eax
jmp 0x4026ca
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.0040180f
add esp, 0xc
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 0x224]
push edx
call fcn.00401db1
add esp, 8
mov esp, ebp
pop ebp
ret