Function at 0x10012040
Capabilities:
Capture screenshot
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x7c
push ebx
push esi
push edi
mov edi, eax
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.USER32.dll_GetCursorPos]
test eax, eax
je 0x1001235e
xor ebx, ebx
push ebx
call dword [sym.imp.USER32.dll_GetDC]
mov esi, eax
mov dword [esp + 0x10], esi
cmp esi, ebx
je 0x1001235e
push esi
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov dword [esp + 0xc], eax
cmp eax, ebx
je 0x10012356
push edi
push edi
push esi
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
mov esi, eax
mov dword [esp + 0x20], esi
cmp esi, ebx
je 0x10012346
mov ecx, dword [esp + 0xc]
push esi
push ecx
call dword [sym.imp.GDI32.dll_SelectObject]
mov ecx, dword [esp + 0x30]
mov eax, edi
cdq
sub eax, edx
mov edx, dword [esp + 0x34]
push 0x660046
sar eax, 1
sub edx, eax
push edx
mov edx, dword [esp + 0x18]
sub ecx, eax
mov eax, dword [esp + 0x14]
push ecx
push edx
push edi
push edi
push ebx
push ebx
push eax
call dword [sym.imp.GDI32.dll_BitBlt]
test eax, eax
je 0x1001233f
lea ecx, [esp + 0x48]
push ecx
push 0x18
push esi
call dword [sym.imp.GDI32.dll_GetObjectA]
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0x50]
mov dword [esp + 0x64], eax
mov edx, 1
mov word [esp + 0x6c], dx
shl eax, 5
mov edx, 0x20
mov word [esp + 0x6e], dx
add eax, 0x1f
cdq
and edx, 0x1f
lea edi, [edx + eax]
sar edi, 5
imul edi, ecx
add edi, edi
add edi, edi
push edi
push 0x42
mov dword [esp + 0x68], 0x28
mov dword [esp + 0x70], ecx
mov dword [esp + 0x78], ebx
mov dword [esp + 0x7c], ebx
mov dword [esp + 0x80], ebx
mov dword [esp + 0x84], ebx
mov dword [esp + 0x88], ebx
mov dword [esp + 0x8c], ebx
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [esp + 0x24], eax
cmp eax, ebx
je 0x1001233f
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov edx, dword [esp + 0x50]
push ebx
lea ecx, [esp + 0x64]
push ecx
push eax
push edx
push ebx
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x24]
push esi
push eax
call dword [sym.imp.GDI32.dll_GetDIBits]
mov ecx, dword [ebp + 8]
push ebx
push 0x80
push 2
push ebx
push 3
push 0xc0000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x1001233b
call fcn.10025930
test eax, eax
je 0x1001221a
push ebx
lea edx, [esp + 0x1c]
push edx
push 1
push str.S:_ML__NRNWNX___LW_
call dword [sym.imp.ADVAPI32.dll_ConvertStringSecurityDescriptorToSecurityDescriptorW]
test eax, eax
je 0x1001221a
lea eax, [esp + 0x28]
push eax
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x34]
push edx
push eax
mov dword [esp + 0x24], ebx
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorSacl]
test eax, eax
je 0x1001220f
mov ecx, dword [esp + 0x14]
mov edx, dword [ebp + 8]
push ecx
push ebx
push ebx
push ebx
push 0x10
push 1
push edx
call dword [sym.imp.ADVAPI32.dll_SetNamedSecurityInfoA]
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
push 1
push ebx
push ebx
lea ecx, [edi + 0x36]
mov edx, 0x4d42
push esi
mov dword [esp + 0x52], 0x36
mov dword [esp + 0x4a], ecx
mov word [esp + 0x48], dx
mov dword [esp + 0x28], ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
push 0xe
push ebx
push eax
push esi
mov dword [esp + 0x28], eax
call dword [sym.imp.KERNEL32.dll_LockFile]
push ebx
lea eax, [esp + 0x1c]
push eax
push 0xe
lea ecx, [esp + 0x44]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [esp + 0x14]
push ebx
push 0xe
push ebx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_UnlockFile]
push 1
push ebx
push ebx
push esi
mov dword [esp + 0x28], ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
push 0x28
push ebx
push eax
push esi
mov dword [esp + 0x28], eax
call dword [sym.imp.KERNEL32.dll_LockFile]
push ebx
lea eax, [esp + 0x1c]
push eax
push 0x28
lea ecx, [esp + 0x6c]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [esp + 0x14]
push ebx
push 0x28
push ebx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_UnlockFile]
mov dword [esp + 0x18], ebx
cmp dword [esp + 0x1c], ebx
je 0x10012303
cmp edi, ebx
je 0x10012303
push 1
push ebx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
push edi
push ebx
push eax
push esi
mov dword [esp + 0x28], eax
call dword [sym.imp.KERNEL32.dll_LockFile]
mov ecx, dword [esp + 0x1c]
push ebx
lea eax, [esp + 0x1c]
push eax
push edi
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [esp + 0x14]
push ebx
push edi
push ebx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_UnlockFile]
mov edi, dword [esp + 0x24]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov dword [esp + 0x1c], ebx
cmp esi, ebx
je 0x1001233b
lea eax, [esp + 0x1c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x1001233b
test byte [esp + 0x1c], 2
jne 0x1001233b
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [esp + 0x20]
push esi
call dword [sym.imp.GDI32.dll_DeleteObject]
mov ecx, dword [esp + 0xc]
push ecx
push ebx
call dword [sym.imp.USER32.dll_ReleaseDC]
mov esi, dword [esp + 0x10]
push esi
push ebx
call dword [sym.imp.USER32.dll_ReleaseDC]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4