Function at 0x406230
Capabilities:
Read file on windows

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x370
mov edx, dword [esp + 0x37c]
push ebx
push ebp
mov ebp, ecx
xor ebx, ebx
mov ecx, dword [esp + 0x380]
push esi
mov dword [ebp + 0x10], eax
mov eax, dword [esp + 0x38c]
mov dword [ebp + 0x30], eax
mov eax, dword [ebp + 0x40]
mov dword [ebp], ecx
mov ecx, dword [esp + 0x390]
cmp eax, ebx
push edi
mov dword [ebp + 0xc], ebx
mov dword [ebp + 0x14], edx
mov dword [ebp + 0x24], ebx
mov dword [ebp + 0x28], ebx
mov dword [ebp + 0x2c], ebx
mov dword [ebp + 0x34], ecx
je 0x40628c
push eax
call fcn.00408ece
add esp, 4
mov dword [ebp + 0x40], ebx
mov ecx, dword [ebp + 0x14]
mov eax, ecx
shl eax, 7
sub eax, ecx
lea edx, [eax + eax*2]
shl edx, 1
push edx
call fcn.00408ed9
mov dword [ebp + 0x40], eax
mov edx, dword [str.godata_]
mov esi, dword [0x413598]
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x34]
mov dword [esp + 0x2c], edx
mov dword [esp + 0x30], esi
rep stosd dword es:[edi], eax
mov ecx, 0x3f
lea edi, [esp + 0x138]
mov dword [esp + 0x130], edx
mov dword [esp + 0x134], esi
rep stosd dword es:[edi], eax
mov eax, dword [ebp]
or ecx, 0xffffffff
add esp, 4
lea edx, [esp + 0x28]
lea eax, [eax + eax*8]
lea edi, [eax*2 + str.ash1]
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [esp + 0x12c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x28]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x28]
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, 0x413590
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [esp + 0x12c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str..txt
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push ebx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x234]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x30]
push ecx
call dword [sym.imp.KERNEL32.dll_OpenFile]
mov esi, eax
cmp esi, 0xffffffff
je 0x406595
push 2
push ebx
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
call ebx
push 0
push 0
push 0
push esi
mov edi, eax
call ebx
push edi
call fcn.00408ed9
add esp, 4
lea edx, [esp + 0x20]
mov dword [esp + 0x14], eax
push 0
push edx
push edi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esp + 0x230]
push 0
lea ecx, [esp + 0x130]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_OpenFile]
mov esi, eax
cmp esi, 0xffffffff
je 0x406588
push 2
push 0
push 0
push esi
call ebx
push 0
push 0
push 0
push esi
mov dword [esp + 0x20], eax
call ebx
mov edx, dword [esp + 0x10]
push edx
call fcn.00408ed9
mov ecx, dword [esp + 0x14]
add esp, 4
mov ebx, eax
lea eax, [esp + 0x20]
push 0
push eax
push ecx
push ebx
push esi
mov dword [esp + 0x30], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0xc64b2279
mov dword [esp + 0x18], 0
imul edi
add edx, edi
sar edx, 9
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, dword [ebp + 0x14]
test eax, eax
mov dword [esp + 0x24], edx
jle 0x406558
lea ecx, [esp + 0x2b8]
xor ebx, ebx
mov dword [esp + 0x10], ecx
call fcn.0040963c
cdq
idiv dword [esp + 0x24]
test ebx, ebx
mov al, 1
jle 0x4064c1
mov ecx, dword [esp + 0x18]
lea esi, [esp + 0x2b8]
cmp edx, dword [esi]
jne 0x4064b7
xor al, al
add esi, 4
dec ecx
jne 0x4064b1
test al, al
je 0x406496
mov eax, dword [esp + 0x10]
mov dword [eax], edx
mov eax, edx
shl eax, 4
add eax, edx
lea ecx, [eax + eax*2]
mov eax, dword [esp + 0x1c]
lea esi, [eax + ecx*2]
mov ecx, dword [ebp + 0x40]
lea edi, [ebx + ecx + 0x169]
mov ecx, 0x19
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp + 0x40]
mov edi, ebx
mov byte [ebx + eax + 0x1cd], 0
mov eax, edx
shl eax, 5
add eax, edx
lea ecx, [eax + eax*4]
mov eax, dword [esp + 0x14]
add eax, edx
lea eax, [eax + ecx*4]
mov ecx, dword [ebp + 0x40]
add edi, ecx
mov ecx, 0x5a
mov esi, eax
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 0x40]
lea esi, [eax + 0x169]
mov eax, dword [esp + 0x18]
lea edi, [ebx + ecx + 0x1ce]
mov ecx, 0x4b
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x10]
mov ecx, dword [ebp + 0x14]
inc eax
add esi, 4
add ebx, 0x2fa
cmp eax, ecx
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], esi
jl 0x406496
mov ebx, dword [esp + 0x1c]
mov edx, dword [esp + 0x14]
push edx
call fcn.00408ece
push ebx
call fcn.00408ece
add esp, 8
mov ecx, ebp
mov dword [ebp + 0x38], 8
call fcn.00406b40
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x370
ret 0x14
mov eax, dword [esp + 0x14]
push eax
call fcn.00408ece
add esp, 4
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x370
ret 0x14