Function at 0x413410
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 0x41343d
mov dword [ebp - 0x1c], 0
mov byte [ebp - 0x38], 0x10
jmp 0x413448
mov dword [ebp - 0x1c], 1
mov byte [ebp - 0x38], 0
mov ecx, dword [ebp + 0xc]
and ecx, 0x8000
test ecx, ecx
jne 0x413481
mov edx, dword [ebp + 0xc]
and edx, 0x4000
test edx, edx
je 0x41346c
mov al, byte [ebp - 0x38]
or al, 0x80
mov byte [ebp - 0x38], al
jmp 0x413481
cmp dword [0x4354a8], 0x8000
je 0x413481
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 0x41349e
cmp dword [ebp - 0x40], 1
je 0x4134a7
cmp dword [ebp - 0x40], 2
je 0x4134b0
jmp 0x4134b9
mov dword [ebp - 0x34], 0x80000000
jmp 0x4134d5
mov dword [ebp - 0x34], 0x40000000
jmp 0x4134d5
mov dword [ebp - 0x34], 0xc0000000
jmp 0x4134d5
mov dword [0x4351a8], 0x16
mov dword [0x4351ac], 0
or eax, 0xffffffff
jmp 0x4138c2
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.0x4134f5.4
mov eax, dword [ebp - 0x44]
xor edx, edx
mov dl, byte [eax + 0x4138da]
jmp dword [edx*4 + 0x4138c6]
mov dword [ebp - 8], 0
jmp 0x41353c
mov dword [ebp - 8], 1
jmp 0x41353c
mov dword [ebp - 8], 2
jmp 0x41353c
mov dword [ebp - 8], 3
jmp 0x41353c
mov dword [0x4351a8], 0x16
mov dword [0x4351ac], 0
or eax, 0xffffffff
jmp 0x4138c2
mov ecx, dword [ebp + 0xc]
and ecx, 0x700
mov dword [ebp - 0x48], ecx
cmp dword [ebp - 0x48], 0x100
jg 0x413562
cmp dword [ebp - 0x48], 0x100
je 0x4135b9
cmp dword [ebp - 0x48], 0
je 0x4135b0
jmp 0x4135dd
cmp dword [ebp - 0x48], 0x300
jg 0x41357f
cmp dword [ebp - 0x48], 0x300
je 0x4135d4
cmp dword [ebp - 0x48], 0x200
je 0x4135cb
jmp 0x4135dd
cmp dword [ebp - 0x48], 0x500
jg 0x41359c
cmp dword [ebp - 0x48], 0x500
je 0x4135c2
cmp dword [ebp - 0x48], 0x400
je 0x4135b0
jmp 0x4135dd
cmp dword [ebp - 0x48], 0x600
je 0x4135cb
cmp dword [ebp - 0x48], 0x700
je 0x4135c2
jmp 0x4135dd
mov dword [ebp - 0x18], 3
jmp 0x4135f9
mov dword [ebp - 0x18], 4
jmp 0x4135f9
mov dword [ebp - 0x18], 1
jmp 0x4135f9
mov dword [ebp - 0x18], 5
jmp 0x4135f9
mov dword [ebp - 0x18], 2
jmp 0x4135f9
mov dword [0x4351a8], 0x16
mov dword [0x4351ac], 0
or eax, 0xffffffff
jmp 0x4138c2
mov dword [ebp - 0x28], 0x80
mov edx, dword [ebp + 0xc]
and edx, 0x100
test edx, edx
je 0x41364a
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 [0x4351b0]
not ecx
mov edx, dword [ebp - 0x10]
and edx, ecx
and edx, 0x80
test edx, edx
jne 0x41364a
mov dword [ebp - 0x28], 1
mov eax, dword [ebp + 0xc]
and eax, 0x40
test eax, eax
je 0x41366c
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 0x413681
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 0x413698
mov eax, dword [ebp - 0x28]
or eax, 0x8000000
mov dword [ebp - 0x28], eax
jmp 0x4136ae
mov ecx, dword [ebp + 0xc]
and ecx, 0x10
test ecx, ecx
je 0x4136ae
mov edx, dword [ebp - 0x28]
or edx, 0x10000000
mov dword [ebp - 0x28], edx
call fcn.00411130
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0xffffffff
jne 0x4136d8
mov dword [0x4351a8], 0x18
mov dword [0x4351ac], 0
or eax, 0xffffffff
jmp 0x4138c2
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 0x413718
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0040f760
add esp, 4
or eax, 0xffffffff
jmp 0x4138c2
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 0x41374c
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.0040f760
add esp, 4
or eax, 0xffffffff
jmp 0x4138c2
cmp dword [ebp - 0xc], 2
jne 0x41375d
mov dl, byte [ebp - 0x38]
or dl, 0x40
mov byte [ebp - 0x38], dl
jmp 0x41376b
cmp dword [ebp - 0xc], 3
jne 0x41376b
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.00411260
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 + 0x436820]
mov cl, byte [ebp - 0x38]
mov byte [eax + edx*8 + 4], cl
movsx edx, byte [ebp - 0x38]
and edx, 0x48
test edx, edx
jne 0x413879
movsx eax, byte [ebp - 0x38]
and eax, 0x80
test eax, eax
je 0x413879
mov ecx, dword [ebp + 0xc]
and ecx, 2
test ecx, ecx
je 0x413879
push 2
push 0xffffffffffffffff
mov edx, dword [ebp - 0x14]
push edx
call fcn.0040dc30
add esp, 0xc
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0xffffffff
jne 0x413806
cmp dword [0x4351ac], 0x83
je 0x413804
mov eax, dword [ebp - 0x14]
push eax
call fcn.00412c90
add esp, 4
or eax, 0xffffffff
jmp 0x4138c2
jmp 0x413879
mov byte [ebp - 0x30], 0
push 1
lea ecx, [ebp - 0x30]
push ecx
mov edx, dword [ebp - 0x14]
push edx
call fcn.00412f70
add esp, 0xc
test eax, eax
jne 0x41384f
movsx eax, byte [ebp - 0x30]
cmp eax, 0x1a
jne 0x41384f
mov ecx, dword [ebp - 0x3c]
push ecx
mov edx, dword [ebp - 0x14]
push edx
call fcn.00413910
add esp, 8
cmp eax, 0xffffffff
jne 0x41384f
mov eax, dword [ebp - 0x14]
push eax
call fcn.00412c90
add esp, 4
or eax, 0xffffffff
jmp 0x4138c2
push 0
push 0
mov ecx, dword [ebp - 0x14]
push ecx
call fcn.0040dc30
add esp, 0xc
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0xffffffff
jne 0x413879
mov edx, dword [ebp - 0x14]
push edx
call fcn.00412c90
add esp, 4
or eax, 0xffffffff
jmp 0x4138c2
movsx eax, byte [ebp - 0x38]
and eax, 0x48
test eax, eax
jne 0x4138bf
mov ecx, dword [ebp + 0xc]
and ecx, 8
test ecx, ecx
je 0x4138bf
mov edx, dword [ebp - 0x14]
sar edx, 5
mov eax, dword [ebp - 0x14]
and eax, 0x1f
mov ecx, dword [edx*4 + 0x436820]
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 + 0x436820]
mov byte [eax + ecx*8 + 4], dl
mov eax, dword [ebp - 0x14]
mov esp, ebp
pop ebp
ret