Function at 0x401d70
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x20
push ebx
mov eax, dword [esp + 0x28]
push ebp
push esi
xor ebx, ebx
push edi
push ebx
push 0x80
push 3
push ebx
push 1
push 0x80000000
mov dword [esp + 0x2c], ecx
push eax
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x38], 0xeb7bf6
mov dword [esp + 0x40], ebx
mov dword [esp + 0x3c], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x401dc3
mov ecx, dword [esp + 0x38]
pop edi
pop esi
pop ebp
mov dword [ecx], eax
pop ebx
add esp, 0x20
ret 8
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 2
push ebx
push 0xfffffffffffffffc
push ebp
call edi
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea edx, [esp + 0x10]
push ebx
push edx
lea eax, [esp + 0x24]
push 4
push eax
push ebp
call esi
cmp dword [esp + 0x1c], 0xeb7bf6
je 0x401e0c
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x38]
pop edi
pop esi
pop ebp
mov dword [ecx], 0xffffffff
pop ebx
add esp, 0x20
ret 8
push 2
push ebx
push 0xfffffffffffffff8
push ebp
mov dword [esp + 0x44], ebx
call edi
lea edx, [esp + 0x10]
push ebx
push edx
lea eax, [esp + 0x3c]
push 4
push eax
push ebp
call esi
mov edx, dword [esp + 0x34]
mov ebx, 0xfffffff8
sub ebx, edx
push 2
push 0
push ebx
push ebp
call edi
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x34]
lea ecx, [esp + 0x10]
push 0
push ecx
add eax, 0x14
push edx
push eax
push ebp
call esi
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x14]
sub ebx, 4
push 2
push 0
push ebx
push ebp
mov byte [ecx + edx + 0x14], 0
call edi
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x10]
push 0
push eax
add ecx, 0x30
push 4
push ecx
push ebp
call esi
sub ebx, 4
push 2
push 0
push ebx
push ebp
call edi
lea edx, [esp + 0x10]
push 0
push edx
lea eax, [esp + 0x3c]
push 4
push eax
push ebp
call esi
mov edx, dword [esp + 0x34]
push 2
sub ebx, edx
push 0
push ebx
push ebp
call edi
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x34]
lea ecx, [esp + 0x10]
push 0
push ecx
add eax, 0x34
push edx
push eax
push ebp
call esi
sub ebx, 0x10
push 2
push 0
push ebx
push ebp
call edi
mov ecx, dword [esp + 0x14]
xor edx, edx
lea eax, [ecx + 4]
mov ecx, eax
mov dword [ecx], edx
mov dword [ecx + 4], edx
mov dword [ecx + 8], edx
push edx
mov dword [ecx + 0xc], edx
lea edx, [esp + 0x14]
push edx
push 0x10
push eax
push ebp
call esi
sub ebx, 4
push 2
push 0
push ebx
push ebp
call edi
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x10]
push 0
add eax, 0x9d54
push ecx
push 4
push eax
push ebp
call esi
sub ebx, 4
push 2
push 0
push ebx
push ebp
call edi
lea edx, [esp + 0x10]
push 0
push edx
lea eax, [esp + 0x28]
push 4
push eax
push ebp
call esi
mov eax, dword [esp + 0x20]
push 2
sub ebx, eax
push 0
push ebx
push ebp
call edi
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x28], 0
lea eax, [ecx + 0x9d54]
mov ecx, dword [ecx + 0x9d54]
test ecx, ecx
jle 0x40202f
mov ecx, dword [esp + 0x14]
mov eax, 0xfffffa48
sub eax, ecx
lea edi, [ecx + 0x5b8]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x18], edi
jmp 0x401f7c
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
mov edi, dword [esp + 0x18]
lea edx, [esp + 0x10]
push 0
push edx
lea eax, [esp + 0x2c]
push 4
push eax
push ebp
call esi
mov edx, dword [esp + 0x24]
lea ecx, [esp + 0x10]
push 0
push ecx
lea eax, [edi - 0x184]
push edx
push eax
push ebp
call esi
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
add ecx, edi
add ecx, eax
lea eax, [esp + 0x10]
push 0
push eax
push 4
push edi
push ebp
mov byte [ecx + edx + 0x434], 0
call esi
lea ecx, [esp + 0x10]
push 0
push ecx
lea edx, [edi - 4]
push 4
push edx
push ebp
call esi
lea edx, [edi - 0x104]
mov edi, 0x40a3b0
or ecx, 0xffffffff
xor eax, eax
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
mov eax, dword [esp + 0x28]
and ecx, 3
inc eax
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x14]
mov esi, dword [esp + 0x18]
add ecx, 0x9d54
add esi, 0x188
mov dword [esp + 0x28], eax
mov dword [esp + 0x18], esi
cmp eax, dword [ecx]
jl 0x401f72
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 2
push 0
push ebx
push ebp
call edi
mov edx, dword [esp + 0x38]
pop edi
pop esi
mov dword [edx], ebp
pop ebp
pop ebx
add esp, 0x20
ret 8