Function at 0x403c8f
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 0x403e89
mov dword [esp + 4], 0
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.00403c20
test eax, eax
je 0x403cdc
mov dword [ebp - 0x50], 1
jmp 0x404165
mov eax, dword [ebp - 0xc]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x409030
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sub.msvcrt.dll__read
cmp eax, dword [ebp - 0xc]
je 0x403d07
mov dword [ebp - 0x50], 1
jmp 0x404165
cmp word [0x40922e], 0xaa55
je 0x403d1e
mov dword [ebp - 0x50], 1
jmp 0x404165
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x3c], 0x1be
cmp dword [ebp - 0x3c], 0x1fd
jg 0x403d84
mov eax, dword [ebp - 0x3c]
add eax, 0x409034
cmp byte [eax], 0
je 0x403d7c
mov eax, dword [ebp - 0x44]
mov edx, dword [ebp - 0x3c]
add edx, 0x40903c
mov edx, dword [edx]
mov dword [ebp + eax*8 - 0x34], edx
test edx, edx
jne 0x403d64
mov dword [ebp - 0x50], 1
jmp 0x404165
mov eax, dword [ebp - 0x44]
mov edx, eax
mov eax, dword [ebp - 0x3c]
add eax, 0x409038
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 0x403d2c
cmp dword [ebp - 0x44], 0
jne 0x403d96
mov dword [ebp - 0x50], 1
jmp 0x404165
mov dword [ebp - 0x3c], 0
mov eax, dword [ebp - 0x44]
dec eax
cmp eax, dword [ebp - 0x3c]
jle 0x403e32
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 0x403ddc
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 0x403dd5
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x48], eax
lea eax, [ebp - 0x40]
inc dword [eax]
jmp 0x403db7
mov eax, dword [ebp - 0x48]
cmp eax, dword [ebp - 0x3c]
je 0x403e28
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 0x403d9d
cmp dword [ebp - 0x38], 0
jne 0x403e44
mov dword [ebp - 0x50], 1
jmp 0x404165
mov dword [ebp - 0x3c], 0
mov eax, dword [ebp - 0x44]
dec eax
cmp eax, dword [ebp - 0x3c]
jle 0x403e80
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 0x403e79
mov dword [ebp - 0x50], 1
jmp 0x404165
lea eax, [ebp - 0x3c]
inc dword [eax]
jmp 0x403e4b
mov dword [ebp - 0x14], 0
jmp 0x403e94
cmp dword [ebp - 0x10], 0
je 0x403e94
lea eax, [ebp - 0x14]
inc dword [eax]
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp + 0xc]
cmp byte [eax + 1], dl
jae 0x403eab
mov dword [ebp - 0x50], 1
jmp 0x404165
cmp dword [ebp - 0x14], 3
jg 0x403fb1
mov eax, dword [ebp + 0xc]
cmp byte [eax + 1], 3
ja 0x403f38
mov eax, dword [ebp + 0xc]
movzx eax, byte [eax + 1]
shl eax, 4
cmp byte [eax + 0x4091f2], 0
jne 0x403edd
mov dword [ebp - 0x50], 1
jmp 0x404165
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 + 0x4091f2]
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 + 0x4091f6]
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 + 0x4091fa]
mov dword [edx + 8], eax
mov dword [ebp - 0x50], 0
jmp 0x404165
mov eax, dword [ebp + 0xc]
cmp byte [eax + 1], 0xff
je 0x403f4a
mov dword [ebp - 0x14], 4
jmp 0x403fb1
cmp dword [ebp - 0x14], 3
jg 0x403fb1
mov eax, dword [ebp - 0x14]
shl eax, 4
cmp byte [eax + 0x4091f2], 0
je 0x403faa
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 + 0x4091f2]
mov byte [edx + 2], al
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x14]
shl eax, 4
mov eax, dword [eax + 0x4091f6]
mov dword [edx + 4], eax
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x14]
shl eax, 4
mov eax, dword [eax + 0x4091fa]
mov dword [edx + 8], eax
mov dword [ebp - 0x50], 0
jmp 0x404165
lea eax, [ebp - 0x14]
inc dword [eax]
jmp 0x403f4a
cmp dword [ebp - 0x14], 4
jne 0x40401b
cmp dword [ebp - 0x10], 0
je 0x40401b
mov dword [ebp - 0x4c], 0
cmp dword [ebp - 0x4c], 3
jg 0x403fef
mov eax, dword [ebp - 0x4c]
shl eax, 4
cmp byte [eax + 0x4091f2], 5
je 0x403fef
mov eax, dword [ebp - 0x4c]
shl eax, 4
cmp byte [eax + 0x4091f2], 0xf
je 0x403fef
lea eax, [ebp - 0x4c]
inc dword [eax]
jmp 0x403fc4
cmp dword [ebp - 0x4c], 4
jne 0x404001
mov dword [ebp - 0x50], 1
jmp 0x404165
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x4c]
shl eax, 4
mov eax, dword [eax + 0x4091f6]
mov dword [edx + 4], eax
mov dword [ecx + 0xc], eax
jmp 0x404053
cmp byte [0x409202], 5
je 0x40402d
cmp byte [0x409202], 0xf
jne 0x404036
cmp dword [0x409206], 0
jne 0x404042
mov dword [ebp - 0x50], 1
jmp 0x404165
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 0xc]
mov eax, dword [0x409206]
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.00403c20
test eax, eax
je 0x404078
mov dword [ebp - 0x50], 1
jmp 0x404165
mov eax, dword [ebp - 0xc]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x409030
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sub.msvcrt.dll__read
cmp eax, dword [ebp - 0xc]
je 0x4040a3
mov dword [ebp - 0x50], 1
jmp 0x404165
cmp word [0x40922e], 0xaa55
je 0x4040ba
mov dword [ebp - 0x50], 1
jmp 0x404165
cmp byte [0x4091f2], 5
je 0x4040ce
cmp byte [0x4091f2], 0xf
je 0x4040ce
jmp 0x4040f9
cmp dword [0x4091f6], 0
jne 0x4040e3
mov dword [ebp - 0x50], 1
jmp 0x404165
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 0xc]
mov eax, dword [0x4091f6]
add eax, dword [edx + 0xc]
mov dword [ecx + 4], eax
jmp 0x404053
cmp byte [0x4091f2], 0
setne al
movzx eax, al
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x403cac
mov eax, dword [ebp + 0xc]
cmp byte [eax + 1], 0xff
je 0x40412d
mov eax, dword [ebp + 0xc]
movzx eax, byte [eax + 1]
cmp eax, dword [ebp - 0x14]
je 0x40412d
jmp 0x403cac
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x14]
mov byte [edx], al
mov edx, dword [ebp + 0xc]
movzx eax, byte [0x4091f2]
mov byte [edx + 2], al
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 0xc]
mov eax, dword [0x4091f6]
add eax, dword [edx + 4]
mov dword [ecx + 4], eax
mov edx, dword [ebp + 0xc]
mov eax, dword [0x4091fa]
mov dword [edx + 8], eax
mov dword [ebp - 0x50], 0
mov eax, dword [ebp - 0x50]
leave
ret