Function at 0x140001370
Capabilities:
Write file on windows

Disassembly:
push rdi
push r12
push r15
sub rsp, 0xa0
mov rax, qword [0x140009040]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov r12, rdx
lea r8, [rsp + 0x58]
mov edi, 0x20
mov r15, rcx
mov edx, edi
call qword [sym.imp.GDI32.dll_GetObjectW]
test eax, eax
je 0x1400015d4
movzx eax, word [rsp + 0x68]
movzx ecx, word [rsp + 0x6a]
mov qword [rsp + 0xd0], rbx
mov qword [rsp + 0x98], rbp
mov qword [rsp + 0x90], rsi
mov esi, 1
imul ecx, eax
mov qword [rsp + 0x88], r13
mov qword [rsp + 0x80], r14
cmp cx, si
jne 0x1400015ee
movzx edi, si
movzx ebp, di
mov eax, esi
mov ecx, ebp
shl eax, cl
movsxd rdx, eax
lea rdx, [rdx*4 + 0x28]
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rbx, rax
mov dword [rax], 0x28
mov eax, dword [rsp + 0x5c]
mov dword [rbx + 4], eax
mov eax, dword [rsp + 0x60]
mov edx, dword [rsp + 0x5c]
mov dword [rbx + 8], eax
movzx eax, word [rsp + 0x68]
mov r8d, dword [rsp + 0x60]
mov word [rbx + 0xc], ax
movzx eax, word [rsp + 0x6a]
mov word [rbx + 0xe], ax
cmp di, 0x18
jae 0x140001450
mov ecx, ebp
shl esi, cl
mov dword [rbx + 0x20], esi
imul edx, ebp
xor r13d, r13d
xor ecx, ecx
mov dword [rbx + 0x10], r13d
mov dword [rbx + 0x24], r13d
lea eax, [rdx + 0x1f]
and eax, 0xffffffe0
cdq
and edx, 7
add edx, eax
sar edx, 3
imul edx, r8d
mov dword [rbx + 0x14], edx
call qword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov rbp, qword [rsp + 0x98]
mov rsi, rax
test rax, rax
je 0x1400015b4
movzx r9d, word [rbx + 8]
xor r8d, r8d
mov dword [rsp + 0x30], r13d
mov rdx, r15
mov qword [rsp + 0x28], rbx
mov rcx, r12
mov qword [rsp + 0x20], rax
call qword [sym.imp.GDI32.dll_GetDIBits]
test eax, eax
je 0x1400015a2
mov qword [rsp + 0x30], r13
lea rcx, str.screenshot.bmp
mov dword [rsp + 0x28], 0x80
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 2
mov edx, 0xc0000000
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x1400015a2
mov eax, 0x4d42
mov qword [rsp + 0x20], r13
mov word [rsp + 0x48], ax
lea r9, [rsp + 0x40]
mov edx, dword [rbx + 0x20]
lea r8d, [rdx*4 + 0xe]
mov edx, dword [rbx]
add r8d, dword [rbx + 0x14]
add edx, r8d
mov dword [rsp + 0x4e], r13d
mov dword [rsp + 0x4a], edx
lea r8d, [r13 + 0xe]
mov ecx, dword [rbx + 0x20]
lea rdx, [rsp + 0x48]
lea ecx, [rcx*4 + 0xe]
add ecx, dword [rbx]
mov dword [rsp + 0x52], ecx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140001599
mov r8d, dword [rbx + 0x20]
lea r9, [rsp + 0x40]
mov rdx, rbx
mov qword [rsp + 0x20], r13
mov rcx, rdi
lea r8d, [r8*4 + 0x28]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140001599
mov r8d, dword [rbx + 0x14]
lea r9, [rsp + 0x40]
mov rdx, rsi
mov qword [rsp + 0x20], r13
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140001599
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GlobalFree]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov r13, qword [rsp + 0x88]
mov rsi, qword [rsp + 0x90]
mov rbx, qword [rsp + 0xd0]
mov r14, qword [rsp + 0x80]
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.1400037f0
add rsp, 0xa0
pop r15
pop r12
pop rdi
ret
cmp cx, 4
ja 0x1400015fe
mov edi, 4
jmp 0x1400013f2
cmp cx, 8
ja 0x14000160e
mov edi, 8
jmp 0x1400013f2
cmp cx, 0x10
ja 0x14000161e
mov edi, reloc.WS2_32.dll_recv
jmp 0x1400013f2
cmp cx, 0x18
ja 0x1400013f2
mov ebp, 0x18
movzx edi, bp
lea edx, [rbp + 0x10]
jmp 0x140001406