Function at 0x4019d7
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov dword [ebp - 0x24], 0xc
mov dword [ebp - 0x20], 0
mov eax, dword [ebp + 0xc]
and eax, 0x80
test eax, eax
je 0x4018fd
mov dword [ebp - 0x1c], 0
mov byte [ebp - 0x38], 0x10
jmp 0x401908
mov dword [ebp - 0x1c], 1
mov byte [ebp - 0x38], 0
mov ecx, dword [ebp + 0xc]
and ecx, 0x8000
test ecx, ecx
jne 0x401941
mov edx, dword [ebp + 0xc]
and edx, 0x4000
test edx, edx
je 0x40192c
mov al, byte [ebp - 0x38]
or al, 0x80
mov byte [ebp - 0x38], al
jmp 0x401941
cmp dword [0x67067c], 0x8000
je 0x401941
mov cl, byte [ebp - 0x38]
or cl, 0x80
mov byte [ebp - 0x38], cl
mov edx, dword [ebp + 0xc]
and edx, 3
mov dword [ebp - 0x40], edx
cmp dword [ebp - 0x40], 0
je 0x40195e
cmp dword [ebp - 0x40], 1
je 0x401967
cmp dword [ebp - 0x40], 2
je 0x401970
jmp 0x401979
mov dword [ebp - 0x34], 0x80000000
jmp 0x401995
mov dword [ebp - 0x34], 0x40000000
jmp 0x401995
mov dword [ebp - 0x34], 0xc0000000
jmp 0x401995
mov dword [0x67062c], 0x16
mov dword [0x670630], 0
or eax, 0xffffffff
jmp 0x401d77
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x44], eax
mov ecx, dword [ebp - 0x44]
sub ecx, 0x10
mov dword [ebp - 0x44], ecx
cmp dword [ebp - 0x44], 0x30
ja case.0x4019b5.4
mov eax, dword [ebp - 0x44]
xor edx, edx
mov dl, byte [eax + 0x401d8f]
jmp dword [edx*4 + 0x401d7b]
mov dword [ebp - 8], 0
jmp 0x4019fc
mov dword [ebp - 8], 1
jmp 0x4019fc
mov dword [ebp - 8], 2
jmp 0x4019fc
mov dword [ebp - 8], 3
jmp 0x4019fc
mov dword [0x67062c], 0x16
mov dword [0x670630], 0
or eax, 0xffffffff
jmp 0x401d77
mov ecx, dword [ebp + 0xc]
and ecx, 0x700
mov dword [ebp - 0x48], ecx
cmp dword [ebp - 0x48], 0x400
jg 0x401a48
cmp dword [ebp - 0x48], 0x400
je 0x401a65
cmp dword [ebp - 0x48], 0x200
jg 0x401a3d
cmp dword [ebp - 0x48], 0x200
je 0x401a80
cmp dword [ebp - 0x48], 0
je 0x401a65
cmp dword [ebp - 0x48], 0x100
je 0x401a6e
jmp 0x401a92
cmp dword [ebp - 0x48], 0x300
je 0x401a89
jmp 0x401a92
cmp dword [ebp - 0x48], 0x500
je 0x401a77
cmp dword [ebp - 0x48], 0x600
je 0x401a80
cmp dword [ebp - 0x48], 0x700
je 0x401a77
jmp 0x401a92
mov dword [ebp - 0x18], 3
jmp 0x401aae
mov dword [ebp - 0x18], 4
jmp 0x401aae
mov dword [ebp - 0x18], 1
jmp 0x401aae
mov dword [ebp - 0x18], 5
jmp 0x401aae
mov dword [ebp - 0x18], 2
jmp 0x401aae
mov dword [0x67062c], 0x16
mov dword [0x670630], 0
or eax, 0xffffffff
jmp 0x401d77
mov dword [ebp - 0x28], 0x80
mov edx, dword [ebp + 0xc]
and edx, 0x100
test edx, edx
je 0x401aff
lea eax, [ebp + 0x14]
mov dword [ebp - 0x2c], eax
mov ecx, dword [ebp - 0x2c]
add ecx, 4
mov dword [ebp - 0x2c], ecx
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx - 4]
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x2c], 0
mov ecx, dword [0x670634]
not ecx
mov edx, dword [ebp - 0x10]
and edx, ecx
and edx, 0x80
test edx, edx
jne 0x401aff
mov dword [ebp - 0x28], 1
mov eax, dword [ebp + 0xc]
and eax, 0x40
test eax, eax
je 0x401b21
mov ecx, dword [ebp - 0x28]
or ecx, 0x4000000
mov dword [ebp - 0x28], ecx
mov edx, dword [ebp - 0x34]
or edx, 0x10000
mov dword [ebp - 0x34], edx
mov eax, dword [ebp + 0xc]
and eax, 0x1000
test eax, eax
je 0x401b36
mov ecx, dword [ebp - 0x28]
or ch, 1
mov dword [ebp - 0x28], ecx
mov edx, dword [ebp + 0xc]
and edx, 0x20
test edx, edx
je 0x401b4d
mov eax, dword [ebp - 0x28]
or eax, 0x8000000
mov dword [ebp - 0x28], eax
jmp 0x401b63
mov ecx, dword [ebp + 0xc]
and ecx, 0x10
test ecx, ecx
je 0x401b63
mov edx, dword [ebp - 0x28]
or edx, 0x10000000
mov dword [ebp - 0x28], edx
call fcn.00403110
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0xffffffff
jne 0x401b8d
mov dword [0x67062c], 0x18
mov dword [0x670630], 0
or eax, 0xffffffff
jmp 0x401d77
push 0
mov eax, dword [ebp - 0x28]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
lea edx, [ebp - 0x24]
push edx
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [ebp - 0x34]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
jne 0x401bcd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004029b0
add esp, 4
or eax, 0xffffffff
jmp 0x401d77
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileType]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x401c01
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004029b0
add esp, 4
or eax, 0xffffffff
jmp 0x401d77
cmp dword [ebp - 0xc], 2
jne 0x401c12
mov dl, byte [ebp - 0x38]
or dl, 0x40
mov byte [ebp - 0x38], dl
jmp 0x401c20
cmp dword [ebp - 0xc], 3
jne 0x401c20
mov al, byte [ebp - 0x38]
or al, 8
mov byte [ebp - 0x38], al
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ebp - 0x14]
push edx
call fcn.00403240
add esp, 8
mov al, byte [ebp - 0x38]
or al, 1
mov byte [ebp - 0x38], al
mov ecx, dword [ebp - 0x14]
sar ecx, 5
mov edx, dword [ebp - 0x14]
and edx, 0x1f
mov eax, dword [ecx*4 + 0x671f20]
mov cl, byte [ebp - 0x38]
mov byte [eax + edx*8 + 4], cl
movsx edx, byte [ebp - 0x38]
and edx, 0x48
test edx, edx
jne 0x401d2e
movsx eax, byte [ebp - 0x38]
and eax, 0x80
test eax, eax
je 0x401d2e
mov ecx, dword [ebp + 0xc]
and ecx, 2
test ecx, ecx
je 0x401d2e
push 2
push 0xffffffffffffffff
mov edx, dword [ebp - 0x14]
push edx
call fcn.00402a40
add esp, 0xc
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0xffffffff
jne 0x401cbb
cmp dword [0x670630], 0x83
je 0x401cb9
mov eax, dword [ebp - 0x14]
push eax
call fcn.00401dc0
add esp, 4
or eax, 0xffffffff
jmp 0x401d77
jmp 0x401d2e
mov byte [ebp - 0x30], 0
push 1
lea ecx, [ebp - 0x30]
push ecx
mov edx, dword [ebp - 0x14]
push edx
call fcn.00401eb0
add esp, 0xc
test eax, eax
jne 0x401d04
movsx eax, byte [ebp - 0x30]
cmp eax, 0x1a
jne 0x401d04
mov ecx, dword [ebp - 0x3c]
push ecx
mov edx, dword [ebp - 0x14]
push edx
call fcn.00402ea0
add esp, 8
cmp eax, 0xffffffff
jne 0x401d04
mov eax, dword [ebp - 0x14]
push eax
call fcn.00401dc0
add esp, 4
or eax, 0xffffffff
jmp 0x401d77
push 0
push 0
mov ecx, dword [ebp - 0x14]
push ecx
call fcn.00402a40
add esp, 0xc
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0xffffffff
jne 0x401d2e
mov edx, dword [ebp - 0x14]
push edx
call fcn.00401dc0
add esp, 4
or eax, 0xffffffff
jmp 0x401d77
movsx eax, byte [ebp - 0x38]
and eax, 0x48
test eax, eax
jne 0x401d74
mov ecx, dword [ebp + 0xc]
and ecx, 8
test ecx, ecx
je 0x401d74
mov edx, dword [ebp - 0x14]
sar edx, 5
mov eax, dword [ebp - 0x14]
and eax, 0x1f
mov ecx, dword [edx*4 + 0x671f20]
mov dl, byte [ecx + eax*8 + 4]
or dl, 0x20
mov eax, dword [ebp - 0x14]
sar eax, 5
mov ecx, dword [ebp - 0x14]
and ecx, 0x1f
mov eax, dword [eax*4 + 0x671f20]
mov byte [eax + ecx*8 + 4], dl
mov eax, dword [ebp - 0x14]
mov esp, ebp
pop ebp
ret