Function at 0x18001e8a0
Capabilities:
Write file on windows

Disassembly:
push rdi
push r12
push r14
push r15
sub rsp, 0x88
mov rax, qword [0x180167010]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov r15, qword [rsp + 0xd0]
lea r8, [rsp + 0x58]
mov r12, rdx
mov edi, 0x20
mov edx, edi
mov r14, rcx
call qword [sym.imp.GDI32.dll_GetObjectA]
test eax, eax
je 0x18001ead8
movzx eax, word [rsp + 0x68]
movzx ecx, word [rsp + 0x6a]
mov qword [rsp + 0xc0], rbx
mov qword [rsp + 0xc8], rbp
mov ebp, 1
imul ecx, eax
mov qword [rsp + 0x80], rsi
cmp cx, bp
jne 0x18001eaf4
movzx edi, bp
movzx esi, di
mov eax, ebp
mov ecx, esi
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 dword [rbx + 8], eax
movzx eax, word [rsp + 0x68]
mov word [rbx + 0xc], ax
movzx eax, word [rsp + 0x6a]
mov word [rbx + 0xe], ax
cmp di, 0x18
jae 0x18001e971
mov ecx, esi
shl ebp, cl
mov dword [rbx + 0x20], ebp
imul esi, dword [rbx + 4]
xor ebp, ebp
xor ecx, ecx
mov dword [rbx + 0x10], ebp
mov dword [rbx + 0x24], ebp
lea eax, [rsi + 0x1f]
and eax, 0xffffffe0
cdq
and edx, 7
add edx, eax
sar edx, 3
imul edx, dword [rbx + 8]
mov dword [rbx + 0x14], edx
call qword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov rsi, rax
test rax, rax
je 0x18001eac0
movzx r9d, word [rbx + 8]
xor r8d, r8d
mov dword [rsp + 0x30], ebp
mov rdx, r14
mov qword [rsp + 0x28], rbx
mov rcx, r12
mov qword [rsp + 0x20], rax
call qword [sym.imp.GDI32.dll_GetDIBits]
test eax, eax
je 0x18001eac0
mov qword [rsp + 0x30], rbp
xor r9d, r9d
mov dword [rsp + 0x28], 0x80
xor r8d, r8d
mov edx, 0xc0000000
mov dword [rsp + 0x20], 2
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x18001eac0
mov eax, 0x4d42
mov qword [rsp + 0x20], rbp
mov word [rsp + 0x48], ax
lea r9, [rsp + 0x40]
mov edx, dword [rbx + 0x20]
lea r8d, [rdx*4 + 0xe]
mov edx, dword [rbx + 0x14]
add r8d, dword [rbx]
add edx, r8d
mov dword [rsp + 0x4e], ebp
mov dword [rsp + 0x4a], edx
lea r8d, [rbp + 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 0x18001eac0
mov r8d, dword [rbx + 0x20]
lea r9, [rsp + 0x40]
mov rdx, rbx
mov qword [rsp + 0x20], rbp
mov rcx, rdi
lea r8d, [r8*4 + 0x28]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x18001eac0
mov r8d, dword [rbx + 0x14]
lea r9, [rsp + 0x40]
mov rdx, rsi
mov qword [rsp + 0x20], rbp
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x18001eac0
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x18001eac0
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GlobalFree]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rbp, qword [rsp + 0xc8]
mov rbx, qword [rsp + 0xc0]
mov rsi, qword [rsp + 0x80]
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.18012be40
add rsp, 0x88
pop r15
pop r14
pop r12
pop rdi
ret
cmp cx, 4
ja 0x18001eb04
mov edi, 4
jmp 0x18001e91c
cmp cx, 8
ja 0x18001eb14
mov edi, 8
jmp 0x18001e91c
cmp cx, 0x10
ja 0x18001eb24
mov edi, 0x10
jmp 0x18001e91c
cmp cx, 0x18
ja 0x18001e91c
mov esi, 0x18
movzx edi, si
lea edx, [rsi + 0x10]
jmp 0x18001e930