Function at 0x406140
Capabilities:
Read file on windows

Disassembly:
mov eax, 0x30098
call fcn.00409d40
sub rsp, rax
mov rax, qword [0x0040f310]
mov qword [rsp + 0x30060], rax
mov qword [rsp + 0x300b8], rbp
mov qword [rsp + 0x30088], rdi
mov qword [rsp + 0x30080], r12
mov qword [rsp + 0x30078], r13
mov r13, rdx
lea rdx, [rsp + 0x20]
mov ebp, ecx
lea rdi, [rsp + 0x20]
call fcn.00405f70
cmp eax, 0xffffffff
mov r12d, eax
je 0x4061f5
movzx eax, byte [rsp + 0x32]
movzx edx, byte [rsp + 0x33]
movzx ecx, byte [rsp + 0x2f]
shl ecx, 8
shl edx, 8
xor r8d, r8d
or edx, eax
movzx eax, byte [rsp + 0x31]
shl edx, 8
or edx, eax
movzx eax, byte [rsp + 0x30]
shl edx, 8
or edx, eax
movzx eax, byte [rsp + 0x2e]
or ecx, eax
movzx eax, byte [rsp + 0x2d]
shl ecx, 8
or ecx, eax
movzx eax, byte [rsp + 0x2c]
shl ecx, 8
or ecx, eax
add ecx, edx
sub r12d, ecx
mov ecx, ebp
add edx, r12d
call qword [sym.imp.msvcrt.dll__lseek]
test eax, eax
jns 0x4061ff
mov eax, 0xffffffff
jmp 0x4063bd
mov qword [rsp + 0x30090], rsi
mov qword [rsp + 0x30070], r14
mov r14d, 0x400
lea rdx, [rsp + 0x20]
mov ecx, ebp
mov r8d, r14d
call qword [sym.imp.msvcrt.dll__read]
test eax, eax
mov esi, eax
jns 0x406235
mov eax, 0xffffffff
jmp 0x4063ad
movzx eax, byte [rsp + 0x22]
movzx ecx, byte [rsp + 0x23]
mov qword [rsp + 0x300b0], rbx
shl ecx, 8
or ecx, eax
movzx eax, byte [rsp + 0x21]
shl ecx, 8
or ecx, eax
movzx eax, byte [rsp + 0x20]
shl ecx, 8
or ecx, eax
cmp ecx, 0x2014b50
jne 0x4063a0
nop
cmp esi, 0x2e
jge 0x4062a5
movsxd rbx, esi
lea rcx, [rsp + 0x20]
mov rdx, rdi
mov r8, rbx
call sub.msvcrt.dll_memmove
lea rdx, [rsp + rbx + 0x20]
mov r8d, r14d
mov ecx, ebp
mov rdi, rax
call qword [sym.imp.msvcrt.dll__read]
test eax, eax
jle 0x4063a0
add esi, eax
movzx eax, byte [rdi + 0x20]
movzx edx, byte [rdi + 0x21]
movzx ecx, byte [rdi + 0x1f]
shl ecx, 8
shl edx, 8
or edx, eax
movzx eax, byte [rdi + 0x1e]
or ecx, eax
movzx eax, byte [rdi + 0x1c]
add edx, ecx
movzx ecx, byte [rdi + 0x1d]
shl ecx, 8
or ecx, eax
lea ebx, [rdx + rcx + 0x2e]
lea eax, [rbx + 4]
cmp esi, eax
jge 0x406321
lea rax, [rsp + 0x20]
cmp rdi, rax
je 0x4062f6
lea rcx, [rsp + 0x20]
movsxd r8, esi
mov rdx, rdi
call sub.msvcrt.dll_memmove
mov rdi, rax
mov r8d, ebx
movsxd rax, esi
mov ecx, ebp
sub r8d, esi
lea rdx, [rsp + rax + 0x20]
add r8d, 4
cmp r8d, r14d
cmovl r8d, r14d
call qword [sym.imp.msvcrt.dll__read]
test eax, eax
jle 0x4063a0
add esi, eax
movzx ecx, byte [rdi + 0x1d]
movzx eax, byte [rdi + 0x1c]
shl ecx, 8
or ecx, eax
cmp ecx, 0x14
jne 0x406366
mov rcx, qword [str.META_INF_MANIFEST.MF]
mov rdx, qword [rdi + 0x2e]
cmp rdx, qword [rcx]
jne 0x406359
mov rdx, qword [rdi + 0x36]
cmp rdx, qword [rcx + 8]
jne 0x406359
mov edx, dword [rdi + 0x3e]
cmp edx, dword [rcx + 0x10]
jne 0x406359
xor eax, eax
jmp 0x40635e
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4063f2
movsxd rcx, ebx
sub esi, ebx
lea rax, [rcx + rcx*2]
prefetcht1 byte [rdi + rax*2]
add rdi, rcx
movzx eax, byte [rdi + 2]
movzx ecx, byte [rdi + 3]
shl ecx, 8
or ecx, eax
movzx eax, byte [rdi + 1]
shl ecx, 8
or ecx, eax
movzx eax, byte [rdi]
shl ecx, 8
or ecx, eax
cmp ecx, 0x2014b50
je 0x406270
mov eax, 0xffffffff
mov rbx, qword [rsp + 0x300b0]
mov rsi, qword [rsp + 0x30090]
mov r14, qword [rsp + 0x30070]
mov r13, qword [rsp + 0x30078]
mov r12, qword [rsp + 0x30080]
mov rdi, qword [rsp + 0x30088]
mov rbp, qword [rsp + 0x300b8]
mov rcx, qword [rsp + 0x30060]
call fcn.00409d10
add rsp, 0x30098
ret
movzx eax, byte [rdi + 0x1a]
movzx ecx, byte [rdi + 0x1b]
shl ecx, 8
or ecx, eax
movzx eax, byte [rdi + 0x19]
shl ecx, 8
or ecx, eax
movzx eax, byte [rdi + 0x18]
shl ecx, 8
movsxd rcx, ecx
or rcx, rax
mov qword [r13], rcx
movzx eax, byte [rdi + 0x16]
movzx ecx, byte [rdi + 0x17]
shl ecx, 8
or ecx, eax
movzx eax, byte [rdi + 0x15]
shl ecx, 8
or ecx, eax
movzx eax, byte [rdi + 0x14]
shl ecx, 8
movsxd rcx, ecx
or rcx, rax
mov qword [r13 + 8], rcx
movzx eax, byte [rdi + 0x2c]
movzx r8d, byte [rdi + 0x2d]
movzx edx, byte [rdi + 0x1f]
movzx ecx, byte [rdi + 0x1d]
shl r8d, 8
or r8d, eax
movzx eax, byte [rdi + 0x2b]
shl ecx, 8
shl r8d, 8
shl edx, 8
or r8d, eax
movzx eax, byte [rdi + 0x2a]
shl r8d, 8
or r8d, eax
movzx eax, byte [rdi + 0x1e]
or edx, eax
movzx eax, byte [rdi + 0x1c]
or ecx, eax
add edx, r12d
add edx, r8d
lea eax, [rcx + rdx + 0x1e]
mov dword [r13 + 0x10], eax
movzx eax, byte [rdi + 0xa]
movzx ecx, byte [rdi + 0xb]
shl ecx, 8
or ecx, eax
xor eax, eax
mov dword [r13 + 0x14], ecx
jmp 0x4063a5