Function at 0x40aeb0
Capabilities:
Move file
Write file on windows

Disassembly:
mov eax, dword [0x59dc50]
sub esp, 0x218
test eax, eax
push ebx
jne 0x40b10f
lea eax, [esp + 8]
mov dword [0x59dc50], 1
push eax
push 0x58518c
push str.ime_temp
call fcn.00406190
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x40af15
mov ecx, dword [esp + 8]
mov edx, dword [sym.imp.MSVCRT.dll__iob]
push ecx
add edx, 0x40
push 0x585164
push edx
mov dword [0x59dc50], eax
call dword [sym.imp.MSVCRT.dll_fprintf]
add esp, 0xc
pop ebx
add esp, 0x218
ret
push esi
push edi
mov edi, dword [esp + 0x10]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x24]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [0x59da80]
mov dword [esp + 0x14], eax
test ecx, ecx
jle 0x40b0b6
mov edx, dword [0x59da7c]
push ebp
mov ebp, dword [sym.imp.MSVCRT.dll_fwrite]
lea ecx, [eax + eax*2]
xor edi, edi
mov dword [esp + 0x20], edi
mov esi, dword [edx + ecx*4 + 8]
lea ecx, [edx + ecx*4]
cmp esi, edi
jle 0x40b0a2
mov dword [esp + 0x1c], edi
mov ecx, dword [ecx + 4]
mov ecx, dword [ecx + edi + 0x10]
test ecx, ecx
mov dword [esp + 0x10], ecx
je 0x40b082
push ebx
push 1
lea edx, [esp + 0x20]
push 4
push edx
call ebp
mov eax, dword [esp + 0x28]
mov ecx, dword [0x59da7c]
push ebx
push 1
lea eax, [eax + eax*2]
push 2
mov edx, dword [ecx + eax*4 + 4]
add edx, edi
push edx
call ebp
push ebx
push 1
lea eax, [esp + 0x38]
push 4
push eax
call ebp
mov eax, dword [esp + 0x48]
mov edx, dword [0x59da7c]
add esp, 0x30
mov dword [esp + 0x24], 0
lea ecx, [eax + eax*2]
mov ecx, dword [edx + ecx*4 + 4]
add ecx, edi
mov esi, dword [ecx + 0xc]
cmp dword [ecx + 0x10], 0
mov esi, dword [esi + 8]
jle 0x40b082
mov edi, dword [esi + 4]
or ecx, 0xffffffff
xor eax, eax
push ebx
repne scasb al, byte es:[edi]
not ecx
push 1
lea edx, [esp + 0x18]
dec ecx
push 4
push edx
mov dword [esp + 0x20], ecx
call ebp
mov eax, dword [esp + 0x20]
mov ecx, dword [esi + 4]
push ebx
push 1
push eax
push ecx
call ebp
mov edx, dword [esp + 0x30]
mov eax, dword [esi]
push ebx
push 1
push edx
push eax
call ebp
mov ecx, dword [esi + 0xc]
push ebx
push 1
lea edx, [esp + 0x48]
push 4
push edx
mov dword [esp + 0x50], ecx
call ebp
mov eax, dword [esi + 0x10]
add esp, 0x40
lea ecx, [esp + 0x10]
mov dword [esp + 0x10], eax
push ebx
push 1
push 4
push ecx
call ebp
mov eax, dword [esp + 0x28]
mov edi, dword [0x59da7c]
mov ecx, dword [esp + 0x34]
mov esi, dword [esi + 8]
lea edx, [eax + eax*2]
add esp, 0x10
inc ecx
mov edx, dword [edi + edx*4 + 4]
mov edi, dword [esp + 0x1c]
mov dword [esp + 0x24], ecx
cmp ecx, dword [edx + edi + 0x10]
jl 0x40afed
mov edx, dword [0x59da7c]
mov esi, dword [esp + 0x20]
lea ecx, [eax + eax*2]
inc esi
add edi, 0x20
cmp esi, dword [edx + ecx*4 + 8]
lea ecx, [edx + ecx*4]
mov dword [esp + 0x20], esi
mov dword [esp + 0x1c], edi
jl 0x40af79
mov ecx, dword [0x59da80]
inc eax
cmp eax, ecx
mov dword [esp + 0x18], eax
jl 0x40af5d
pop ebp
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
lea edx, [esp + 0x14]
push edx
push 0
push str.ime_pyusr.dat
call fcn.00406190
mov eax, dword [esp + 0x20]
push 0
push eax
call dword [sym.imp.MSVCRT.dll__access]
add esp, 0x18
test eax, eax
pop edi
pop esi
je 0x40b0f2
mov ecx, dword [esp + 8]
push ecx
call dword [sym.imp.MSVCRT.dll__unlink]
add esp, 4
mov edx, dword [esp + 8]
lea eax, [esp + 0x1c]
push edx
push eax
call dword [sym.imp.MSVCRT.dll_rename]
add esp, 8
mov dword [0x59dc50], 0
pop ebx
add esp, 0x218
ret