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

Disassembly:
push ebp
lea ebp, [esp - 0x618]
sub esp, 0x618
push 0xffffffffffffffff
push 0x420390
mov eax, dword fs:[0]
push eax
sub esp, 0x14
mov eax, dword [0x43f7ac]
xor eax, ebp
mov dword [ebp + 0x614], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, dword [ebp + 0x620]
mov eax, dword [ebp + 0x624]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x1c], 0xffffffff
xor ebx, ebx
mov dword [ebp - 4], ebx
mov ecx, dword [str._rename_]
mov dword [ebp + 0x608], ecx
mov edx, dword [0x435c08]
mov dword [ebp + 0x60c], edx
mov al, byte [0x435c0c]
mov byte [ebp + 0x610], al
mov byte [ebp + 0x504], bl
push 0x103
push ebx
lea ecx, [ebp + 0x505]
push ecx
call fcn.0040feb0
add esp, 0xc
push 0x104
lea edx, [ebp + 0x504]
push edx
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
call edi
test eax, eax
jne 0x40eab6
cmp dword [ebp - 0x14], ebx
jne 0x40eaa0
push ebx
push 0x80
push 1
push ebx
push ebx
push SysReAllocStringLen
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
je 0x40ea75
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x104
lea eax, [ebp + 0x504]
push eax
push esi
call edi
test eax, eax
jne 0x40eab6
mov ecx, esi
lea edx, [ebp + 0x504]
mov al, byte [ecx]
mov byte [edx], al
add ecx, 1
add edx, 1
test al, al
jne 0x40ea90
jmp 0x40eab6
mov ecx, esi
lea edx, [ebp + 0x504]
mov al, byte [ecx]
mov byte [edx], al
add ecx, 1
add edx, 1
test al, al
jne 0x40eaa8
push 0x400
push ebx
lea ecx, [ebp]
push ecx
call fcn.0040feb0
add esp, 0xc
mov eax, dword [ebp - 0x14]
cmp eax, ebx
jne 0x40eae6
lea edx, [ebp + 0x504]
push edx
push 0x435c00
push str._hs_hs
lea eax, [ebp]
push eax
jmp 0x40eaf7
lea ecx, [ebp + 0x504]
push ecx
push eax
push str._hs_hs
lea edx, [ebp]
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea eax, [ebp]
push eax
call fcn.00411a59
add esp, 4
push 0x104
lea ecx, [ebp + 0x400]
push ecx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea eax, [ebp + 0x400]
add eax, 0xffffffff
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x40eb27
mov edx, dword [str.wininit.ini]
mov dword [eax], edx
mov ecx, dword [0x435bec]
mov dword [eax + 4], ecx
mov edx, dword [0x435bf0]
mov dword [eax + 8], edx
mov cl, byte [0x435bf4]
mov byte [eax + 0xc], cl
push ebx
push 0x80
push 4
push ebx
push ebx
push 0xc0000000
lea edx, [ebp + 0x400]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
mov dword [ebp - 0x14], esi
cmp esi, 0xffffffff
je 0x40ee0f
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp edi, 0xffffffff
je 0x40ee08
mov dword [ebp - 0x18], ebx
lea ebx, [edi + 1]
push ebx
call fcn.0040db80
mov esi, eax
mov dword [ebp - 0x20], esi
push ebx
push 0
push esi
call fcn.0040feb0
lea eax, [edi + 0x1000]
push eax
call fcn.0040db80
mov ebx, eax
lea eax, [edi + 0x1000]
push eax
push 0
push ebx
call fcn.0040feb0
add esp, 0x20
push 0
lea eax, [ebp - 0x18]
push eax
push edi
push esi
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40edf6
cmp dword [ebp - 0x18], edi
jne 0x40edf6
mov ecx, esi
mov edx, ebx
mov al, byte [ecx]
mov byte [edx], al
add ecx, 1
add edx, 1
test al, al
jne 0x40ebf2
push esi
call fcn.00411a59
lea edx, [ebp + 0x608]
push edx
push esi
call fcn.00410f20
add esp, 0xc
test eax, eax
je 0x40ecff
push 0x5b
add eax, 1
push eax
call fcn.0040ff40
add esp, 8
test eax, eax
je 0x40ecbd
mov ecx, eax
sub ecx, esi
mov byte [ecx + ebx], 0
lea ecx, [ebp]
mov esi, ecx
mov dl, byte [ecx]
add ecx, 1
test dl, dl
jne 0x40ec41
sub ecx, esi
mov edx, ecx
mov edi, ebx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x40ec53
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, ebx
add ecx, 0xffffffff
mov dl, byte [ecx + 1]
add ecx, 1
test dl, dl
jne 0x40ec70
mov dx, word [0x421a4c]
mov word [ecx], dx
mov dl, byte [0x421a4e]
mov byte [ecx + 2], dl
mov esi, eax
nop
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40ec90
sub eax, esi
mov edi, ebx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x40eca0
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x40eda0
lea eax, [ebp]
mov esi, eax
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40ecc2
sub eax, esi
mov edi, ebx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x40ecd2
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, ebx
add eax, 0xffffffff
nop
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x40ecf0
jmp 0x40ed8d
lea eax, [ebp + 0x608]
mov esi, eax
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40ed07
sub eax, esi
mov edi, ebx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x40ed17
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, ebx
add eax, 0xffffffff
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x40ed34
mov cx, word [0x421a4c]
mov word [eax], cx
mov dl, byte [0x421a4e]
mov byte [eax + 2], dl
lea eax, [ebp]
mov esi, eax
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40ed56
sub eax, esi
mov edi, ebx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x40ed66
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, ebx
add eax, 0xffffffff
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x40ed83
mov cx, word [0x421a4c]
mov word [eax], cx
mov dl, byte [0x421a4e]
mov byte [eax + 2], dl
mov dword [ebp - 0x18], 0
mov eax, ebx
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40edb0
sub eax, edx
mov edi, eax
push 0
push 0
push 0
mov esi, dword [ebp - 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push 0
lea eax, [ebp - 0x18]
push eax
push edi
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40edf3
cmp dword [ebp - 0x18], edi
jne 0x40edf3
mov dword [ebp - 0x1c], 0
mov esi, dword [ebp - 0x20]
push ebx
call fcn.0040dbc0
push esi
call fcn.0040dbc0
add esp, 8
mov esi, dword [ebp - 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x614]
xor ecx, ebp
call fcn.0040fe67
add ebp, 0x618
mov esp, ebp
pop ebp
ret