Function at 0x401000
Capabilities:
Get common file path
Get file size
Read file on windows
Write file on windows

Disassembly:
sub esp, 0x264
push ebx
push ebp
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
call fcn.0044a3b0
add esp, 4
lea eax, [esp + 0x16c]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
or ecx, 0xffffffff
lea edi, [esp + 0x16c]
xor eax, eax
lea edx, [esp + 0x64]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x64]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov edi, 0x45706c
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push eax
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x6c]
and ecx, 3
push 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.two.ime
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push eax
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
push eax
and ecx, 3
lea eax, [esp + 0x78]
push 0xc0000000
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
mov dword [esp + 0x1c], esi
je 0x40124f
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
push edi
mov dword [esp + 0x28], edi
call fcn.0044a27b
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x401248
lea ecx, [esp + 0x28]
push 0
push ecx
push edi
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40123f
call fcn.0044a3ba
xor esi, esi
mov byte [esp + 0x20], al
test edi, edi
jbe 0x40114b
lea edx, [esi + ebx]
push str.LMIME_DLLMAIN1.0
push edx
call fcn.0044a330
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x401153
inc esi
cmp esi, edi
jb 0x40111c
push ebx
call fcn.0044a212
mov eax, dword [esp + 0x20]
add esp, 4
push eax
jmp 0x401249
mov ebp, dword [esp + 0x28]
test ebp, ebp
je 0x401138
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x10]
push eax
push ecx
call fcn.004012f0
mov edx, dword [esp + 0x1d]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x1b]
and edx, 0xff
and eax, 0xff
push edx
mov edx, dword [esp + 0x1e]
and ecx, 0xff
push eax
mov eax, dword [esp + 0x21]
push ecx
mov ecx, dword [esp + 0x24]
and edx, 0xff
and eax, 0xff
push edx
and ecx, 0xff
push eax
push ecx
lea edx, [esp + 0x50]
push str._02X_02X_02X_02X_02X_02X
push edx
call fcn.0044a1c0
lea edi, [esp + 0x58]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x28
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [ebp + 0x10]
mov eax, ecx
mov esi, edi
mov edi, edx
push 0
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push 0
and ecx, 3
push 0
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x28]
mov cl, byte [esp + 0x2c]
push esi
mov byte [ebp + 0x20], cl
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea edx, [esp + 0x2c]
push 0
mov eax, dword [esp + 0x28]
push edx
push eax
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
push ebx
je 0x401240
call fcn.0044a212
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [0x457030]
lea edx, [esp + 0x64]
push ecx
push edx
call sub.IMM32.dll_ImmInstallIMEA
neg eax
sbb eax, eax
pop edi
and al, 0xfc
pop esi
pop ebp
add eax, 4
pop ebx
add esp, 0x264
ret 0x10
push ebx
call fcn.0044a212
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
mov eax, 3
pop ebx
add esp, 0x264
ret 0x10