Function at 0x1400a5bc0
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x2988]
mov eax, 0x2a88
call fcn.1401d0dc0
sub rsp, rax
mov rax, qword [0x140263a80]
xor rax, rsp
mov qword [rbp + 0x2970], rax
movzx eax, byte [r8]
mov rdi, r9
mov rbx, r8
mov rsi, rdx
mov r13, rcx
cmp eax, 0x10
ja case.0x1400a5c1d.10
lea rdx, [0x140000000]
mov ecx, dword [rdx + rax*4 + 0xa6468]
add rcx, rdx
jmp rcx
mov r8d, dword [0x140263af0]
test rsi, rsi
jne 0x1400a5c39
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], reloc.WLDAP32.dll_Ordinal_22
jmp 0x1400a5c5c
cmp r8, 2
jb 0x1400a5c46
mov word [rsi], 7
jmp 0x1400a5c62
xor edx, edx
mov rcx, rsi
call sub.VCRUNTIME140.dll_memset
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], Ordinal_35
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo]
mov r15, qword [0x140268120]
mov ebx, dword [0x140263af0]
add r15, 0x50
mov rdi, qword [0x140263af8]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor r14d, r14d
lea r9, [rsp + 0x50]
mov qword [rsp + 0x20], r14
mov r8d, ebx
mov rdx, rsi
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1400a5ca9
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp case.0x1400a5c1d.10
mov ecx, dword [r8 + 2]
call qword [sym.imp.WS2_32.dll_ntohl]
xor r14d, r14d
mov qword [rsp + 0x50], r14
lea edi, [rax + 1]
lea rax, [rbx + 1]
test rax, rax
je 0x1400a5cdd
mov eax, dword [rax]
mov dword [rsp + 0x50], eax
jmp 0x1400a5cef
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], reloc.WLDAP32.dll_Ordinal_22
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo]
mov ebx, dword [0x140263af0]
mov dword [rsp + 0x54], edi
lea edi, [rbx - 6]
cmp edi, 8
jb case.0x1400a5c1d.10
mov r8d, ebx
test rsi, rsi
jne 0x1400a5d38
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], reloc.WLDAP32.dll_Ordinal_22
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo]
lea rcx, [rsi + 2]
mov rax, rcx
lea r8d, [rbx - 2]
cmp r8, 4
jb 0x1400a5d7f
mov dword [rcx], 8
jmp 0x1400a5d9b
cmp r8, 2
jb 0x1400a5d45
mov word [rsi], 6
jmp 0x1400a5d61
xor edx, edx
mov rcx, rsi
call sub.VCRUNTIME140.dll_memset
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], Ordinal_35
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo]
lea rcx, [rsi + 2]
lea r8d, [rbx - 2]
mov rax, rcx
test rcx, rcx
jne 0x1400a5d2a
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], reloc.WLDAP32.dll_Ordinal_22
jmp 0x1400a5d95
xor edx, edx
mov rcx, rax
call sub.VCRUNTIME140.dll_memset
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], Ordinal_35
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo]
lea rcx, [rsi + 6]
mov r8d, edi
test rcx, rcx
jne 0x1400a5db5
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], reloc.WLDAP32.dll_Ordinal_22
jmp 0x1400a5dd8
cmp r8, 8
jb 0x1400a5dc5
mov rax, qword [rsp + 0x50]
mov qword [rcx], rax
jmp 0x1400a5dde
xor edx, edx
call sub.VCRUNTIME140.dll_memset
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], Ordinal_35
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo]
mov r15, qword [0x140268120]
mov ebx, dword [0x140263af0]
add r15, 0x50
mov rdi, qword [0x140263af8]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
jmp 0x1400a5c86
mov ebx, dword [0x140263af0]
xor r14d, r14d
movzx r12d, byte [r8 + 2]
mov dword [rsp + 0x40], r14d
lea r15d, [rbx - 6]
cmp r15d, 1
jb 0x1400a5f6e
mov r8d, ebx
test rsi, rsi
jne 0x1400a5e58
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], reloc.WLDAP32.dll_Ordinal_22
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo]
lea rcx, [rsi + 2]
mov rax, rcx
lea r8d, [rbx - 2]
cmp r8, 4
jb 0x1400a5e9f
mov dword [rcx], 1
jmp 0x1400a5ebb
cmp r8, 2
jb 0x1400a5e65
mov word [rsi], recv
jmp 0x1400a5e81
xor edx, edx
mov rcx, rsi
call sub.VCRUNTIME140.dll_memset
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], Ordinal_35
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo]
lea rcx, [rsi + 2]
lea r8d, [rbx - 2]
mov rax, rcx
test rcx, rcx
jne 0x1400a5e4a
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], reloc.WLDAP32.dll_Ordinal_22
jmp 0x1400a5eb5
xor edx, edx
mov rcx, rax
call sub.VCRUNTIME140.dll_memset
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], Ordinal_35
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo]
lea rcx, [rsi + 6]
mov r8d, r15d
test rcx, rcx
jne 0x1400a5ed5
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], reloc.WLDAP32.dll_Ordinal_22
jmp 0x1400a5ef3
cmp r8, 1
jb 0x1400a5ee0
mov byte [rcx], r12b
jmp 0x1400a5ef9
xor edx, edx
call sub.VCRUNTIME140.dll_memset
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], Ordinal_35
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo]
mov r15, qword [0x140268120]
mov ebx, dword [0x140263af0]
add r15, 0x50
mov r12, qword [0x140263af8]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea r9, [rsp + 0x50]
mov qword [rsp + 0x20], r14
mov r8d, ebx
mov rdx, rsi
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1400a5f3f
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x1400a5f60
test rdi, rdi
je 0x1400a5f60
lea r9, [rsp + 0x40]
mov qword [rsp + 0x20], r14
mov r8d, 0x19000
mov rdx, rdi
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov r14d, dword [rsp + 0x40]
test r14d, r14d
je case.0x1400a5c1d.10
mov rcx, qword [r13 + 0x10]
lea r9, [rsp + 0x44]
mov r8d, r14d
mov rdx, rdi
mov rax, qword [rcx]
call qword [rax]
cmp eax, 0xffffffff
je case.0x1400a5c1d.7
jmp case.0x1400a5c1d.10
mov ecx, dword [r8 + 2]
call qword [sym.imp.WS2_32.dll_ntohl]
xor r14d, r14d
mov qword [rsp + 0x50], r14
lea edi, [rax + 1]
lea rax, [rbx + 1]
test rax, rax
je 0x1400a5fbf
mov eax, dword [rax]
mov dword [rsp + 0x50], eax
jmp 0x1400a5fd1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], reloc.WLDAP32.dll_Ordinal_22
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo]
mov ebx, dword [0x140263af0]
mov dword [rsp + 0x54], edi
lea edi, [rbx - 6]
cmp edi, 8
jb case.0x1400a5c1d.10
mov r8d, ebx
test rsi, rsi
je 0x1400a5d0d
cmp r8, 2
jb 0x1400a5d45
mov word [rsi], 9
jmp 0x1400a5d61
xor r14d, r14d
lea rax, [r8 + 1]
mov qword [rsp + 0x50], r14
test rax, rax
je 0x1400a6020
mov eax, dword [rax]
mov dword [rsp + 0x50], eax
jmp 0x1400a6032
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], reloc.WLDAP32.dll_Ordinal_22
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo]
mov ebx, dword [0x140263af0]
mov dword [rsp + 0x54], 1
lea edi, [rbx - 6]
cmp edi, 8
jb case.0x1400a5c1d.10
mov r8d, ebx
test rsi, rsi
jne 0x1400a5ff3
jmp 0x1400a5d0d
mov r8d, dword [0x140263af0]
xor r14d, r14d
mov dword [rsp + 0x40], r14d
test rsi, rsi
jne 0x1400a607b
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], reloc.WLDAP32.dll_Ordinal_22
jmp 0x1400a609e
cmp r8, 2
jb 0x1400a6088
mov word [rsi], ntohl
jmp 0x1400a60a4
xor edx, edx
mov rcx, rsi
call sub.VCRUNTIME140.dll_memset
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], Ordinal_35
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo]
mov r15, qword [0x140268120]
mov ebx, dword [0x140263af0]
add r15, 0x50
mov r12, qword [0x140263af8]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea r9, [rsp + 0x50]
mov qword [rsp + 0x20], r14
mov r8d, ebx
mov rdx, rsi
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1400a60ea
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x1400a610b
test rdi, rdi
je 0x1400a610b
lea r9, [rsp + 0x40]
mov qword [rsp + 0x20], r14
mov r8d, 0x19000
mov rdx, rdi
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [r13 + 0x10]
lea r9, [rsp + 0x44]
mov r8d, dword [rsp + 0x40]
mov rax, qword [rcx]
mov r10, qword [rax]
test r8d, r8d
je 0x1400a6141
mov rdx, rdi
call r10
cmp eax, 0xffffffff
je case.0x1400a5c1d.7
jmp case.0x1400a5c1d.10
xor r8d, r8d
lea rdx, [rsp + 0x40]
call r10
cmp eax, 0xffffffff
je case.0x1400a5c1d.7
jmp case.0x1400a5c1d.10
mov ecx, dword [r8 + 1]
call qword [sym.imp.WS2_32.dll_ntohl]
mov ecx, dword [rbx + 5]
mov edi, eax
call qword [sym.imp.WS2_32.dll_ntohl]
xor edx, edx
lea rcx, [rsp + 0x60]
mov r8d, 0x208
lea ebx, [rax + 1]
call sub.VCRUNTIME140.dll_memset
mov eax, dword [rbp + 0x29f0]
xor r14d, r14d
mov dword [rsp + 0x54], ebx
mov ebx, dword [0x140263af0]
mov dword [rsp + 0x50], edi
mov dword [rsp + 0x58], eax
mov eax, dword [rbp + 0x29f8]
lea edi, [rbx - 6]
mov dword [rsp + 0x5c], eax
mov dword [rsp + 0x40], r14d
cmp edi, 0x10
jb 0x1400a6300
mov r8d, ebx
test rsi, rsi
jne 0x1400a61ed
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], reloc.WLDAP32.dll_Ordinal_22
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo]
lea rcx, [rsi + 2]
mov rax, rcx
lea r8d, [rbx - 2]
cmp r8, 4
jb 0x1400a6234
mov dword [rcx], reloc.WS2_32.dll_recv
jmp 0x1400a6250
cmp r8, 2
jb 0x1400a61fa
mov word [rsi], 0xa
jmp 0x1400a6216
xor edx, edx
mov rcx, rsi
call sub.VCRUNTIME140.dll_memset
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], Ordinal_35
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo]
lea rcx, [rsi + 2]
lea r8d, [rbx - 2]
mov rax, rcx
test rcx, rcx
jne 0x1400a61df
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], reloc.WLDAP32.dll_Ordinal_22
jmp 0x1400a624a
xor edx, edx
mov rcx, rax
call sub.VCRUNTIME140.dll_memset
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], Ordinal_35
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo]
lea rcx, [rsi + 6]
mov r8d, edi
test rcx, rcx
jne 0x1400a626a
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], reloc.WLDAP32.dll_Ordinal_22
jmp 0x1400a628d
cmp r8, 0x10
jb 0x1400a627a
movups xmm0, xmmword [rsp + 0x50]
movups xmmword [rcx], xmm0
jmp 0x1400a6293
xor edx, edx
call sub.VCRUNTIME140.dll_memset
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], Ordinal_35
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo]
mov rdi, qword [0x140268120]
mov ebx, dword [0x140263af0]
add rdi, 0x50
mov r15, qword [0x140263af8]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea r9, [rsp + 0x50]
mov qword [rsp + 0x20], r14
mov r8d, ebx
mov rdx, rsi
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1400a62d9
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x1400a62f7
lea r9, [rsp + 0x40]
mov qword [rsp + 0x20], r14
mov r8d, 0x208
lea rdx, [rsp + 0x60]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [rsp + 0x40], r14d
jbe 0x1400a63e0
mov qword [rsp + 0x30], r14
lea rcx, [rsp + 0x60]
mov dword [rsp + 0x28], 0x80
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 3
mov edx, 0x80000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
xor edx, edx
lea rcx, [rbp + 0x170]
mov r8d, 0x2800
mov rdi, rax
call sub.VCRUNTIME140.dll_memset
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, eax
mov ebx, eax
call qword [sym.imp.WS2_32.dll_htonl]
mov rcx, qword [r13 + 0x10]
lea r9, [rsp + 0x44]
mov dword [rsp + 0x50], eax
lea rdx, [rsp + 0x50]
mov r8d, 4
mov r10, qword [rcx]
call qword [r10]
cmp eax, 0xffffffff
je case.0x1400a5c1d.7
test ebx, ebx
je 0x1400a63d5
nop dword [rax]
lea r9, [rsp + 0x48]
mov qword [rsp + 0x20], r14
mov r8d, 0x2800
lea rdx, [rbp + 0x170]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rcx, qword [r13 + 0x10]
lea r9, [rsp + 0x44]
mov r8d, dword [rsp + 0x48]
lea rdx, [rbp + 0x170]
mov rax, qword [rcx]
call qword [rax]
cmp eax, 0xffffffff
je case.0x1400a5c1d.7
sub ebx, dword [rsp + 0x48]
jne 0x1400a6390
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp case.0x1400a5c1d.10
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_htonl]
mov rcx, qword [r13 + 0x10]
lea r9, [rsp + 0x44]
mov dword [rsp + 0x50], eax
lea rdx, [rsp + 0x50]
mov r8d, 4
mov rax, qword [rcx]
call qword [rax]
cmp eax, 0xffffffff
jne case.0x1400a5c1d.10
xor eax, eax
jmp 0x1400a6445
mov rax, qword [r8 + 1]
mov cl, 2
mov qword [0x140268323], rax
jmp 0x1400a6434
lea rdx, [r8 + 1]
call fcn.1400ad850
jmp case.0x1400a5c1d.10
mov ecx, dword [r8 + 1]
mov dword [0x140268323], ecx
mov cl, 1
lea rdx, [0x140268323]
call fcn.1400aa2c0
mov eax, 1
mov rcx, qword [rbp + 0x2970]
xor rcx, rsp
call fcn.1401d0310
add rsp, 0x2a88
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret