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

Disassembly:
mov eax, dword [0x59dc54]
sub esp, 0x214
test eax, eax
push ebx
jne 0x40b652
lea eax, [esp + 0x14]
mov dword [0x59dc54], 1
push eax
push 0x58518c
push str.ime_temp
call fcn.00406190
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x40b365
mov ecx, dword [esp + 0x14]
mov edx, dword [sym.imp.MSVCRT.dll__iob]
push ecx
add edx, 0x40
push 0x5851a8
push edx
mov dword [0x59dc54], eax
call dword [sym.imp.MSVCRT.dll_fprintf]
add esp, 0xc
pop ebx
add esp, 0x214
ret
push ebp
push esi
push edi
mov edi, dword [esp + 0x20]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x24]
mov eax, ecx
mov esi, edi
mov edi, edx
push ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push 1
and ecx, 3
push 4
rep movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.MSVCRT.dll_fwrite]
push 0x59db88
call esi
mov ebp, dword [0x59da80]
add esp, 0x10
xor ecx, ecx
mov dword [esp + 0x1c], 0xffffffff
test ebp, ebp
mov dword [esp + 0x14], ecx
jle 0x40b4aa
mov edi, dword [0x59da7c]
lea eax, [ecx + ecx*2]
xor edx, edx
lea eax, [edi + eax*4]
mov dword [esp + 0x10], edx
mov edi, dword [eax + 8]
test edi, edi
jle 0x40b49d
mov eax, dword [eax + 4]
mov edi, edx
shl edi, 5
mov eax, dword [eax + edi + 0x14]
mov edi, dword [0x59db8c]
cmp eax, edi
jbe 0x40b47d
push ebx
push 1
lea ecx, [esp + 0x1c]
push 4
push ecx
call esi
push ebx
push 1
lea edx, [esp + 0x28]
push 4
push edx
call esi
push ebx
push 1
lea eax, [esp + 0x44]
push 4
push eax
call esi
mov eax, dword [esp + 0x44]
mov edx, dword [esp + 0x40]
shl edx, 5
lea ecx, [eax + eax*2]
mov eax, dword [0x59da7c]
push ebx
push 1
mov ecx, dword [eax + ecx*4 + 4]
lea eax, [esp + 0x50]
push 4
push eax
mov edx, dword [ecx + edx + 0x14]
mov dword [esp + 0x58], edx
call esi
mov eax, dword [esp + 0x54]
mov edx, dword [esp + 0x50]
add esp, 0x40
lea ecx, [eax + eax*2]
mov eax, dword [0x59da7c]
shl edx, 5
mov ecx, dword [eax + ecx*4 + 4]
push ebx
push 1
lea eax, [esp + 0x20]
mov edx, dword [ecx + edx + 0x18]
push 4
push eax
mov dword [esp + 0x28], edx
call esi
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
add esp, 0x10
mov edi, dword [0x59da7c]
lea eax, [ecx + ecx*2]
inc edx
lea eax, [edi + eax*4]
mov dword [esp + 0x10], edx
cmp edx, dword [eax + 8]
jl 0x40b3db
mov ebp, dword [0x59da80]
inc ecx
cmp ecx, ebp
mov dword [esp + 0x14], ecx
jl 0x40b3be
xor edx, edx
test ebp, ebp
mov dword [esp + 0x14], edx
jle 0x40b5f8
mov eax, dword [0x59da7c]
lea ecx, [edx + edx*2]
xor edi, edi
mov dword [esp + 0x10], edi
cmp dword [eax + ecx*4 + 8], edi
lea ecx, [eax + ecx*4]
jle 0x40b5eb
xor eax, eax
mov ebp, edi
mov dword [esp + 0x1c], eax
mov ecx, dword [ecx + 4]
shl ebp, 5
add ecx, ebp
mov ebp, dword [ecx + 8]
test ebp, ebp
jle 0x40b5cc
mov ecx, dword [ecx + 4]
lea edi, [eax + eax*2]
mov ecx, dword [ecx + edi*8 + 0xc]
mov edi, dword [0x59db8c]
cmp ecx, edi
jbe 0x40b5a4
push ebx
push 1
lea edx, [esp + 0x1c]
push 4
push edx
call esi
push ebx
push 1
lea eax, [esp + 0x28]
push 4
push eax
call esi
push ebx
push 1
lea ecx, [esp + 0x44]
push 4
push ecx
call esi
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x40]
shl ecx, 5
lea edx, [eax + eax*2]
mov eax, dword [0x59da7c]
push ebx
push 1
mov edx, dword [eax + edx*4 + 4]
mov eax, dword [esp + 0x54]
push 4
mov ecx, dword [edx + ecx + 4]
lea eax, [eax + eax*2]
mov edx, dword [ecx + eax*8 + 0xc]
lea eax, [esp + 0x54]
push eax
mov dword [esp + 0x58], edx
call esi
mov eax, dword [esp + 0x54]
mov edx, dword [esp + 0x50]
shl edx, 5
lea ecx, [eax + eax*2]
mov eax, dword [0x59da7c]
add esp, 0x40
mov ecx, dword [eax + ecx*4 + 4]
mov eax, dword [esp + 0x1c]
push ebx
push 1
mov ecx, dword [ecx + edx + 4]
lea eax, [eax + eax*2]
push 4
mov edx, dword [ecx + eax*8 + 0x10]
lea eax, [esp + 0x24]
push eax
mov dword [esp + 0x28], edx
call esi
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x24]
add esp, 0x10
mov ebp, dword [0x59da7c]
mov edi, dword [esp + 0x10]
inc eax
lea ecx, [edx + edx*2]
mov dword [esp + 0x1c], eax
mov ecx, dword [ebp + ecx*4 + 4]
shl edi, 5
add ecx, edi
cmp eax, dword [ecx + 8]
jl 0x40b4ee
mov edi, dword [esp + 0x10]
mov eax, dword [0x59da7c]
lea ecx, [edx + edx*2]
inc edi
lea ecx, [eax + ecx*4]
mov dword [esp + 0x10], edi
cmp edi, dword [ecx + 8]
jl 0x40b4d3
mov ebp, dword [0x59da80]
inc edx
cmp edx, ebp
mov dword [esp + 0x14], edx
jl 0x40b4bd
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
lea edx, [esp + 0x24]
push edx
push 0
push str.ime_pyindex.dat
call fcn.00406190
mov eax, dword [esp + 0x30]
push 0
push eax
call dword [sym.imp.MSVCRT.dll__access]
add esp, 0x18
test eax, eax
pop edi
pop esi
pop ebp
je 0x40b635
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.MSVCRT.dll__unlink]
add esp, 4
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x18]
push edx
push eax
call dword [sym.imp.MSVCRT.dll_rename]
add esp, 8
mov dword [0x59dc54], 0
pop ebx
add esp, 0x214
ret