Function at 0x18001e380
Capabilities:
Get file size

Disassembly:
push rbx
push rsi
push r12
push r14
push r15
sub rsp, 0x40
xor r12d, r12d
mov rbx, r8
mov dword [rsp + 0x78], r12d
mov r15, rcx
mov r8d, edx
mov esi, r12d
mov eax, r12d
mov r14d, r12d
mov ecx, r12d
test dl, 2
je 0x18001e3dd
mov eax, edx
lea esi, [r12 + 4]
and edx, 0xfffffffe
lea r14d, [r12 + 2]
and eax, 1
lea ecx, [rsi - 3]
cmove edx, r8d
shl eax, 0x1f
add eax, 0x40000000
test sil, dl
je 0x18001e3dd
lea esi, [rcx + 0x3f]
lea r14d, [r12 + 0x22]
test dl, 1
je 0x18001e406
mov esi, 2
mov r14d, 4
mov eax, 0x80000000
lea ecx, [rsi - 1]
test r14b, dl
je 0x18001e406
lea esi, [rcx + 0x1f]
and edx, 8
lea r14d, [rcx + 0x23]
jmp 0x18001e411
and edx, 8
test ecx, ecx
je 0x18001e65d
test rbx, rbx
je 0x18001e65d
test edx, edx
mov qword [rsp + 0x30], r12
mov ecx, 3
mov dword [rsp + 0x28], 0x80
mov r8d, r12d
mov dword [rsp + 0x20], ecx
cmove r8d, ecx
mov qword [rsp + 0x70], rbp
xor r9d, r9d
mov qword [rsp + 0x80], rdi
mov rcx, r15
mov qword [rbx], r12
mov edx, eax
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x18001e4b0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
lea edx, [rdi + 3]
call fcn.18001ed70
mov dword [rsp + 0x30], eax
lea rcx, str.file_map_create
mov qword [rsp + 0x28], r15
lea r9d, [rdi + 0x5c]
mov qword [rsp + 0x20], rcx
lea r8, str..._srcwin_file_map.c
xor ecx, ecx
lea rdx, str.__s:_d__ERR___s:_cannot_map_file__S__retcode__d_n
mov ebx, eax
call fcn.18002b690
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
jmp 0x18001e5ed
lea rdx, [rsp + 0x78]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebp, eax
mov eax, 0xffffffff
cmp rbp, rax
je 0x18001e607
cmp dword [rsp + 0x78], r12d
jne 0x18001e607
mov qword [rsp + 0x28], r12
xor r9d, r9d
mov r8d, esi
mov dword [rsp + 0x20], ebp
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov rsi, rax
test rax, rax
jne 0x18001e50b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, 0x2712
jmp 0x18001e612
xor r9d, r9d
mov qword [rsp + 0x20], rbp
xor r8d, r8d
mov edx, r14d
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov r14, rax
test rax, rax
jne 0x18001e57a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
mov edx, 0x2712
call fcn.18001ed70
mov dword [rsp + 0x30], eax
lea rcx, str.file_map_create
mov qword [rsp + 0x28], r15
lea r9d, [r14 + 0x5b]
mov qword [rsp + 0x20], rcx
lea r8, str..._srcwin_file_map.c
xor ecx, ecx
lea rdx, str.__s:_d__ERR___s:_cannot_map_file__S__retcode__d_n
mov ebx, eax
call fcn.18002b690
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x18001e64b
mov ecx, 0x20
call fcn.18022c454
mov qword [rbx], rax
test rax, rax
jne 0x18001e5d3
lea rcx, str.file_map_create
mov ebx, reloc.WS2_32.dll_inet_ntoa
mov dword [rsp + 0x30], ebx
lea r9d, [rax + 0x5b]
mov qword [rsp + 0x28], r15
lea r8, str..._srcwin_file_map.c
mov qword [rsp + 0x20], rcx
lea rdx, str.__s:_d__ERR___s:_cannot_map_file__S__retcode__d_n
xor ecx, ecx
call fcn.18002b690
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x18001e64b
mov qword [rax], rdi
mov rax, qword [rbx]
mov qword [rax + 8], rsi
mov rax, qword [rbx]
mov qword [rax + 0x10], r14
mov rax, qword [rbx]
mov qword [rax + 0x18], rbp
xor eax, eax
mov rbp, qword [rsp + 0x70]
mov rdi, qword [rsp + 0x80]
add rsp, 0x40
pop r15
pop r14
pop r12
pop rsi
pop rbx
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, 0x4b
mov ecx, eax
call fcn.18001ed70
mov dword [rsp + 0x30], eax
lea rcx, str.file_map_create
mov qword [rsp + 0x28], r15
lea r8, str..._srcwin_file_map.c
mov qword [rsp + 0x20], rcx
lea rdx, str.__s:_d__ERR___s:_cannot_map_file__S__retcode__d_n
xor ecx, ecx
mov r9d, 0x5b
mov ebx, eax
call fcn.18002b690
test rdi, rdi
je 0x18001e659
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
jmp 0x18001e5ed
mov eax, reloc.WS2_32.dll_shutdown
add rsp, 0x40
pop r15
pop r14
pop r12
pop rsi
pop rbx
ret