Function at 0x14003d970
Capabilities:
Read file on windows

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x8080]
mov eax, 0x8180
call fcn.140096530
sub rsp, rax
mov qword [rbp - 0x40], 0xfffffffffffffffe
mov qword [rsp + 0x81d0], rbx
mov rax, qword [0x1400f4d50]
xor rax, rsp
mov qword [rbp + 0x8070], rax
mov rbx, rdx
mov r14, rcx
mov qword [rsp + 0x68], rcx
mov qword [rbp - 0x48], rcx
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
cmp qword [rbx + 0x18], 8
jb 0x14003d9d2
mov rbx, qword [rbx]
xor r12d, r12d
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r12 + 1]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x14003da1c
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 0x80004005
jmp 0x14003e1d9
mov r15, r12
mov qword [rsp + 0x48], r12
mov rdi, r12
mov qword [rsp + 0x50], r12
mov rbx, r12
mov qword [rsp + 0x58], rbx
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x44]
mov r8d, 0x8000
lea rdx, [rbp + 0x70]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14003dab5
movzx ebx, byte [rsp + 0x40]
nop word [rax + rax]
mov eax, dword [rsp + 0x44]
test eax, eax
je 0x14003daab
shr rax, 1
lea r9, [rbp + rax*2 + 0x70]
mov byte [rsp + 0x20], bl
lea r8, [rbp + 0x70]
mov rdx, rdi
lea rcx, [rsp + 0x48]
call fcn.14003c710
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x44]
mov r8d, 0x8000
lea rdx, [rbp + 0x70]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rdi, qword [rsp + 0x50]
test eax, eax
jne 0x14003da60
mov r15, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x58]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [rsp + 0x70], eax
test eax, eax
jne 0x14003e1c0
cmp dword [rsp + 0x44], eax
jne 0x14003e1c0
mov word [rsp + 0x40], r12w
lea rax, [rsp + 0x40]
cmp rax, rdi
jae 0x14003db92
lea rax, [rsp + 0x40]
cmp r15, rax
ja 0x14003db92
lea rsi, [rsp + 0x40]
sub rsi, r15
sar rsi, 1
cmp rdi, rbx
jne 0x14003db7f
mov rax, rdi
sub rax, r15
sar rax, 1
movabs rcx, 0x7ffffffffffffffe
cmp rax, rcx
jbe 0x14003db33
lea rcx, str.vector_T__too_long
call fcn.140075718
int3
inc rax
sub rbx, r15
sar rbx, 1
cmp rax, rbx
jbe 0x14003db7f
mov rdx, rbx
shr rdx, 1
movabs rcx, 0x7fffffffffffffff
sub rcx, rdx
cmp rcx, rbx
jae 0x14003db5e
mov rbx, r12
jmp 0x14003db61
add rbx, rdx
cmp rbx, rax
cmovb rbx, rax
mov rdx, rbx
lea rcx, [rsp + 0x48]
call fcn.14003bb20
mov rdi, qword [rsp + 0x50]
mov r15, qword [rsp + 0x48]
test rdi, rdi
je 0x14003dc11
movzx eax, word [r15 + rsi*2]
mov word [rdi], ax
jmp 0x14003dc11
cmp rdi, rbx
jne 0x14003dc08
mov rax, rdi
sub rax, r15
sar rax, 1
movabs rcx, 0x7ffffffffffffffe
cmp rax, rcx
jbe 0x14003dbbc
lea rcx, str.vector_T__too_long
call fcn.140075718
int3
inc rax
sub rbx, r15
sar rbx, 1
cmp rax, rbx
jbe 0x14003dc08
mov rdx, rbx
shr rdx, 1
movabs rcx, 0x7fffffffffffffff
sub rcx, rdx
cmp rcx, rbx
jae 0x14003dbe7
mov rbx, r12
jmp 0x14003dbea
add rbx, rdx
cmp rbx, rax
cmovb rbx, rax
mov rdx, rbx
lea rcx, [rsp + 0x48]
call fcn.14003bb20
mov rdi, qword [rsp + 0x50]
mov r15, qword [rsp + 0x48]
test rdi, rdi
je 0x14003dc11
mov word [rdi], r12w
add rdi, 2
mov qword [rsp + 0x50], rdi
mov qword [rbp - 0x58], r12
mov ecx, 0x38
call fcn.140095cd8
test rax, rax
je 0x14003e190
mov qword [rbp - 0x60], rax
mov qword [rax], rax
mov qword [rax + 8], rax
lea rdx, [r15 + 2]
mov qword [rbp - 0x20], 7
mov qword [rbp - 0x28], r12
mov word [rbp - 0x38], r12w
movzx r9d, byte [rsp + 0x40]
mov r8, rdi
lea rcx, [rbp - 0x38]
call fcn.14003bec0
nop
lea r8, [0x1400c1654]
lea rdx, [rbp - 0x60]
lea rcx, [rbp - 0x38]
call fcn.14003cfc0
mov rsi, qword [rbp - 0x60]
cmp qword [rbp - 0x58], 0
je 0x14003e105
mov rcx, qword [rsi]
add rcx, 0x10
mov qword [rsp + 0x20], 0x18
lea r9, str.PDHOME_TRANSLATION_FILE
mov r8, qword [rcx + 0x10]
xor edx, edx
call fcn.14000d700
test eax, eax
je 0x14003dcd7
mov rcx, qword [rsi]
add rcx, 0x10
mov qword [rsp + 0x20], reloc.WS2_32.dll_socket
lea r9, [0x1400c15f0]
mov r8, qword [rcx + 0x10]
xor edx, edx
call fcn.14000d700
test eax, eax
jne 0x14003e105
mov rbx, qword [rsi]
mov rbx, qword [rbx]
cmp rbx, rsi
je 0x14003e08e
movabs rdi, 0x6666666666666667
mov qword [rsp + 0x78], r12
mov qword [rbp - 0x80], r12
mov qword [rbp - 0x78], r12
lea rcx, [rbx + 0x10]
lea r8, [0x1400c15ec]
lea rdx, [rsp + 0x78]
call fcn.14001cf70
mov r13, qword [rbp - 0x80]
mov rcx, r13
mov r12, qword [rsp + 0x78]
sub rcx, r12
mov rax, rdi
imul rcx
sar rdx, 4
mov rax, rdx
shr rax, 0x3f
add rdx, rax
cmp rdx, 3
jne 0x14003dfb9
mov rdx, r12
lea rcx, [rbp - 0x10]
call fcn.14003c880
nop
mov rdx, rax
mov rcx, r12
call fcn.140002c40
nop
cmp qword [rbp + 8], 8
jb 0x14003dd68
mov rcx, qword [rbp - 0x10]
call fcn.140095520
lea rdx, [r12 + 0x28]
lea rcx, [rbp - 0x10]
call fcn.14003c880
nop
mov rdx, rax
lea rcx, [r12 + 0x28]
call fcn.140002c40
nop
cmp qword [rbp + 8], 8
jb 0x14003dd95
mov rcx, qword [rbp - 0x10]
call fcn.140095520
lea rdx, str.__t_r_n
mov rcx, r12
call fcn.14003ba40
lea rdx, str.__t_r_n
lea rcx, [r12 + 0x28]
call fcn.14003ba40
lea rdx, str.__t_r_n
lea rcx, [r12 + 0x50]
call fcn.14003ba40
lea rdx, str.__t_r_n
mov rcx, r12
call fcn.14003b910
lea rdx, str.__t_r_n
lea rcx, [r12 + 0x28]
call fcn.14003b910
lea rdx, str.__t_r_n
lea rcx, [r12 + 0x50]
call fcn.14003b910
mov r9, qword [r12 + 0x10]
add r9, 0xfffffffffffffffe
mov r8d, 1
lea rdx, [rbp - 0x10]
mov rcx, r12
call fcn.14003c480
nop
mov rdx, rax
mov rcx, r12
call fcn.140002c40
nop
cmp qword [rbp + 8], 8
jb 0x14003de2f
mov rcx, qword [rbp - 0x10]
call fcn.140095520
mov r9, qword [r12 + 0x38]
add r9, 0xfffffffffffffffe
mov r8d, 1
lea rdx, [rbp - 0x10]
lea rcx, [r12 + 0x28]
call fcn.14003c480
nop
mov rdx, rax
lea rcx, [r12 + 0x28]
call fcn.140002c40
nop
cmp qword [rbp + 8], 8
jb 0x14003de6b
mov rcx, qword [rbp - 0x10]
call fcn.140095520
mov r9, qword [r12 + 0x60]
add r9, 0xfffffffffffffffe
mov r8d, 1
lea rdx, [rbp - 0x10]
lea rcx, [r12 + 0x50]
call fcn.14003c480
nop
mov rdx, rax
lea rcx, [r12 + 0x50]
call fcn.140002c40
nop
cmp qword [rbp + 8], 8
jb 0x14003dea7
mov rcx, qword [rbp - 0x10]
call fcn.140095520
mov qword [rbp + 0x38], reloc.WS2_32.dll_ntohs
xor eax, eax
mov qword [rbp + 0x30], rax
mov byte [rbp + 0x20], al
mov qword [rbp + 0x60], reloc.WS2_32.dll_ntohs
mov qword [rbp + 0x58], rax
mov byte [rbp + 0x48], al
xor r8d, r8d
lea rdx, [rbp + 0x20]
mov rcx, r12
call fcn.14003cba0
test eax, eax
jne 0x14003df17
xor r8d, r8d
lea rdx, [rbp + 0x48]
lea rcx, [r12 + 0x50]
call fcn.14003cba0
mov r14, qword [rsp + 0x68]
test eax, eax
jne 0x14003df1c
lea rcx, [r14 + 0x28]
lea rdx, [rbp + 0x20]
call fcn.14003d7b0
or r9, 0xffffffffffffffff
xor r8d, r8d
lea rdx, [r12 + 0x28]
mov rcx, rax
call fcn.1400023e0
jmp 0x14003df1c
mov r14, qword [rsp + 0x68]
cmp qword [rbp + 0x60], 0x10
jb 0x14003df2c
mov rcx, qword [rbp + 0x48]
call fcn.140095520
mov qword [rbp + 0x60], reloc.WS2_32.dll_ntohs
xor eax, eax
mov qword [rbp + 0x58], rax
mov byte [rbp + 0x48], al
cmp qword [rbp + 0x38], 0x10
jb 0x14003df4f
mov rcx, qword [rbp + 0x20]
call fcn.140095520
xor eax, eax
mov qword [rbp + 0x38], reloc.WS2_32.dll_ntohs
mov qword [rbp + 0x30], rax
mov byte [rbp + 0x20], 0
mov rdi, r12
cmp r12, r13
je 0x14003df90
cmp qword [rdi + 0x18], 8
jb 0x14003df78
mov rcx, qword [rdi]
call fcn.140095520
xor eax, eax
mov qword [rdi + 0x18], 7
mov qword [rdi + 0x10], rax
mov word [rdi], ax
add rdi, 0x28
cmp rdi, r13
jne 0x14003df67
mov rcx, r12
call fcn.140095520
mov rbx, qword [rbx]
cmp rbx, rsi
movabs rdi, 0x6666666666666667
mov r12d, 0
jne 0x14003dcf0
jmp 0x14003e08e
test r12, r12
je 0x14003dffa
mov rbx, r12
cmp r12, r13
je 0x14003dff1
xor eax, eax
cmp qword [rbx + 0x18], 8
jb 0x14003dfd9
mov rcx, qword [rbx]
call fcn.140095520
xor eax, eax
mov qword [rbx + 0x18], 7
mov qword [rbx + 0x10], rax
mov word [rbx], ax
add rbx, 0x28
cmp rbx, r13
jne 0x14003dfc8
mov rcx, r12
call fcn.140095520
nop
cmp qword [rbp - 0x20], 8
jb 0x14003e00a
mov rcx, qword [rbp - 0x38]
call fcn.140095520
mov qword [rbp - 0x20], 7
xor r12d, r12d
mov qword [rbp - 0x28], r12
mov word [rbp - 0x38], r12w
mov rbx, qword [rsi]
mov qword [rsi], rsi
mov qword [rsi + 8], rsi
cmp rbx, rsi
je 0x14003e064
nop dword [rax]
mov rdi, qword [rbx]
cmp qword [rbx + 0x28], 8
jb 0x14003e043
mov rcx, qword [rbx + 0x10]
call fcn.140095520
mov qword [rbx + 0x28], 7
mov qword [rbx + 0x20], r12
mov word [rbx + 0x10], r12w
mov rcx, rbx
call fcn.140095520
mov rbx, rdi
cmp rdi, rsi
jne 0x14003e030
mov rcx, rsi
call fcn.140095520
nop
test r15, r15
je 0x14003e07b
mov rcx, r15
call fcn.140095520
nop
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 0x80004005
jmp 0x14003e1d9
cmp qword [rbp - 0x20], 8
jb 0x14003e09e
mov rcx, qword [rbp - 0x38]
call fcn.140095520
mov qword [rbp - 0x20], 7
mov qword [rbp - 0x28], r12
mov word [rbp - 0x38], r12w
mov rbx, qword [rsi]
mov qword [rsi], rsi
mov qword [rsi + 8], rsi
cmp rbx, rsi
je 0x14003e0f4
nop
mov rdi, qword [rbx]
cmp qword [rbx + 0x28], 8
jb 0x14003e0d3
mov rcx, qword [rbx + 0x10]
call fcn.140095520
mov qword [rbx + 0x28], 7
mov qword [rbx + 0x20], r12
mov word [rbx + 0x10], r12w
mov rcx, rbx
call fcn.140095520
mov rbx, rdi
cmp rdi, rsi
jne 0x14003e0c0
mov rcx, rsi
call fcn.140095520
mov esi, dword [rsp + 0x70]
jmp 0x14003e1c0
cmp qword [rbp - 0x20], 8
jb 0x14003e115
mov rcx, qword [rbp - 0x38]
call fcn.140095520
mov qword [rbp - 0x20], 7
mov qword [rbp - 0x28], r12
mov word [rbp - 0x38], r12w
mov rbx, qword [rsi]
mov qword [rsi], rsi
mov qword [rsi + 8], rsi
cmp rbx, rsi
je 0x14003e169
mov rdi, qword [rbx]
cmp qword [rbx + 0x28], 8
jb 0x14003e148
mov rcx, qword [rbx + 0x10]
call fcn.140095520
mov qword [rbx + 0x28], 7
mov qword [rbx + 0x20], r12
mov word [rbx + 0x10], r12w
mov rcx, rbx
call fcn.140095520
mov rbx, rdi
cmp rdi, rsi
jne 0x14003e135
mov rcx, rsi
call fcn.140095520
nop
test r15, r15
je 0x14003e180
mov rcx, r15
call fcn.140095520
nop
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 0x80004005
jmp 0x14003e1d9
mov qword [rbp - 0x68], r12
lea rdx, [rbp - 0x68]
lea rcx, [rsp + 0x78]
call fcn.140095a74
lea r11, vtable.std::bad_alloc.0
mov qword [rsp + 0x78], r11
lea rdx, [0x1400ef048]
lea rcx, [rsp + 0x78]
call fcn.140095d7c
nop
test r15, r15
je 0x14003e1ce
mov rcx, r15
call fcn.140095520
nop
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, esi
mov rcx, qword [rbp + 0x8070]
xor rcx, rsp
call fcn.1400959a0
mov rbx, qword [rsp + 0x81d0]
add rsp, 0x8180
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret