Function at 0x1004d48a
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov edx, dword [ebp + 0x18]
push ebx
push esi
xor esi, esi
cmp edx, esi
push edi
mov dword [ebp - 0x28], esi
je 0x1004d4a4
mov dword [ebp - 0x14], edx
jmp 0x1004d4ac
lea eax, [ebp - 0x28]
mov dword [ebp - 0x14], eax
mov edx, eax
mov al, byte [ebp + 0x14]
and byte [ebp + 0x14], 1
mov bl, al
and al, 0xc
mov byte [ebp + 0x1b], al
lea eax, [ebp - 0xc]
push 2
mov dword [ebp - 0x30], esi
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x10], esi
mov dword [ebp - 8], esi
mov dword [ebp - 0x20], esi
pop ecx
xor esi, esi
mov dword [ebp - 0x24], eax
mov edi, eax
mov eax, 0x4b0
and bl, cl
inc esi
cmp dword [ebp + 0x10], eax
mov dword [ebp - 0x1c], 0xfffff800
mov dword [ebp - 0x18], ecx
mov byte [ebp - 1], 0
je 0x1004d4fa
cmp dword [ebp + 0x10], 0x4b1
jne 0x1004d50e
cmp dword [ebp + 0x10], eax
mov esi, ecx
setne al
inc al
mov dword [ebp - 0x18], 4
mov byte [ebp - 1], al
mov eax, dword [edx]
test eax, eax
je 0x1004d51c
and dword [edx], 0
jmp 0x1004d5a2
cmp byte [ebp + 0x14], 0
je 0x1004d550
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 0x1c]
jl 0x1004d547
mov edi, dword [ebp + 0xc]
mov eax, 0x1000
add dword [ebp - 0x20], eax
push dword [ebp - 0x20]
add dword [ebp - 0x1c], eax
mov ecx, edi
call fcn.10045ff1
mov eax, dword [edi]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 8]
lea edi, [eax + ecx]
push 0
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp + 8]
push esi
push edi
push dword [eax]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1004d64c
cmp dword [ebp - 0x10], esi
jb 0x1004d64c
movzx eax, byte [ebp - 1]
sub eax, 0
je 0x1004d59f
dec eax
je 0x1004d59a
dec eax
jne 0x1004d5a5
movzx ecx, word [edi]
xor eax, eax
mov ah, cl
sar ecx, 8
movzx eax, ax
or eax, ecx
mov dword [ebp - 0xc], eax
mov word [edi], ax
jmp 0x1004d5a5
movzx eax, word [edi]
jmp 0x1004d5a2
movzx eax, byte [edi]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xa
je 0x1004d63e
test bl, bl
je 0x1004d5b9
cmp dword [ebp - 0xc], 0xd
je 0x1004d5c1
add dword [ebp - 8], esi
jmp 0x1004d51c
and dword [ebp - 0x10], 0
push 0
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp + 8]
push esi
push edi
push dword [eax]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1004d63e
cmp dword [ebp - 0x10], esi
jb 0x1004d63e
xor eax, eax
cmp byte [ebp - 1], al
je 0x1004d5ef
mov ah, byte [edi + 1]
mov al, byte [edi]
jmp 0x1004d5f4
mov ah, byte [edi]
mov al, byte [edi + 1]
cmp eax, 0xa
jne 0x1004d60c
cmp byte [ebp + 0x1b], 0
je 0x1004d607
mov eax, dword [ebp - 0x18]
add dword [ebp - 8], eax
jmp 0x1004d64c
lea eax, [esi + esi]
jmp 0x1004d61a
cmp byte [ebp + 0x1b], 0
jne 0x1004d62e
cmp eax, 0xd
jne 0x1004d61f
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x30], eax
jmp 0x1004d64c
mov dword [ebp - 0x30], esi
shl esi, 0x10
or esi, eax
mov eax, dword [ebp - 0x14]
mov dword [eax], esi
jmp 0x1004d64c
cmp byte [ebp + 0x1b], 4
jg 0x1004d5ff
cmp eax, 0xd
je 0x1004d5ff
add dword [ebp - 8], esi
jmp 0x1004d622
cmp byte [ebp + 0x1b], 0
je 0x1004d649
add dword [ebp - 8], esi
jmp 0x1004d64c
mov dword [ebp - 0x30], esi
cmp byte [ebp + 0x14], 0
pop edi
pop esi
pop ebx
je 0x1004d661
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov ecx, dword [ebp - 8]
and dword [ecx + eax], 0
mov eax, dword [ebp - 8]
cdq
add eax, dword [ebp - 0x30]
push 0
pop ecx
adc edx, ecx
mov dword [ebp - 0x2c], edx
js 0x1004d67d
jg 0x1004d678
test eax, eax
jbe 0x1004d67d
xor eax, eax
inc eax
leave
ret
xor eax, eax
leave
ret