Function at 0x406220
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x20c
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0xc]
push ebx
push ebp
push esi
push edi
mov edi, 0x59da84
push 0x585050
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x20]
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 edi, str.ime_py.dat
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
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 eax, [esp + 0x20]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebp, eax
xor edi, edi
add esp, 8
cmp ebp, edi
jne 0x4062a6
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x20c
ret
mov ebx, dword [sym.imp.MSVCRT.dll_fread]
push ebp
push 1
push 4
push 0x59da80
call ebx
mov eax, dword [0x59da80]
lea ecx, [eax + eax*2]
shl ecx, 2
push ecx
call fcn.00478e60
mov ecx, dword [0x59da80]
add esp, 0x14
cmp ecx, edi
mov dword [0x59da7c], eax
mov dword [esp + 0x14], edi
jle 0x40642c
xor esi, esi
push ebp
push 1
lea edx, [esi + eax]
push 2
push edx
call ebx
mov eax, dword [0x59da7c]
push ebp
push 1
push 4
mov byte [esi + eax + 2], 0
mov ecx, dword [0x59da7c]
lea edx, [esi + ecx + 8]
push edx
call ebx
mov eax, dword [0x59da7c]
mov ecx, dword [esi + eax + 8]
shl ecx, 5
push ecx
call fcn.00478e60
mov edx, dword [0x59da7c]
add esp, 0x24
mov dword [esp + 0x10], edi
mov dword [esi + edx + 4], eax
mov eax, dword [0x59da7c]
cmp dword [esi + eax + 8], edi
jle 0x406412
mov eax, dword [esi + eax + 4]
push ebp
push 1
add eax, edi
push 2
push eax
call ebx
mov ecx, dword [0x59da7c]
push ebp
push 1
lea eax, [esp + 0x30]
mov edx, dword [esi + ecx + 4]
push 4
push eax
mov byte [edx + edi + 2], 0
call ebx
mov ecx, dword [0x59da7c]
mov eax, dword [esp + 0x38]
add esp, 0x20
mov edx, dword [esi + ecx + 4]
mov dword [edx + edi + 0x14], eax
mov ecx, dword [0x59da7c]
mov edx, dword [esi + ecx + 4]
xor ecx, ecx
mov dword [edx + edi + 0x18], ecx
mov eax, dword [0x59da7c]
mov edx, dword [esi + eax + 4]
lea eax, [edx + edi + 0x1c]
mov edx, dword [edx + edi + 0x1c]
and edx, 0xfffffffe
mov dword [eax], edx
mov eax, dword [esp + 0x18]
cmp eax, dword [0x59db88]
jbe 0x4063b3
mov dword [0x59db88], eax
mov eax, dword [0x59da7c]
push 0x18
mov edx, dword [esi + eax + 4]
mov dword [edx + edi + 8], ecx
mov eax, dword [0x59da7c]
mov edx, dword [esi + eax + 4]
mov dword [edx + edi + 0x10], ecx
call fcn.00478e60
mov ecx, dword [0x59da7c]
add esp, 4
add edi, 0x20
mov edx, dword [esi + ecx + 4]
mov dword [edx + edi - 0x14], eax
mov eax, dword [0x59da7c]
mov ecx, dword [esi + eax + 4]
mov eax, dword [ecx + edi - 0x14]
mov ecx, dword [esp + 0x10]
inc ecx
mov dword [eax + 8], eax
mov eax, dword [0x59da7c]
mov dword [esp + 0x10], ecx
cmp ecx, dword [esi + eax + 8]
jl 0x40633e
xor edi, edi
mov ecx, dword [esp + 0x14]
mov edx, dword [0x59da80]
inc ecx
add esi, 0xc
cmp ecx, edx
mov dword [esp + 0x14], ecx
jl 0x4062e5
push ebp
call dword [sym.imp.MSVCRT.dll_fclose]
mov edx, dword [0x59db88]
push 0x50
mov dword [0x59db90], 1
mov dword [0x59db8c], edx
call fcn.00478e60
add esp, 8
mov dword [0x59db98], eax
mov dword [eax + 0x4c], edi
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20c
ret