Function at 0x40281f
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x68
mov dword [ebp - 0xc], 0x200
mov dword [ebp - 0x10], 1
mov eax, dword [ebp + 0xc]
movzx eax, byte [eax]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0xff
jne 0x402a19
mov dword [esp + 4], 0
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.004027b0
test eax, eax
je 0x40286c
mov dword [ebp - 0x50], 1
jmp 0x402cf5
mov eax, dword [ebp - 0xc]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x406010
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sub.msvcrt.dll__read
cmp eax, dword [ebp - 0xc]
je 0x402897
mov dword [ebp - 0x50], 1
jmp 0x402cf5
cmp word [0x40620e], 0xaa55
je 0x4028ae
mov dword [ebp - 0x50], 1
jmp 0x402cf5
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x3c], 0x1be
cmp dword [ebp - 0x3c], 0x1fd
jg 0x402914
mov eax, dword [ebp - 0x3c]
add eax, 0x406014
cmp byte [eax], 0
je 0x40290c
mov eax, dword [ebp - 0x44]
mov edx, dword [ebp - 0x3c]
add edx, 0x40601c
mov edx, dword [edx]
mov dword [ebp + eax*8 - 0x34], edx
test edx, edx
jne 0x4028f4
mov dword [ebp - 0x50], 1
jmp 0x402cf5
mov eax, dword [ebp - 0x44]
mov edx, eax
mov eax, dword [ebp - 0x3c]
add eax, 0x406018
mov eax, dword [eax]
mov dword [ebp + edx*8 - 0x38], eax
lea eax, [ebp - 0x44]
inc dword [eax]
lea eax, [ebp - 0x3c]
add dword [eax], 0x10
jmp 0x4028bc
cmp dword [ebp - 0x44], 0
jne 0x402926
mov dword [ebp - 0x50], 1
jmp 0x402cf5
mov dword [ebp - 0x3c], 0
mov eax, dword [ebp - 0x44]
dec eax
cmp eax, dword [ebp - 0x3c]
jle 0x4029c2
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x3c]
inc eax
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x40]
cmp eax, dword [ebp - 0x44]
jge 0x40296c
mov eax, dword [ebp - 0x48]
mov edx, dword [ebp - 0x40]
mov eax, dword [ebp + eax*8 - 0x38]
cmp eax, dword [ebp + edx*8 - 0x38]
jbe 0x402965
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x48], eax
lea eax, [ebp - 0x40]
inc dword [eax]
jmp 0x402947
mov eax, dword [ebp - 0x48]
cmp eax, dword [ebp - 0x3c]
je 0x4029b8
mov eax, dword [ebp - 0x3c]
mov eax, dword [ebp + eax*8 - 0x38]
mov dword [ebp - 0x4c], eax
mov edx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x48]
mov eax, dword [ebp + eax*8 - 0x38]
mov dword [ebp + edx*8 - 0x38], eax
mov edx, dword [ebp - 0x48]
mov eax, dword [ebp - 0x4c]
mov dword [ebp + edx*8 - 0x38], eax
mov eax, dword [ebp - 0x3c]
mov eax, dword [ebp + eax*8 - 0x34]
mov dword [ebp - 0x4c], eax
mov edx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x48]
mov eax, dword [ebp + eax*8 - 0x34]
mov dword [ebp + edx*8 - 0x34], eax
mov edx, dword [ebp - 0x48]
mov eax, dword [ebp - 0x4c]
mov dword [ebp + edx*8 - 0x34], eax
lea eax, [ebp - 0x3c]
inc dword [eax]
jmp 0x40292d
cmp dword [ebp - 0x38], 0
jne 0x4029d4
mov dword [ebp - 0x50], 1
jmp 0x402cf5
mov dword [ebp - 0x3c], 0
mov eax, dword [ebp - 0x44]
dec eax
cmp eax, dword [ebp - 0x3c]
jle 0x402a10
mov edx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x3c]
mov eax, dword [ebp + eax*8 - 0x34]
mov edx, dword [ebp + edx*8 - 0x38]
add edx, eax
mov eax, dword [ebp - 0x3c]
cmp edx, dword [ebp + eax*8 - 0x30]
jbe 0x402a09
mov dword [ebp - 0x50], 1
jmp 0x402cf5
lea eax, [ebp - 0x3c]
inc dword [eax]
jmp 0x4029db
mov dword [ebp - 0x14], 0
jmp 0x402a24
cmp dword [ebp - 0x10], 0
je 0x402a24
lea eax, [ebp - 0x14]
inc dword [eax]
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp + 0xc]
cmp byte [eax + 1], dl
jae 0x402a3b
mov dword [ebp - 0x50], 1
jmp 0x402cf5
cmp dword [ebp - 0x14], 3
jg 0x402b41
mov eax, dword [ebp + 0xc]
cmp byte [eax + 1], 3
ja 0x402ac8
mov eax, dword [ebp + 0xc]
movzx eax, byte [eax + 1]
shl eax, 4
cmp byte [eax + 0x4061d2], 0
jne 0x402a6d
mov dword [ebp - 0x50], 1
jmp 0x402cf5
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 0xc]
movzx eax, byte [eax + 1]
mov byte [edx], al
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 0xc]
movzx eax, byte [eax + 1]
shl eax, 4
movzx eax, byte [eax + 0x4061d2]
mov byte [edx + 2], al
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 0xc]
movzx eax, byte [eax + 1]
shl eax, 4
mov eax, dword [eax + 0x4061d6]
mov dword [edx + 4], eax
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 0xc]
movzx eax, byte [eax + 1]
shl eax, 4
mov eax, dword [eax + 0x4061da]
mov dword [edx + 8], eax
mov dword [ebp - 0x50], 0
jmp 0x402cf5
mov eax, dword [ebp + 0xc]
cmp byte [eax + 1], 0xff
je 0x402ada
mov dword [ebp - 0x14], 4
jmp 0x402b41
cmp dword [ebp - 0x14], 3
jg 0x402b41
mov eax, dword [ebp - 0x14]
shl eax, 4
cmp byte [eax + 0x4061d2], 0
je 0x402b3a
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x14]
mov byte [edx], al
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x14]
shl eax, 4
movzx eax, byte [eax + 0x4061d2]
mov byte [edx + 2], al
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x14]
shl eax, 4
mov eax, dword [eax + 0x4061d6]
mov dword [edx + 4], eax
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x14]
shl eax, 4
mov eax, dword [eax + 0x4061da]
mov dword [edx + 8], eax
mov dword [ebp - 0x50], 0
jmp 0x402cf5
lea eax, [ebp - 0x14]
inc dword [eax]
jmp 0x402ada
cmp dword [ebp - 0x14], 4
jne 0x402bab
cmp dword [ebp - 0x10], 0
je 0x402bab
mov dword [ebp - 0x4c], 0
cmp dword [ebp - 0x4c], 3
jg 0x402b7f
mov eax, dword [ebp - 0x4c]
shl eax, 4
cmp byte [eax + 0x4061d2], 5
je 0x402b7f
mov eax, dword [ebp - 0x4c]
shl eax, 4
cmp byte [eax + 0x4061d2], 0xf
je 0x402b7f
lea eax, [ebp - 0x4c]
inc dword [eax]
jmp 0x402b54
cmp dword [ebp - 0x4c], 4
jne 0x402b91
mov dword [ebp - 0x50], 1
jmp 0x402cf5
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x4c]
shl eax, 4
mov eax, dword [eax + 0x4061d6]
mov dword [edx + 4], eax
mov dword [ecx + 0xc], eax
jmp 0x402be3
cmp byte [0x4061e2], 5
je 0x402bbd
cmp byte [0x4061e2], 0xf
jne 0x402bc6
cmp dword [0x4061e6], 0
jne 0x402bd2
mov dword [ebp - 0x50], 1
jmp 0x402cf5
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 0xc]
mov eax, dword [0x4061e6]
add eax, dword [edx + 0xc]
mov dword [ecx + 4], eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 4]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.004027b0
test eax, eax
je 0x402c08
mov dword [ebp - 0x50], 1
jmp 0x402cf5
mov eax, dword [ebp - 0xc]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x406010
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sub.msvcrt.dll__read
cmp eax, dword [ebp - 0xc]
je 0x402c33
mov dword [ebp - 0x50], 1
jmp 0x402cf5
cmp word [0x40620e], 0xaa55
je 0x402c4a
mov dword [ebp - 0x50], 1
jmp 0x402cf5
cmp byte [0x4061d2], 5
je 0x402c5e
cmp byte [0x4061d2], 0xf
je 0x402c5e
jmp 0x402c89
cmp dword [0x4061d6], 0
jne 0x402c73
mov dword [ebp - 0x50], 1
jmp 0x402cf5
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 0xc]
mov eax, dword [0x4061d6]
add eax, dword [edx + 0xc]
mov dword [ecx + 4], eax
jmp 0x402be3
cmp byte [0x4061d2], 0
setne al
movzx eax, al
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x40283c
mov eax, dword [ebp + 0xc]
cmp byte [eax + 1], 0xff
je 0x402cbd
mov eax, dword [ebp + 0xc]
movzx eax, byte [eax + 1]
cmp eax, dword [ebp - 0x14]
je 0x402cbd
jmp 0x40283c
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x14]
mov byte [edx], al
mov edx, dword [ebp + 0xc]
movzx eax, byte [0x4061d2]
mov byte [edx + 2], al
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 0xc]
mov eax, dword [0x4061d6]
add eax, dword [edx + 4]
mov dword [ecx + 4], eax
mov edx, dword [ebp + 0xc]
mov eax, dword [0x4061da]
mov dword [edx + 8], eax
mov dword [ebp - 0x50], 0
mov eax, dword [ebp - 0x50]
leave
ret