Function at 0x401b53
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc4
push ebx
push esi
push edi
mov dword [ebp - 0x14], 0
push dword [ebp + 8]
call fcn.00401a0c
push dword [ebp + 8]
call fcn.004043bf
mov eax, dword [0x446588]
mov dword [ebp - 0xbc], eax
mov eax, 0x18
mul dword [ebp + 8]
mov dword [ebp - 0xc0], eax
mov eax, dword [ebp - 0xbc]
mov edx, dword [ebp - 0xc0]
add eax, edx
mov dword [0x446bac], eax
push 0
lea eax, [ebp - 0xa4]
push eax
push dword [ebp + 0x10]
call sub.KERNEL32.DLL_OpenFile
mov edi, eax
or edi, edi
je 0x401f22
push 2
push 0
push 0
push edi
call sub.KERNEL32.DLL_SetFilePointer
mov esi, eax
push 0
push 0
push 0
push edi
call sub.KERNEL32.DLL_SetFilePointer
mov eax, esi
inc eax
push eax
call sub.CRTDLL.DLL_malloc
pop ecx
mov dword [ebp - 0xc], eax
push 0
lea eax, [ebp - 0xb4]
push eax
push esi
push dword [ebp - 0xc]
push edi
call sub.KERNEL32.DLL_ReadFile
push edi
call sub.KERNEL32.DLL_CloseHandle
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x1c], eax
cmp word [eax], 0x4d42
jne 0x401f17
mov eax, dword [ebp - 0xc]
mov ebx, eax
add ebx, 0xe
mov eax, dword [ebx + 4]
mov dword [ebp - 4], eax
mov eax, dword [ebx + 8]
mov dword [ebp - 0x18], eax
movzx eax, word [ebx + 0xe]
mov dword [ebp - 0xb0], eax
cmp dword [ebx + 0x10], 0
jne 0x401f17
push dword [ebp + 0xc]
push eax
push dword [ebp - 0x18]
push dword [ebp - 4]
push dword [0x446bac]
call fcn.00401a53
add esp, 0x14
or eax, eax
je 0x401f17
mov eax, dword [ebp + 0x10]
mov ecx, eax
or eax, 0xffffffff
inc eax
cmp byte [ecx + eax], 0
jne 0x401c5e
add eax, 1
push eax
call sub.CRTDLL.DLL_malloc
add esp, 4
mov edx, dword [0x446bac]
mov dword [edx + 0xc], eax
push dword [ebp + 0x10]
mov eax, dword [0x446bac]
push dword [eax + 0xc]
call fcn.00405734
cmp dword [ebp + 0xc], 2
jne 0x401d20
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0xa]
mov edi, eax
add edi, dword [ebp - 0xc]
mov eax, dword [0x446bac]
mov esi, dword [eax]
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0x18]
sub edx, 1
imul eax, edx
lea esi, [esi + eax]
mov eax, dword [ebp - 4]
add eax, 3
mov dword [ebp - 0x10], eax
and dword [ebp - 0x10], 0xfffffffc
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp - 4]
mov dword [ebp - 0xa8], eax
mov dword [ebp - 8], 0
jmp 0x401d0c
xor ebx, ebx
jmp 0x401ce2
mov al, byte [edi]
mov byte [esi], al
inc esi
inc edi
inc ebx
cmp ebx, dword [ebp - 4]
jl 0x401cdb
mov eax, dword [ebp - 0xa8]
lea edi, [edi + eax]
mov eax, dword [0x446bac]
mov esi, dword [eax]
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0x18]
sub edx, dword [ebp - 8]
sub edx, 2
imul eax, edx
lea esi, [esi + eax]
inc dword [ebp - 8]
mov eax, dword [ebp - 0x18]
cmp dword [ebp - 8], eax
jl 0x401cd7
mov dword [ebp - 0x14], 1
jmp 0x401f17
push 0
push 1
push 0x4460cc
push 0
mov eax, dword [0x446bb4]
push eax
mov edx, dword [eax]
call dword [edx + 0x64]
or eax, eax
jne 0x401f17
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0xa]
mov edi, eax
add edi, dword [ebp - 0xc]
mov eax, dword [0x4460dc]
mov dword [ebp - 0xb8], eax
mov esi, dword [0x4460f0]
mov edx, dword [ebp - 0x18]
dec edx
imul eax, edx
lea esi, [esi + eax]
mov eax, dword [0x446b98]
cmp eax, 0x10
je 0x401e08
jg 0x401d7e
cmp eax, 8
je 0x401d9b
jmp 0x401ef5
cmp eax, 0x18
je 0x401e7e
jl 0x401ef5
cmp eax, 0x20
je 0x401e7e
jmp 0x401ef5
mov eax, dword [ebp - 4]
add eax, 3
mov dword [ebp - 0x10], eax
and byte [ebp - 0x10], 0xfc
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp - 4]
mov dword [ebp - 0xa8], eax
mov dword [ebp - 8], 0
jmp 0x401df4
xor ebx, ebx
jmp 0x401dc8
mov al, byte [edi]
mov byte [esi], al
inc esi
inc edi
inc ebx
cmp ebx, dword [ebp - 4]
jl 0x401dc1
mov eax, dword [ebp - 0xa8]
lea edi, [edi + eax]
mov esi, dword [0x4460f0]
mov eax, dword [ebp - 0xb8]
mov edx, dword [ebp - 0x18]
sub edx, dword [ebp - 8]
sub edx, 2
imul eax, edx
lea esi, [esi + eax]
inc dword [ebp - 8]
mov eax, dword [ebp - 0x18]
cmp dword [ebp - 8], eax
jl 0x401dbd
mov dword [ebp - 0x14], 1
jmp 0x401ef5
mov dword [ebp - 8], 0
jmp 0x401e6d
xor ebx, ebx
jmp 0x401e4b
movzx edx, byte [edi + 2]
shr edx, 3
shl edx, 0xb
movzx ecx, byte [edi + 1]
shr ecx, 2
shl ecx, 5
add edx, ecx
movzx ecx, byte [edi]
shr ecx, 3
add edx, ecx
mov word [ebp - 0xaa], dx
mov ax, word [ebp - 0xaa]
mov word [esi], ax
add esi, 2
add edi, 3
inc ebx
cmp ebx, dword [ebp - 4]
jl 0x401e15
mov eax, dword [ebp - 4]
and eax, 3
lea edi, [edi + eax]
mov edx, dword [ebp - 4]
shl edx, 1
mov ecx, esi
sub ecx, edx
mov esi, ecx
sub esi, dword [ebp - 0xb8]
inc dword [ebp - 8]
mov eax, dword [ebp - 0x18]
cmp dword [ebp - 8], eax
jl 0x401e11
mov dword [ebp - 0x14], 1
jmp 0x401ef5
mov dword [ebp - 8], 0
jmp 0x401ee6
xor ebx, ebx
jmp 0x401ea8
mov al, byte [edi]
mov byte [esi], al
inc esi
inc edi
mov al, byte [edi]
mov byte [esi], al
inc esi
inc edi
mov al, byte [edi]
mov byte [esi], al
inc esi
inc edi
inc ebx
cmp dword [0x446b98], 0x20
jne 0x401ea8
inc esi
cmp ebx, dword [ebp - 4]
jl 0x401e8b
mov eax, dword [ebp - 4]
and eax, 3
lea edi, [edi + eax]
cmp dword [0x446b98], 0x20
jne 0x401ed3
mov edx, dword [ebp - 4]
shl edx, 2
mov ecx, esi
sub ecx, edx
mov esi, ecx
sub esi, dword [ebp - 0xb8]
jmp 0x401ee3
imul eax, dword [ebp - 4], 3
mov edx, esi
sub edx, eax
mov esi, edx
sub esi, dword [ebp - 0xb8]
inc dword [ebp - 8]
mov eax, dword [ebp - 0x18]
cmp dword [ebp - 8], eax
jl 0x401e87
mov dword [ebp - 0x14], 1
push 0
mov eax, dword [0x446bb4]
push eax
mov eax, dword [eax]
call dword [eax + pe_nt_image_headers32]
push 0x446ba0
push 8
mov eax, dword [0x446bb4]
push eax
mov eax, dword [eax]
call dword [eax + 0x74]
push dword [ebp - 0xc]
call sub.CRTDLL.DLL_free
add esp, 4
mov eax, dword [ebp - 0x14]
pop edi
pop esi
pop ebx
leave
ret 0xc