Function at 0x140083d60
Capabilities:
Get file size
Read file on windows

Disassembly:
mov qword [rsp + 8], rcx
push rbx
push rbp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x80
mov r12, qword [0x14013f500]
mov r14, rcx
mov rbx, rdx
mov rcx, r12
mov qword [rsp + 0x60], r12
call fcn.14002f9e0
mov rax, qword [0x14013b0f8]
or rbp, 0xffffffffffffffff
mov r15d, dword [rax + 0x13c]
xor r11b, r11b
xor dil, dil
btr r15d, 0x1f
mov byte [rsp + 0xd0], r11b
mov byte [rsp + 0xc8], dil
lea esi, [rbp + 0x11]
mov rax, rbx
movzx ecx, word [rax]
cmp cx, 0x20
je 0x140083dd2
cmp cx, 9
jne 0x140083dd8
add rax, 2
jmp 0x140083dc3
cmp word [rax], 0x2a
jne 0x140083fb1
movzx edi, word [rax + 2]
lea rbx, [rax + 2]
test edi, 0xffffff80
jne 0x140083e06
mov edx, 2
mov ecx, edi
call qword [sym.imp.MSVCR100.dll__isctype]
test eax, eax
je 0x140083e06
and edi, 0xffffffdf
movzx eax, di
cmp eax, 0x43
je 0x140083f85
cmp eax, 0x4d
je 0x140083eb0
cmp eax, 0x50
je 0x140083e3e
movzx edi, byte [rsp + 0xc8]
cmp eax, 0x54
jne 0x140083f90
mov byte [rsp + 0xd0], 1
jmp 0x140083f90
lea rcx, [rbx + 2]
call qword [sym.imp.MSVCR100.dll__wtoi]
movzx edx, word [rbx]
mov r15d, eax
test dx, dx
je 0x140083e93
nop word [rax + rax]
lea rcx, [0x140107c20]
mov eax, SafeArrayAllocDescriptor
nop dword [rax]
cmp dx, ax
je 0x140083f77
movzx eax, word [rcx + 2]
add rcx, 2
test ax, ax
jne 0x140083e70
movzx edx, word [rbx + 2]
add rbx, 2
test dx, dx
jne 0x140083e60
mov rax, qword [0x14013b0f8]
mov dl, 1
mov rcx, r14
mov dword [rax + 0x40], 0x57
call fcn.14005e3f0
jmp 0x1400844ff
lea rdi, [rbx + 2]
mov rax, rdi
movzx ecx, word [rax]
cmp cx, 0x20
je 0x140083ec6
cmp cx, 9
jne 0x140083ecc
add rax, 2
jmp 0x140083eb7
movzx ecx, word [rax]
test cx, cx
je 0x140083f0c
cmp cx, 0x2d
je 0x140083ee0
cmp cx, 0x2b
jne 0x140083ee4
add rax, 2
cmp word [rax], 0x30
jne 0x140083f0c
movzx ecx, word [rax + 2]
cmp cx, 0x78
je 0x140083efa
cmp cx, 0x58
jne 0x140083f0c
movzx ecx, word [rax + 4]
call qword [sym.imp.MSVCR100.dll_isxdigit]
test eax, eax
je 0x140083f0c
mov al, 1
jmp 0x140083f0e
xor al, al
mov r8d, 0xa
test al, al
mov rcx, rdi
cmovne r8d, esi
xor edx, edx
call qword [sym.imp.MSVCR100.dll__wcstoui64]
movzx r8d, word [rbx]
mov rbp, rax
test r8w, r8w
je 0x140083e93
nop word [rax + rax]
lea rdx, [0x140107c20]
mov ecx, SafeArrayAllocDescriptor
nop dword [rax]
cmp r8w, cx
je 0x140083f77
movzx ecx, word [rdx + 2]
add rdx, 2
test cx, cx
jne 0x140083f50
movzx r8d, word [rbx + 2]
add rbx, 2
test r8w, r8w
jne 0x140083f40
jmp 0x140083e93
movzx edi, byte [rsp + 0xc8]
add rbx, 0xfffffffffffffffe
jmp 0x140083f90
mov dil, 1
mov byte [rsp + 0xc8], dil
cmp word [rbx], 0
je 0x140083dc0
add rbx, 2
cmp word [rbx], 0
je 0x140083dc0
add rbx, 2
jmp 0x140083dc0
mov qword [rsp + 0x78], r13
xor r13d, r13d
xor r9d, r9d
mov qword [rsp + 0x30], r13
lea r8d, [r13 + 3]
mov edx, 0x80000000
mov rcx, rbx
mov dword [rsp + 0x28], 0x8000000
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x140084006
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [0x14013b0f8]
mov dl, 1
mov dword [rcx + 0x40], eax
mov rcx, r14
jmp 0x1400844f5
lea rdx, [rsp + 0xdc]
mov rcx, rsi
mov qword [rsp + 0xd8], r13
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, 0xffffffff
mov dword [rsp + 0xd8], eax
cmp eax, ecx
jne 0x14008403e
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x14008404c
mov ecx, 0xffffffff
mov rbx, qword [rsp + 0xd8]
cmp rbx, 0xffffffffffffffff
jne 0x14008406f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [0x14013b0f8]
mov dword [rcx + 0x40], eax
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov dl, 1
mov rcx, r14
jmp 0x1400844f5
cmp rbx, rbp
cmova rbx, rbp
cmp rbx, rcx
jbe 0x140084099
lea r9, [0x1401035ac]
lea rdx, str.Out_of_memory.
xor r8d, r8d
mov rcx, r14
call fcn.14005f3f0
jmp 0x1400844fa
test rbx, rbx
jne 0x1400840bc
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r11, qword [0x14013b0f8]
xor edx, edx
mov dword [r11 + 0x40], r13d
mov rcx, r14
jmp 0x1400844f5
test dil, dil
je 0x1400841bf
movzx eax, byte [r12 + 0x23]
test al, al
jne 0x1400840d8
mov rax, qword [r12 + 0x10]
movzx eax, byte [rax + 0x23]
cmp al, 2
je 0x1400841bf
mov rax, rbx
mov r8, rbx
mov bpl, 1
shr r8, 1
and eax, 1
xor edx, edx
movzx r9d, bpl
mov rcx, r12
add r8, rax
mov byte [rsp + 0x20], r13b
call fcn.1400e6e20
cmp eax, 1
jne 0x1400841f1
xor r8d, r8d
mov edx, eax
mov rcx, r12
call fcn.140001830
mov rdi, rax
test rax, rax
je 0x1400841f1
lea r9, [rsp + 0x40]
mov r8d, ebx
mov rdx, rdi
mov rcx, rsi
mov qword [rsp + 0x20], r13
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov r14d, eax
mov dword [rsp + 0xd8], eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [0x14013b0f8]
mov dword [rcx + 0x40], eax
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test r14d, r14d
je 0x140084577
cmp byte [rsp + 0xc8], r13b
jne 0x140084511
mov ecx, dword [rsp + 0x40]
cmp ecx, 3
jb 0x140084201
cmp byte [rdi], 0xef
jne 0x140084201
cmp byte [rdi + 1], 0xbb
jne 0x140084201
cmp byte [rdi + 2], 0xbf
jne 0x140084201
lea r8d, [rcx - 3]
lea rdx, [rdi + 3]
mov r9d, 0xfde9
mov rcx, r12
call fcn.1400e7c70
test eax, eax
jne 0x140084250
mov dword [rsp + 0xd8], r13d
jmp 0x140084250
lea rcx, [rbx + 2]
xor bpl, bpl
call qword [sym.imp.MSVCR100.dll_malloc]
mov rdi, rax
test rax, rax
jne 0x140084127
lea r9, [0x1401035ac]
lea rdx, str.Out_of_memory.
xor r8d, r8d
mov rcx, r14
call fcn.14005f3f0
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x1400844fa
cmp ecx, 2
jb 0x1400843a1
cmp byte [rdi], 0xff
jne 0x1400843a1
cmp byte [rdi + 1], 0xfe
jne 0x1400843a1
mov al, 1
mov rdx, rdi
test al, al
je 0x14008422d
lea rdx, [rdi + 2]
add ecx, 0xfffffffe
shr ecx, 1
mov r9b, 1
mov byte [rsp + 0x20], r13b
mov r8d, ecx
mov rcx, r12
call fcn.1400e6e20
test eax, eax
cmove r14d, r13d
mov dword [rsp + 0xd8], r14d
test rdi, rdi
je 0x14008425e
mov rcx, rdi
call qword [sym.imp.MSVCR100.dll_free]
xor r8d, r8d
mov rcx, r12
lea edx, [r8 + 1]
call fcn.140001830
movzx r11d, byte [rsp + 0xd0]
mov r14, rax
mov qword [rsp + 0x50], rax
test r11b, r11b
je 0x1400844c7
mov rcx, r12
call fcn.14002cff0
mov rbx, r13
mov r15d, 0xffffffff
mov rsi, r13
mov qword [rsp + 0x48], r13
mov rbp, rax
mov r12d, r15d
cmp word [r14], bx
je 0x1400844b4
cmp rax, 0x1388
jb 0x140084454
mov edi, r13d
nop
lea rdx, [0x140122ac8]
mov rcx, r14
call qword [sym.imp.MSVCR100.dll_wcsstr]
mov r15, rax
test rax, rax
je 0x140084395
inc edi
mov eax, 0xffffffff
mov dword [rsp + 0xd0], edi
add r12d, eax
mov rdi, r15
sub rdi, r14
sar rdi, 1
lea rax, [rdi + rbx]
mov qword [rsp + 0x58], rax
lea rcx, [rax + 1]
cmp rcx, qword [rsp + 0x48]
jb 0x140084358
mov edx, dword [rsp + 0xd0]
movsxd rcx, ecx
mov rax, r15
sub rax, qword [rsp + 0x50]
movsxd r9, ebp
mov r8d, r12d
sar rax, 1
cdqe
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rcx
or rcx, 0xffffffffffffffff
call fcn.1400e1330
mov rcx, rsi
lea rdx, [rax + rax]
mov qword [rsp + 0x48], rax
call qword [sym.imp.MSVCR100.dll_realloc]
test rax, rax
je 0x140084407
mov rsi, rax
test rdi, rdi
je 0x140084372
lea r8, [rdi + rdi]
lea rcx, [rsi + rbx*2]
mov rdx, r14
call sub.MSVCR100.dll_memcpy
mov rbx, qword [rsp + 0x58]
movzx eax, word [reloc.WSOCK32.dll_inet_addr]
mov edi, dword [rsp + 0xd0]
inc rbx
mov word [rsi + rbx*2 - 2], ax
lea r14, [r15 + 4]
test r12d, r12d
jne 0x1400842c0
test edi, edi
jne 0x1400843d6
mov rbx, rbp
jmp 0x1400844b7
xor al, al
cmp r15d, 0x4b0
je 0x14008421f
mov r8d, ecx
mov r9d, r15d
mov rdx, rdi
mov rcx, r12
call fcn.1400e7c70
test eax, eax
jne 0x140084250
mov dword [rsp + 0xd8], r13d
jmp 0x140084250
mov rdi, qword [rsp + 0x50]
mov rax, r14
sub rax, rdi
sar rax, 1
sub rbp, rax
je 0x140084434
lea r12, [rbx + rbp]
cmp r12, qword [rsp + 0x48]
jb 0x140084420
lea rdx, [r12 + r12 + 2]
mov rcx, rsi
call qword [sym.imp.MSVCR100.dll_realloc]
test rax, rax
jne 0x14008441d
test rsi, rsi
je 0x140084415
mov rcx, rsi
call qword [sym.imp.MSVCR100.dll_free]
mov rbx, r13
jmp 0x1400844b7
mov rsi, rax
lea r8, [rbp + rbp]
lea rcx, [rsi + rbx*2]
mov rdx, r14
call sub.MSVCR100.dll_memcpy
mov rbx, r12
lea r8, [rbx + rbx + 2]
mov rdx, rsi
mov rcx, rdi
mov word [rsi + rbx*2], r13w
call sub.MSVCR100.dll_memcpy
mov rcx, rsi
call qword [sym.imp.MSVCR100.dll_free]
jmp 0x1400844b7
mov rdi, r14
nop word [rax + rax]
lea rdx, [0x140122ac8]
mov rcx, rdi
call qword [sym.imp.MSVCR100.dll_wcsstr]
mov rbx, rax
test rax, rax
je 0x1400844af
mov rcx, rax
lea rdi, [rax + 2]
mov r8, rbp
sub rcx, r14
lea rdx, [rax + 4]
sar rcx, 1
sub r8, rcx
mov rcx, rdi
lea r8, [r8 + r8 - 2]
call qword [sym.imp.MSVCR100.dll_memmove]
movzx eax, word [reloc.WSOCK32.dll_inet_addr]
dec rbp
add r12d, r15d
mov word [rbx], ax
jne 0x140084460
mov rbx, rbp
jmp 0x1400844b7
mov rbx, rax
mov r12, qword [rsp + 0x60]
mov rdx, rbx
mov rcx, r12
call fcn.14002fd90
mov r14d, dword [rsp + 0xd8]
movzx edx, byte [rsp + 0xc8]
mov rcx, r12
call fcn.14002fe60
test eax, eax
je 0x1400841fa
test r14d, r14d
sete dl
mov rcx, qword [rsp + 0xc0]
call fcn.14005e3f0
mov r13, qword [rsp + 0x78]
add rsp, 0x80
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
movzx eax, byte [r12 + 0x23]
test al, al
jne 0x140084524
mov rax, qword [r12 + 0x10]
movzx eax, byte [rax + 0x23]
cmp al, 2
jne 0x140084551
mov edx, dword [rsp + 0x40]
mov rcx, rdi
call fcn.1400e6c00
mov rcx, rdi
cmp eax, 1
sete r13b
call qword [sym.imp.MSVCR100.dll_free]
test r13d, r13d
je 0x1400841fa
xor edx, edx
jmp 0x1400844ed
mov ecx, dword [rsp + 0x40]
test cl, 1
je 0x140084560
mov byte [rcx + rdi], r13b
inc ecx
mov ebx, ecx
mov word [rcx + rdi], r13w
mov rcx, r12
call fcn.14002cfb0
mov qword [rax], rbx
jmp 0x1400844cf
mov rcx, r12
mov word [rdi], r13w
call fcn.14002cfb0
mov qword [rax], r13
test bpl, bpl
jne 0x1400844cf
mov rcx, rdi
call qword [sym.imp.MSVCR100.dll_free]
jmp 0x1400844cf