joyce8/EMBER2024-capa huggingface dataset:
Function at 0x180040420
Capabilities:
Check os version

Disassembly:
sub rsp, 0xb8
mov dword [rsp + 0x60], 0
call qword [sym.imp.KERNEL32.dll_GetVersion]
and eax, 0xff
cmp eax, 6
jae 0x18004048b
call fcn.18003f6f0
mov qword [rsp + 0x88], rax
cmp qword [rsp + 0x88], 0
je 0x180040461
mov dword [rsp + 0x74], 1
jmp 0x180040469
mov dword [rsp + 0x74], 0
mov eax, dword [rsp + 0x74]
mov dword [rsp + 0x60], eax
cmp dword [rsp + 0x60], 0
je 0x180040486
mov rcx, qword [rsp + 0x88]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x180040618
lea rcx, str.advapi32.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
lea rdx, str.CheckTokenMembership
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsp + 0x98], rax
mov byte [rsp + 0x64], 0
mov byte [rsp + 0x65], 0
mov byte [rsp + 0x66], 0
mov byte [rsp + 0x67], 0
mov byte [rsp + 0x68], 0
mov byte [rsp + 0x69], 5
cmp qword [rsp + 0x98], 0
je 0x180040618
lea rax, [rsp + 0x90]
mov qword [rsp + 0x50], rax
mov dword [rsp + 0x48], 0
mov dword [rsp + 0x40], 0
mov dword [rsp + 0x38], 0
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
mov r9d, 0x220
mov r8d, 0x20
mov dl, 2
lea rcx, [rsp + 0x64]
call qword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x180040618
lea r8, [rsp + 0x80]
mov rdx, qword [rsp + 0x90]
xor ecx, ecx
call qword [rsp + 0x98]
test eax, eax
je 0x18004056c
cmp dword [rsp + 0x80], 0
je 0x18004056c
mov dword [rsp + 0x6c], 1
jmp 0x180040574
mov dword [rsp + 0x6c], 0
mov eax, dword [rsp + 0x6c]
mov dword [rsp + 0x60], eax
mov rcx, qword [rsp + 0x90]
call qword [sym.imp.ADVAPI32.dll_FreeSid]
cmp dword [rsp + 0x60], 0
je 0x180040618
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rsp + 0xa0]
mov edx, 8
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x180040618
mov dword [rsp + 0x78], 4
lea rax, [rsp + 0x78]
mov qword [rsp + 0x20], rax
mov r9d, 4
lea r8, [rsp + 0x7c]
mov edx, 0x14
mov rcx, qword [rsp + 0xa0]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x1800405fa
cmp dword [rsp + 0x7c], 0
je 0x1800405fa
mov dword [rsp + 0x70], 1
jmp 0x180040602
mov dword [rsp + 0x70], 0
mov eax, dword [rsp + 0x70]
mov dword [rsp + 0x60], eax
mov rcx, qword [rsp + 0xa0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [rsp + 0x60]
add rsp, 0xb8
ret
Function at 0x180041190
Capabilities:
Allocate or change rwx memory

Disassembly:
sub rsp, 0x48
mov rax, qword [0x1800a5250]
mov qword [rsp + 0x28], rax
mov rax, qword [0x1800a5260]
mov qword [rsp + 0x30], rax
mov qword [0x1800a5250], 0
mov qword [0x1800a5260], 0
cmp qword [rsp + 0x28], 0
je 0x180041210
lea r9, [rsp + 0x20]
mov r8d, 0x40
mov edx, 4
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x180041210
mov rax, qword [rsp + 0x28]
mov ecx, dword [0x1800a5258]
mov dword [rax], ecx
lea r9, [rsp + 0x20]
mov r8d, dword [rsp + 0x20]
mov edx, 4
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
cmp qword [rsp + 0x30], 0
je 0x180041260
lea r9, [rsp + 0x20]
mov r8d, 0x40
mov edx, 8
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x180041260
mov rax, qword [rsp + 0x30]
mov rcx, qword [0x1800a5268]
mov qword [rax], rcx
lea r9, [rsp + 0x20]
mov r8d, dword [rsp + 0x20]
mov edx, 8
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov byte [0x1800a525c], 0
add rsp, 0x48
ret
Function at 0x180046280
Capabilities:
Get file size
Read file via mapping

Disassembly:
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x68
mov dword [rsp + 0x44], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov r8d, 1
mov edx, 0x80000000
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0xffffffffffffffff
je 0x1800463b1
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
xor r9d, r9d
mov r8d, 2
xor edx, edx
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov qword [rsp + 0x58], rax
cmp qword [rsp + 0x58], 0
je 0x1800463a6
mov qword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
mov edx, 4
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0
je 0x18004639b
xor edx, edx
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [rsp + 0x40], eax
cmp dword [rsp + 0x80], 0
je 0x180046375
mov eax, dword [rsp + 0x40]
cmp dword [rsp + 0x80], eax
jae 0x180046375
mov eax, dword [rsp + 0x80]
mov dword [rsp + 0x40], eax
mov r8, qword [rsp + 0x78]
mov edx, dword [rsp + 0x40]
mov rcx, qword [rsp + 0x50]
call fcn.1800463c0
mov dword [rsp + 0x44], 1
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [rsp + 0x44]
add rsp, 0x68
ret

Function at 0x180046420
Capabilities:
Hash data using sha1

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x28
mov r8d, 0xd0
xor edx, edx
mov rcx, qword [rsp + 0x30]
call fcn.180056c20
mov eax, 4
imul rax, rax, 0
mov rcx, qword [rsp + 0x30]
mov dword [rcx + rax], 0x67452301
mov eax, 4
imul rax, rax, 1
mov rcx, qword [rsp + 0x30]
mov dword [rcx + rax], 0xefcdab89
mov eax, 4
imul rax, rax, 2
mov rcx, qword [rsp + 0x30]
mov dword [rcx + rax], 0x98badcfe
mov eax, 4
imul rax, rax, 3
mov rcx, qword [rsp + 0x30]
mov dword [rcx + rax], 0x10325476
mov eax, 4
imul rax, rax, 4
mov rcx, qword [rsp + 0x30]
mov dword [rcx + rax], 0xc3d2e1f0
add rsp, 0x28
ret
Function at 0x180047700
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x258
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
mov r9d, 0xf003f
xor r8d, r8d
mov rdx, qword [rsp + 0x268]
mov rcx, qword [rsp + 0x260]
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x18004778a
mov dword [rsp + 0x30], 0
mov r9d, 0x104
lea r8, [rsp + 0x40]
mov edx, dword [rsp + 0x30]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
test eax, eax
jne 0x18004777f
lea rdx, [rsp + 0x40]
mov rcx, qword [rsp + 0x38]
call fcn.180047700
mov eax, dword [rsp + 0x30]
inc eax
mov dword [rsp + 0x30], eax
jmp 0x180047746
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rdx, qword [rsp + 0x268]
mov rcx, qword [rsp + 0x260]
call qword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
add rsp, 0x258
ret

Function at 0x180048470
Capabilities:
Query service status
Start service

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x68
cmp qword [rsp + 0x70], 0
je 0x180048497
mov eax, 2
imul rax, rax, 0
mov rcx, qword [rsp + 0x70]
movzx eax, word [rcx + rax]
test eax, eax
jne 0x18004849e
xor eax, eax
jmp 0x180048593
mov byte [rsp + 0x20], 0
call fcn.180036930
mov r8d, 0xf003f
xor edx, edx
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov qword [rsp + 0x30], rax
cmp qword [rsp + 0x30], 0
jne 0x1800484d7
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov qword [rsp + 0x30], rax
cmp qword [rsp + 0x30], 0
je 0x18004858e
mov r8d, 0xf01ff
mov rdx, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov qword [rsp + 0x38], rax
cmp qword [rsp + 0x38], 0
je 0x18004856f
lea rdx, [rsp + 0x40]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x180048521
cmp dword [rsp + 0x44], 4
je 0x18004853f
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x18004853f
mov dword [rsp + 0x28], 0
jmp 0x180048547
mov dword [rsp + 0x28], 1
movzx eax, byte [rsp + 0x28]
mov byte [rsp + 0x20], al
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x24], eax
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, dword [rsp + 0x24]
call qword [sym.imp.KERNEL32.dll_SetLastError]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x24], eax
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, dword [rsp + 0x24]
call qword [sym.imp.KERNEL32.dll_SetLastError]
movzx eax, byte [rsp + 0x20]
add rsp, 0x68
ret
Function at 0x180048ba0
Capabilities:
Delete service

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x48
mov byte [rsp + 0x20], 0
call fcn.180036930
mov r8d, 0xf003f
xor edx, edx
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov qword [rsp + 0x38], rax
cmp qword [rsp + 0x38], 0
je 0x180048c5f
mov r8d, 0xf01ff
mov rdx, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov qword [rsp + 0x30], rax
cmp qword [rsp + 0x30], 0
je 0x180048c40
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
je 0x180048c10
mov dword [rsp + 0x28], 1
jmp 0x180048c18
mov dword [rsp + 0x28], 0
movzx eax, byte [rsp + 0x28]
mov byte [rsp + 0x20], al
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x24], eax
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, dword [rsp + 0x24]
call qword [sym.imp.KERNEL32.dll_SetLastError]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x24], eax
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, dword [rsp + 0x24]
call qword [sym.imp.KERNEL32.dll_SetLastError]
movzx eax, byte [rsp + 0x20]
add rsp, 0x48
ret

Function at 0x1800497c0
Capabilities:
Parse pe header

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x48
mov qword [rsp + 0x28], 0
mov edx, 2
mov rcx, qword [rsp + 0x50]
call fcn.180040630
test eax, eax
jne 0x18004982a
mov rax, qword [rsp + 0x50]
movzx eax, word [rax]
cmp eax, 0x5a4d
jne 0x18004982a
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0x3c]
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x20]
mov rcx, qword [rsp + 0x50]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
cmp dword [rax], 0x4550
je 0x18004982a
mov qword [rsp + 0x28], 0
jmp 0x180049835
mov rax, qword [rsp + 0x28]
add rsp, 0x48
ret
Function at 0x180049f80
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x68
mov dword [rsp + 0x28], 0
mov rcx, qword [rsp + 0x70]
call fcn.1800497a0
mov qword [rsp + 0x30], rax
cmp qword [rsp + 0x30], 0
je 0x18004a130
xor eax, eax
mov word [rsp + 0x20], ax
jmp 0x180049fd1
movzx eax, word [rsp + 0x20]
inc ax
mov word [rsp + 0x20], ax
movzx eax, word [rsp + 0x20]
mov rcx, qword [rsp + 0x30]
cmp eax, dword [rcx + 0x14]
jae 0x18004a130
mov rax, qword [rsp + 0x30]
mov eax, dword [rax + 0x1c]
mov rcx, qword [rsp + 0x70]
add rcx, rax
mov rax, rcx
movzx ecx, word [rsp + 0x20]
mov eax, dword [rax + rcx*4]
mov dword [rsp + 0x3c], eax
mov eax, dword [rsp + 0x3c]
mov rcx, qword [rsp + 0x70]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x78]
cmp qword [rsp + 0x48], rax
jne 0x18004a12b
mov dword [rsp + 0x24], 0
jmp 0x18004a03b
mov eax, dword [rsp + 0x24]
inc eax
mov dword [rsp + 0x24], eax
mov rax, qword [rsp + 0x30]
mov eax, dword [rax + 0x18]
cmp dword [rsp + 0x24], eax
jae 0x18004a0ed
mov rax, qword [rsp + 0x30]
mov eax, dword [rax + 0x24]
mov rcx, qword [rsp + 0x70]
add rcx, rax
mov rax, rcx
mov ecx, dword [rsp + 0x24]
movzx eax, word [rax + rcx*2]
mov word [rsp + 0x2c], ax
movzx eax, word [rsp + 0x2c]
movzx ecx, word [rsp + 0x20]
cmp eax, ecx
jne 0x18004a0e8
mov rax, qword [rsp + 0x30]
mov eax, dword [rax + 0x20]
mov rcx, qword [rsp + 0x70]
add rcx, rax
mov rax, rcx
mov ecx, dword [rsp + 0x24]
mov eax, dword [rax + rcx*4]
mov dword [rsp + 0x40], eax
mov eax, dword [rsp + 0x40]
mov rcx, qword [rsp + 0x70]
add rcx, rax
mov rax, rcx
mov ecx, dword [rsp + 0x88]
mov r8, rax
mov edx, ecx
mov rcx, qword [rsp + 0x80]
call fcn.18005425c
mov dword [rsp + 0x44], eax
cmp dword [rsp + 0x44], 0
jne 0x18004a0d6
mov dword [rsp + 0x38], 1
jmp 0x18004a0de
mov dword [rsp + 0x38], 0
mov eax, dword [rsp + 0x38]
mov dword [rsp + 0x28], eax
jmp 0x18004a0ed
jmp 0x18004a031
cmp dword [rsp + 0x28], 0
jne 0x18004a129
movzx eax, word [rsp + 0x20]
mov rcx, qword [rsp + 0x30]
add eax, dword [rcx + 0x10]
mov ecx, dword [rsp + 0x88]
mov r9d, eax
lea r8, [0x18007cd68]
mov edx, ecx
mov rcx, qword [rsp + 0x80]
call fcn.180053a70
mov dword [rsp + 0x28], 1
jmp 0x18004a130
jmp 0x180049fc4
jmp 0x18004a13a
mov eax, dword [rsp + 0x28]
add rsp, 0x68
ret
Function at 0x18004a4f0
Capabilities:
Read file via mapping

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x68
call fcn.180041730
test eax, eax
je 0x18004a509
xor eax, eax
jmp 0x18004a5fa
mov qword [rsp + 0x58], 0
mov edx, 0x10000
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rsp + 0x40], rax
mov r8d, 0x8000
mov rdx, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov r8d, 1
mov edx, 0x80000000
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsp + 0x50], rax
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_LocalFree]
cmp qword [rsp + 0x50], 0xffffffffffffffff
je 0x18004a5f5
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
xor r9d, r9d
mov r8d, 2
xor edx, edx
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0
je 0x18004a5ea
mov qword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
mov edx, 4
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov qword [rsp + 0x58], rax
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rsp + 0x58]
add rsp, 0x68
ret
Function at 0x18004a780
Capabilities:
Parse pe header
Read file via mapping
Resolve function by parsing pe exports

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x88
mov dword [rsp + 0x48], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov r8d, 1
mov edx, 0x80000000
mov rcx, qword [rsp + 0x90]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsp + 0x78], rax
cmp qword [rsp + 0x78], 0xffffffffffffffff
je 0x18004a958
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
xor r9d, r9d
mov r8d, 2
xor edx, edx
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov qword [rsp + 0x70], rax
cmp qword [rsp + 0x70], 0
je 0x18004a94d
mov qword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
mov edx, 4
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov qword [rsp + 0x60], rax
cmp qword [rsp + 0x60], 0
je 0x18004a942
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0x68], rax
mov rax, qword [rsp + 0x68]
movzx eax, word [rax]
cmp eax, 0x5a4d
jne 0x18004a937
mov rax, qword [rsp + 0x68]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x68]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x50], rax
mov rax, qword [rsp + 0x50]
cmp dword [rax], 0x4550
jne 0x18004a937
mov rax, qword [rsp + 0x50]
movzx eax, word [rax + 0x18]
cmp eax, 0x20b
jne 0x18004a8b4
mov eax, 8
imul rax, rax, 0
mov rcx, qword [rsp + 0x50]
mov eax, dword [rcx + rax + 0x88]
mov dword [rsp + 0x40], eax
jmp 0x18004a8ca
mov eax, 8
imul rax, rax, 0
mov rcx, qword [rsp + 0x50]
mov eax, dword [rcx + rax + 0x78]
mov dword [rsp + 0x40], eax
cmp dword [rsp + 0x40], 0
je 0x18004a937
mov edx, dword [rsp + 0x40]
mov rcx, qword [rsp + 0x50]
call fcn.18004a690
mov eax, eax
mov rcx, qword [rsp + 0x60]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x58]
cmp dword [rax + 0x10], 0
jne 0x18004a907
mov rax, qword [rsp + 0x58]
cmp dword [rax + 0x14], 1
ja 0x18004a927
mov rax, qword [rsp + 0x58]
cmp dword [rax + 0x10], 1
jne 0x18004a91d
mov rax, qword [rsp + 0x58]
cmp dword [rax + 0x14], 0
ja 0x18004a927
mov dword [rsp + 0x44], 0
jmp 0x18004a92f
mov dword [rsp + 0x44], 1
mov eax, dword [rsp + 0x44]
mov dword [rsp + 0x48], eax
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [rsp + 0x48]
add rsp, 0x88
ret
Function at 0x18004ac60
Capabilities:
Parse pe header
Read file via mapping

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x78
mov dword [rsp + 0x40], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov r8d, 1
mov edx, 0x80000000
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsp + 0x60], rax
cmp qword [rsp + 0x60], 0xffffffffffffffff
je 0x18004ad93
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
xor r9d, r9d
mov r8d, 2
xor edx, edx
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov qword [rsp + 0x58], rax
cmp qword [rsp + 0x58], 0
je 0x18004ad88
mov qword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
mov edx, 4
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0
je 0x18004ad7d
mov rax, qword [rsp + 0x50]
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x48]
movzx eax, word [rax]
cmp eax, 0x5a4d
jne 0x18004ad72
mov rax, qword [rsp + 0x48]
movsxd rax, dword [rax + 0x3c]
mov rcx, qword [rsp + 0x48]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x68], rax
mov rax, qword [rsp + 0x68]
cmp dword [rax], 0x4550
jne 0x18004ad72
mov rax, qword [rsp + 0x68]
movzx eax, word [rax + 0x18]
cmp eax, 0x20b
jne 0x18004ad72
mov dword [rsp + 0x40], 1
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [rsp + 0x40]
add rsp, 0x78
ret

Function at 0x18004bd00
Capabilities:
Check os version

Disassembly:
sub rsp, 0x158
cmp dword [0x1800a2788], 0xffffffff
jne 0x18004bd66
mov r8d, 0x114
xor edx, edx
lea rcx, [rsp + 0x30]
call fcn.180056c20
mov dword [rsp + 0x30], 0x114
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [rsp + 0x34], 6
ja 0x18004bd54
cmp dword [rsp + 0x34], 6
jne 0x18004bd4a
cmp dword [rsp + 0x38], 1
ja 0x18004bd54
mov dword [rsp + 0x24], 0
jmp 0x18004bd5c
mov dword [rsp + 0x24], 1
mov eax, dword [rsp + 0x24]
mov dword [0x1800a2788], eax
cmp dword [0x1800a2788], 1
jne 0x18004bd79
mov dword [rsp + 0x20], 1
jmp 0x18004bd81
mov dword [rsp + 0x20], 0
movzx eax, byte [rsp + 0x20]
add rsp, 0x158
ret
Function at 0x141b77058
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.141b771df
push r10
mov r10, rsp
push r10
mov rsi, qword [r10 + 0x10]
mov rdi, qword [r10 + 0x20]
cld
mov dl, 0x80
mov al, byte [rsi]
inc rsi
mov byte [rdi], al
inc rdi
mov ebx, 2
add dl, dl
jne 0x141b77089
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x141b7706f
add dl, dl
jne 0x141b77096
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x141b770f6
xor eax, eax
add dl, dl
jne 0x141b770a5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x141b771ad
add dl, dl
jne 0x141b770b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x141b770c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x141b770d0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x141b770dd
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x141b770ea
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x141b7707e
mov eax, 1
add dl, dl
jne 0x141b77106
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x141b77113
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x141b770fb
sub eax, ebx
mov ebx, 1
jne 0x141b7714c
mov ecx, 1
add dl, dl
jne 0x141b7712e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x141b7713b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x141b77123
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x141b7707e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x141b77168
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x141b77175
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x141b7715d
cmp eax, 0x7d00
jae 0x141b7719b
cmp eax, 0x500
jb 0x141b77196
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x141b7707e
cmp eax, 0x7f
ja 0x141b7719e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x141b7707e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x141b771d2
adc ecx, 2
mov ebp, eax
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
mov ebx, 1
jmp 0x141b7707e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x140001001
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x140008bf0]
mov rcx, qword [0x140008ba0]
xor edx, edx
mov dword [rax], 1
mov rax, qword [0x140008c00]
cmp word [rcx], 0x5a4d
mov dword [rax], 1
mov rax, qword [0x140008c10]
mov dword [rax], 1
jne 0x140001083
movsxd rax, dword [rcx + 0x3c]
add rax, rcx
cmp dword [rax], 0x4550
jne 0x140001083
mov ecx, dword [rax + 0x18]
cmp cx, 0x10b
je 0x14000105e
cmp cx, 0x20b
je 0x14000106d
jmp 0x140001083
cmp dword [rax + 0x74], 0xe
jbe 0x140001083
cmp dword [rax + 0xe8], 0
jmp 0x14000107d
cmp dword [rax + 0x84], 0xe
jbe 0x140001083
cmp dword [rax + 0xf8], 0
setne dl
movzx edx, dl
mov rax, qword [0x140008be0]
mov dword [0x14000c00c], edx
mov ecx, 2
cmp dword [rax], 0
jne 0x14000109f
mov ecx, 1
call sym.__set_app_type
call sym.__p__fmode
mov rdx, qword [0x140008cc0]
mov edx, dword [rdx]
mov dword [rax], edx
call sym.__p__commode
mov rdx, qword [0x140008ca0]
mov edx, dword [rdx]
mov dword [rax], edx
call sym._setargv
mov rax, qword [0x140008b50]
cmp dword [rax], 1
jne 0x1400010e1
mov rcx, qword [sym._matherr]
call sym.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret