Function at 0x40e0c0
Capabilities:
Get file size
Move file
Print debug messages
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
mov eax, dword [0x4c000c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp - 0x14]
call fcn.0040e780
movzx eax, al
test eax, eax
jne 0x40e0e8
jmp 0x40e4ec
movzx ecx, byte [ebp + 8]
mov dword [ebp - 0x34], ecx
cmp dword [ebp - 0x34], 3
ja case.default.0x40e0fc
mov edx, dword [ebp - 0x34]
jmp dword [edx*4 + 0x40e500]
mov eax, dword [ebp - 0x14]
cmp dword [eax + 0x280], 0
je case.0x40e0fc.1
mov ecx, dword [ebp + 0xc]
push ecx
push 0
push 0x465
mov edx, dword [ebp - 0x14]
mov eax, dword [edx + 0x280]
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
mov dword [ebp - 0x3c], 0
mov ecx, dword [ebp - 0x14]
cmp dword [ecx + 0x27c], 0
jne 0x40e145
mov ecx, dword [ebp - 0x14]
call fcn.0040e510
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x54], 0
lea edx, [ebp - 0x2c]
push edx
mov ecx, dword [ebp - 0x14]
call fcn.0040e680
mov eax, dword [ebp - 0x14]
cmp dword [eax + 0x27c], 0
je 0x40e28e
cmp dword [ebp - 0x2c], 1
jne 0x40e184
mov ecx, dword [ebp - 0x14]
call fcn.0040e7b0
movzx ecx, al
test ecx, ecx
je 0x40e1a1
cmp dword [ebp - 0x2c], 1
je 0x40e28e
mov ecx, dword [ebp - 0x14]
call fcn.0040e7b0
movzx edx, al
test edx, edx
je 0x40e28e
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax + 0x27c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x14]
mov dword [edx + 0x27c], 0
mov eax, dword [str..old]
mov dword [ebp - 0x10], eax
mov ecx, dword [0x48ec40]
mov dword [ebp - 0xc], ecx
mov dx, word [0x48ec44]
mov word [ebp - 8], dx
mov eax, dword [ebp - 0x14]
add eax, 0x74
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, eax
lea ecx, [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea edx, [esi + eax + 1]
mov dword [ebp - 0x30], edx
xor ecx, ecx
mov eax, dword [ebp - 0x30]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call dword [sym.imp.mfc120u.dll_Ordinal_265]
add esp, 4
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x30]
shl ecx, 1
push ecx
push 0
mov edx, dword [ebp - 0x20]
push edx
call sub.MSVCR120.dll_memset
add esp, 0xc
mov eax, dword [ebp - 0x14]
add eax, 0x74
push eax
mov ecx, dword [ebp - 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea edx, [ebp - 0x10]
push edx
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
push 1
mov ecx, dword [ebp - 0x20]
push ecx
mov edx, dword [ebp - 0x14]
add edx, 0x74
push edx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
cmp dword [ebp - 0x20], 0
je 0x40e286
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x4c], eax
mov ecx, dword [ebp - 0x4c]
push ecx
call dword [sym.imp.mfc120u.dll_Ordinal_266]
add esp, 4
mov dword [ebp - 0x20], 0
mov ecx, dword [ebp - 0x14]
call fcn.0040e510
mov edx, dword [ebp - 0x14]
cmp dword [edx + 0x27c], 0
je case.default.0x40e0fc
mov eax, dword [0x4c2070]
xor edx, edx
mov ecx, 0x32
div ecx
test edx, edx
jne 0x40e36b
push 0
mov edx, dword [ebp - 0x14]
mov eax, dword [edx + 0x27c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0xffffffff
jne 0x40e2f9
push str.Error:_run_GetFileSize_fail_r_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx + 0x27c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x14]
mov dword [eax + 0x27c], 0
jmp 0x40e36b
cmp dword [ebp - 0x38], 0x200000
jbe 0x40e36b
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx + 0x27c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x14]
mov dword [eax + 0x27c], 0
push 0
push 0x80000080
push 5
push 0
push 3
push 0x40000000
mov ecx, dword [ebp - 0x14]
add ecx, 0x74
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edx, dword [ebp - 0x14]
mov dword [edx + 0x27c], eax
mov eax, dword [ebp - 0x14]
cmp dword [eax + 0x27c], 0xffffffff
jne 0x40e36b
mov ecx, dword [ebp - 0x14]
mov dword [ecx + 0x27c], 0
push str.Error:_Create_log_file_fail_r_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x24], 0
lea edx, [ebp - 0x18]
push edx
mov eax, 0x5000
shl eax, 0
mov ecx, dword [ebp - 0x14]
lea edx, [ecx + eax + 0x286]
push edx
call fcn.0040d760
add esp, 8
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x14]
call fcn.0040e7b0
movzx ecx, al
test ecx, ecx
je 0x40e41d
mov edx, dword [ebp - 0x18]
shl edx, 1
push edx
call dword [sym.imp.mfc120u.dll_Ordinal_265]
add esp, 4
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x18]
shl ecx, 1
push ecx
push 0
mov edx, dword [ebp - 0x1c]
push edx
call sub.MSVCR120.dll_memset
add esp, 0xc
push str.suminfo4gerlog
mov eax, dword [ebp - 0x28]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
mov ecx, dword [ebp - 0x14]
add ecx, 0x2c
call fcn.0040f5c0
mov dword [ebp - 0x18], eax
mov edx, dword [ebp - 0x18]
add edx, 1
mov dword [ebp - 0x18], edx
mov eax, dword [ebp - 0x1c]
add eax, dword [ebp - 0x18]
mov byte [eax], 0
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x28], ecx
push 0
lea edx, [ebp - 0x3c]
push edx
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp - 0x28]
push ecx
mov edx, dword [ebp - 0x14]
mov eax, dword [edx + 0x27c]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40e467
push 0x48ecd0
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx + 0x27c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x14]
mov dword [eax + 0x27c], 0
cmp dword [ebp - 0x24], 0
je 0x40e487
mov ecx, dword [ebp - 0x24]
mov dword [ebp - 0x40], ecx
mov edx, dword [ebp - 0x40]
push edx
call dword [sym.imp.mfc120u.dll_Ordinal_266]
add esp, 4
mov dword [ebp - 0x24], 0
cmp dword [ebp - 0x1c], 0
je 0x40e4a7
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x44], eax
mov ecx, dword [ebp - 0x44]
push ecx
call dword [sym.imp.mfc120u.dll_Ordinal_266]
add esp, 4
mov dword [ebp - 0x1c], 0
mov edx, dword [ebp - 0x14]
mov eax, dword [edx + 0x27c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x14]
mov dword [ecx + 0x27c], 0
mov edx, dword [0x4c2070]
add edx, 1
mov dword [0x4c2070], edx
mov eax, 0x5000
shl eax, 0
mov ecx, dword [ebp - 0x14]
lea edx, [ecx + eax + 0x286]
push edx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0043fe23
mov esp, ebp
pop ebp
ret 8