Function at 0x4046f0
Capabilities:
Copy file
Create thread
Get file size
Read file via mapping
Terminate process

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1238
call fcn.0040acb0
push ebx
push esi
push edi
xor edi, edi
push edi
push edi
push 3
push edi
push edi
push 0x80000000
push dword [ebp + 8]
mov dword [ebp - 4], edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
push edi
push esi
mov dword [ebp - 0x1c], esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push edi
push edi
push edi
push 2
push edi
mov ebx, eax
push esi
mov dword [ebp - 0x14], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
push edi
push edi
push edi
push 4
push eax
mov dword [ebp - 0x18], eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x10], eax
mov esi, eax
test ebx, ebx
jg 0x4047a9
push 0xffffffffffffffff
push 1
lea eax, [ebp - 0x628]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
xor esi, esi
test edi, edi
jle 0x404782
nop dword [eax + eax]
push dword [ebp + esi*4 - 0x628]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc esi
cmp esi, edi
jl 0x404770
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x10]
mov ecx, esi
mov edi, esi
sub ecx, eax
cmp ecx, ebx
jge 0x4047be
cmp byte [esi], 0xd
je 0x4047be
inc ecx
inc esi
cmp ecx, ebx
jl 0x4047b3
push 0xfe
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
xor ecx, ecx
mov dword [ebp - 8], eax
mov edx, esi
sub edx, edi
cmp edi, esi
cmova edx, ecx
test edx, edx
je 0x4047f9
mov ebx, eax
sub ebx, edi
mov al, byte [edi]
lea edi, [edi + 1]
inc ecx
mov byte [ebx + edi - 1], al
cmp ecx, edx
jb 0x4047e8
mov ebx, dword [ebp - 0x14]
mov edi, dword [ebp - 8]
push edi
mov byte [ecx + edi], 0
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push edi
call fcn.004051c0
add esp, 8
push eax
lea eax, [ebp - 0x228]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push 0x40b644
lea eax, [ebp - 0x228]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push 0x40d458
lea eax, [ebp - 0x228]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push 1
lea eax, [ebp - 0x228]
push eax
push 0x40d048
call dword [sym.imp.KERNEL32.dll_CopyFileW]
push 0x108
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword [ebp - 4]
shl ecx, 2
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], ecx
test eax, eax
je 0x40493e
mov dword [eax + 0x100], 1
push edi
mov dword [eax + 0x104], 0
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push edi
call fcn.004051c0
add esp, 8
push eax
lea eax, [ebp - 0xa38]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push 0x40b634
lea eax, [ebp - 0xa38]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [ebp - 0xa38]
push eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [ebp - 0x1238]
add eax, dword [ebp - 0xc]
push eax
push 0
push dword [ebp - 8]
push 0x405120
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov ecx, dword [ebp - 0xc]
mov dword [ebp + ecx - 0x628], eax
test eax, eax
je 0x40493e
inc dword [ebp - 4]
lea eax, [ebp - 0x628]
push 0xffffffffffffffff
push 0
push eax
push 0x14
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
add esi, 2
mov eax, esi
sub eax, dword [ebp - 0x10]
cmp eax, ebx
jl 0x4047a6
mov edi, dword [ebp - 4]
jmp 0x404750
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]