Function at 0x401a50
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x54
push ebx
mov eax, dword [esp + 0x5c]
push ebp
push esi
push edi
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebp, eax
cmp ebp, 0xffffffff
mov dword [esp + 0x14], ebp
je 0x401bc7
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea ecx, [esp + 0x68]
push 0
push ecx
lea edx, [esp + 0x34]
push 0xe
push edx
push ebp
call esi
test eax, eax
je 0x401bc0
cmp dword [esp + 0x68], 0xe
jne 0x401bc0
cmp word [esp + 0x2c], 0x4d42
jne 0x401bc0
lea eax, [esp + 0x68]
push 0
push eax
lea ecx, [esp + 0x44]
push 0x28
push ecx
push ebp
call esi
test eax, eax
je 0x401bc0
cmp dword [esp + 0x68], 0x28
jne 0x401bc0
cmp dword [esp + 0x4c], 0x78637372
jne 0x401bc0
push 0
push 0
push 0xe
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x4a]
mov ecx, dword [esp + 0x40]
mov dword [esp + 0x24], eax
and eax, 0xffff
imul eax, ecx
add eax, 0x1f
mov esi, dword [esp + 0x44]
cdq
and edx, 0x1f
mov dword [esp + 0x1c], ecx
add eax, edx
mov edx, dword [esp + 0x50]
sar eax, 5
shl eax, 2
mov ebx, eax
add edx, 0x28
imul ebx, esi
mov dword [esp + 0x20], esi
mov dword [esp + 0x18], edx
lea edi, [ebx + 0x28]
push edi
call fcn.004067e8
mov esi, eax
add esp, 4
test esi, esi
je 0x401bc0
push edi
call fcn.004067e8
add esp, 4
mov dword [esp + 0x10], eax
test eax, eax
jne 0x401b75
push esi
call fcn.004067b9
add esp, 4
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x54
ret
lea ecx, [eax + 0x28]
lea edx, [esp + 0x68]
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x18]
push 0
push edx
push ecx
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x401ba1
push esi
call fcn.004067b9
mov edx, dword [esp + 0x14]
push edx
jmp 0x401bb8
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x68]
cmp ecx, eax
je 0x401bd1
push esi
call fcn.004067b9
mov ecx, dword [esp + 0x14]
push ecx
call fcn.004067b9
add esp, 8
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x54
ret
mov cx, word [esp + 0x24]
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x1c]
mov word [esi + 0xe], cx
mov dword [esi + 8], eax
lea ecx, [esi + 0x28]
xor eax, eax
mov dword [esi + 0x14], ebx
mov dword [esi], 0x28
mov dword [esi + 4], edx
mov word [esi + 0xc], 1
mov dword [esi + 0x10], eax
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], eax
mov dword [esi + 0x20], eax
mov dword [esi + 0x24], eax
mov edx, dword [esp + 0x50]
lea ebx, [edi + ecx - 0x28]
mov edi, dword [esp + 0x28]
lea eax, [edi + edx]
mov dword [esp + 0x28], eax
xor edx, edx
mov dl, byte [edi]
inc edi
mov ebp, edx
and ebp, 7
jne 0x401c39
shr edx, 3
inc edx
mov al, byte [edi]
mov byte [ecx], al
inc ecx
inc edi
dec edx
jne 0x401c2e
jmp 0x401c7a
cmp ebp, 7
jne 0x401c48
xor eax, eax
mov al, byte [edi]
mov ebp, eax
add ebp, 7
inc edi
and edx, 0xf8
xor eax, eax
mov al, byte [edi]
shl edx, 5
or edx, eax
mov eax, ecx
sub eax, edx
lea edx, [esi + 0x28]
dec eax
inc edi
cmp eax, edx
jb 0x401cb8
mov dl, byte [eax]
mov byte [ecx], dl
mov dl, byte [eax + 1]
inc ecx
inc eax
mov byte [ecx], dl
inc ecx
inc eax
mov dl, byte [eax]
mov byte [ecx], dl
inc ecx
inc eax
dec ebp
jne 0x401c71
cmp ecx, ebx
jae 0x401c84
cmp edi, dword [esp + 0x28]
jb 0x401c1e
lea eax, [esi + 0x28]
sub ecx, eax
mov eax, dword [esi + 0x14]
cmp eax, ecx
je 0x401ce0
push esi
call fcn.004067b9
mov edx, dword [esp + 0x14]
push edx
call fcn.004067b9
mov eax, dword [esp + 0x1c]
add esp, 8
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x54
ret
push esi
call fcn.004067b9
mov eax, dword [esp + 0x14]
push eax
call fcn.004067b9
mov ecx, dword [esp + 0x1c]
add esp, 8
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x54
ret
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [esp + 0x10]
push edx
call fcn.004067b9
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret