joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14009fb40
Capabilities:
Read file on windows

Disassembly:
push rbx
push rdi
sub rsp, 0x48
mov rax, qword [0x14021a328]
xor rax, rsp
mov qword [rsp + 0x38], rax
xor edi, edi
mov rbx, rcx
cmp dword [rcx + 0x210], edi
jne 0x14009fb73
lea ecx, [rdi + 0x15]
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, edi
jmp 0x14009fbfc
test rdx, rdx
jne 0x14009fb85
lea ecx, [rdx + 0x57]
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, edi
jmp 0x14009fbfc
lea r9, [rsp + 0x30]
mov rcx, qword [rcx + 0x208]
cmp dword [rbx + 0x218], edi
jne 0x14009fba6
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
jmp 0x14009fbfc
mov qword [rsp + 0x40], rsi
lea rsi, [rbx + 0x228]
mov qword [rsi], rdi
mov qword [rsp + 0x20], rsi
mov qword [rbx + 0x230], rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov edi, eax
test eax, eax
jne 0x14009fbf7
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x14009fbf5
mov rcx, qword [rbx + 0x208]
lea r9d, [rdi + 1]
lea r8, [rsp + 0x30]
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_GetOverlappedResult]
jmp 0x14009fbf7
mov eax, edi
mov rsi, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.1400ac830
add rsp, 0x48
pop rdi
pop rbx
ret

Function at 0x14009fc20
Capabilities:
Write file on windows

Disassembly:
push rbx
push rdi
sub rsp, 0x48
mov rax, qword [0x14021a328]
xor rax, rsp
mov qword [rsp + 0x38], rax
xor edi, edi
mov rbx, rcx
cmp dword [rcx + 0x210], edi
jne 0x14009fc53
lea ecx, [rdi + 0x15]
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, edi
jmp 0x14009fcdc
test rdx, rdx
jne 0x14009fc65
lea ecx, [rdx + 0x57]
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, edi
jmp 0x14009fcdc
lea r9, [rsp + 0x30]
mov rcx, qword [rcx + 0x208]
cmp dword [rbx + 0x218], edi
jne 0x14009fc86
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x14009fcdc
mov qword [rsp + 0x40], rsi
lea rsi, [rbx + 0x250]
mov qword [rsi], rdi
mov qword [rsp + 0x20], rsi
mov qword [rbx + 0x258], rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, eax
test eax, eax
jne 0x14009fcd7
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x14009fcd5
mov rcx, qword [rbx + 0x208]
lea r9d, [rdi + 1]
lea r8, [rsp + 0x30]
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_GetOverlappedResult]
jmp 0x14009fcd7
mov eax, edi
mov rsi, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.1400ac830
add rsp, 0x48
pop rdi
pop rbx
ret
Function at 0x14009fef0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov rdi, rcx
test rcx, rcx
je 0x14009ff3f
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x14009ff3f
bt eax, 0xa
jae 0x14009ff3f
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x14009ff2f
test al, 0x10
je 0x14009ff2f
mov rcx, rdi
call fcn.1400d95ec
jmp 0x14009ff37
mov rcx, rdi
call fcn.1400bd14c
test eax, eax
jne 0x14009ffc4
mov ecx, 0x18
call fcn.1400bb768
mov rbx, rax
test rax, rax
je 0x14009ffc4
xor eax, eax
xorps xmm0, xmm0
movups xmmword [rbx], xmm0
mov qword [rbx + 0x10], rax
test rdi, rdi
je 0x14009ff8d
xor edx, edx
mov r8d, 0x1000
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LoadLibraryExA]
mov qword [rbx], rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbx + 8], eax
mov rax, rbx
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
mov r8, rbx
lea rdx, [fcn.14009fef0]
mov ecx, 4
call qword [sym.imp.KERNEL32.dll_GetModuleHandleExA]
test eax, eax
jne 0x14009ffad
mov qword [rbx], 0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbx + 8], eax
mov rax, rbx
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
mov rbx, qword [rsp + 0x30]
xor eax, eax
add rsp, 0x20
pop rdi
ret
Function at 0x1400a11f0
Capabilities:
Create process on windows

Disassembly:
push rdi
sub rsp, 0x230
mov rax, qword [0x14021a328]
xor rax, rsp
mov qword [rsp + 0x220], rax
mov eax, dword [0x140220a38]
mov rdi, rcx
add eax, 0xfffffffd
cmp eax, 1
jbe 0x1400a13b8
xorps xmm0, xmm0
mov qword [rsp + 0x248], rbx
xor eax, eax
lea rcx, [rsp + 0x110]
xor edx, edx
mov dword [rsp + 0x104], eax
mov r8d, 0x104
mov qword [rsp + 0x90], rax
movups xmmword [rsp + 0xa4], xmm0
xor ebx, ebx
movups xmmword [rsp + 0xb4], xmm0
movups xmmword [rsp + 0xc4], xmm0
movups xmmword [rsp + 0xd4], xmm0
movups xmmword [rsp + 0xe4], xmm0
movups xmmword [rsp + 0xf4], xmm0
movups xmmword [rsp + 0x80], xmm0
call fcn.1400ae310
xor r9d, r9d
mov qword [rsp + 0x20], rbx
mov edx, 0x104
lea r8d, [rbx + 6]
lea rcx, [rsp + 0x110]
call fcn.140013c70
mov r9, qword [rdi + 8]
lea r8, [rsp + 0x110]
lea rdx, str.__S_s_
lea rcx, [rsp + 0x68]
call fcn.140097fb0
movups xmm0, xmmword [rax]
movups xmmword [rsp + 0x50], xmm0
cmp qword [rsp + 0x54], rbx
je 0x1400a13ac
mov rdx, qword [rsp + 0x54]
lea rax, [rsp + 0x80]
mov qword [rsp + 0x48], rax
xor r9d, r9d
lea rax, [rsp + 0xa0]
mov qword [rdi + 0x10], rbx
mov qword [rsp + 0x40], rax
xor r8d, r8d
mov qword [rsp + 0x38], rbx
xor ecx, ecx
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], 0x8000000
mov dword [rsp + 0x20], ebx
mov qword [rdi + 0x18], rbx
mov dword [rsp + 0xa0], 0x68
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
mov ebx, eax
test eax, eax
jne 0x1400a1385
cmp dword [0x140213620], 2
jl 0x1400a13a2
test dword [0x14021366c], 0x10000
je 0x1400a13a2
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x30], eax
lea r9, str.C:jenkinsworkspacedptfSrcESIFProductsESIF_UFSourceswin_rsrc_app.c
lea rax, str.Unable_to_start_capture_program._Error___d
mov ecx, 0x10000
mov qword [rsp + 0x28], rax
lea r8, str.rsrc_app_start_app_in_current_session
lea edx, [rbx + 2]
mov dword [rsp + 0x20], 0x27c
call fcn.140079050
jmp 0x1400a13a2
mov rax, qword [rsp + 0x80]
mov ebx, 1
mov qword [rdi + 0x10], rax
mov rax, qword [rsp + 0x88]
mov qword [rdi + 0x18], rax
mov rcx, qword [rsp + 0x54]
call fcn.1400bb754
mov eax, ebx
mov rbx, qword [rsp + 0x248]
jmp 0x1400a13bd
call fcn.1400a13e0
mov rcx, qword [rsp + 0x220]
xor rcx, rsp
call fcn.1400ac830
add rsp, 0x230
pop rdi
ret
Function at 0x1400a1db0
Capabilities:
Terminate process

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, rcx
mov rcx, qword [rcx + 0x10]
test rcx, rcx
je 0x1400a1df2
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
mov rcx, qword [rbx + 0x10]
mov edx, 0x1388
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [rbx + 0x10]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbx + 0x18]
test rcx, rcx
je 0x1400a1df2
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov dword [rbx + 0x20], 0xffffffff
mov qword [rbx + 0x10], rax
mov qword [rbx + 0x18], rax
add rsp, 0x20
pop rbx
ret

Function at 0x1400a27f0
Capabilities:
Modify service

Disassembly:
sub rsp, 0x68
mov rax, qword [0x14021a328]
xor rax, rsp
mov qword [rsp + 0x50], rax
xor edx, edx
mov qword [rsp + 0x70], rbx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rbx, rax
test rax, rax
jne 0x1400a283d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.Error:_Unable_to_get_handle_to_the_SCM._Status___d_n
lea ecx, [rbx + 3]
call fcn.140012790
jmp 0x1400a2905
mov r8d, 0xf01ff
mov qword [rsp + 0x60], rdi
lea rdx, str.esifsvc
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rdi, rax
test rax, rax
jne 0x1400a287a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.Error:_Unable_to_open_service_handle._Status___d_n
lea ecx, [rdi + 3]
call fcn.140012790
jmp 0x1400a28f7
xor eax, eax
mov dword [rsp + 0x4c], 0x1388
mov qword [rsp + 0x30], rax
lea r8, [rsp + 0x20]
mov qword [rsp + 0x28], rax
mov edx, 2
lea rax, [rsp + 0x48]
mov dword [rsp + 0x48], 1
mov rcx, rdi
mov qword [rsp + 0x40], rax
mov dword [rsp + 0x20], 0xffffffff
mov dword [rsp + 0x38], 1
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
test eax, eax
jne 0x1400a28d6
lea rdx, str.Error:_Unable_to_update_service_failure_actions._n
lea ecx, [rax + 3]
call fcn.140012790
lea r8, [0x1401e0b90]
mov ecx, 3
lea rdx, str._S_service_failure_actions_successfully_updated._n
call fcn.140012790
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rdi, qword [rsp + 0x60]
lea rcx, str.esifsvc
call qword [sym.imp.ADVAPI32.dll_StartServiceCtrlDispatcherW]
mov rbx, qword [rsp + 0x70]
test eax, eax
jne 0x1400a2935
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Error:_Unable_to_start_service._Status___d_n
mov ecx, 3
mov r8d, eax
call fcn.140012790
xor eax, eax
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.1400ac830
add rsp, 0x68
ret
Function at 0x1400a2ff0
Capabilities:
Start service

Disassembly:
push rbx
sub rsp, 0x20
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rbx, rax
test rax, rax
jne 0x1400a302b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.Error:_Unable_to_get_handle_to_the_SCM._Status___d_n
lea ecx, [rbx + 3]
add rsp, 0x20
pop rbx
jmp fcn.140012790
mov r8d, 0xf01ff
mov qword [rsp + 0x30], rdi
lea rdx, str.esifsvc
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rdi, rax
test rax, rax
jne 0x1400a3068
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.Error:_Unable_to_open_service_handle._Status___d_n
lea ecx, [rdi + 3]
call fcn.140012790
jmp 0x1400a30c4
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x1400a30a3
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x420
je 0x1400a30a3
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Error:_Unable_to_start_the_service._Status___d_n
mov ecx, 3
mov r8d, eax
call fcn.140012790
jmp 0x1400a30bb
lea r8, [0x1401e0b90]
mov ecx, 3
lea rdx, str._S_started._n
call fcn.140012790
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rbx
mov rdi, qword [rsp + 0x30]
add rsp, 0x20
pop rbx
jmp qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]

Function at 0x1400a30e0
Capabilities:
Stop service

Disassembly:
push rbx
sub rsp, 0x50
mov rax, qword [0x14021a328]
xor rax, rsp
mov qword [rsp + 0x40], rax
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rbx, rax
test rax, rax
jne 0x1400a3138
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.Error:_Unable_to_get_handle_to_the_SCM._Status___d_n
lea ecx, [rbx + 3]
call fcn.140012790
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.1400ac830
add rsp, 0x50
pop rbx
ret
mov r8d, 0xf01ff
mov qword [rsp + 0x60], rdi
lea rdx, str.esifsvc
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rdi, rax
test rax, rax
jne 0x1400a3175
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.Error:_Unable_to_open_service_handle._Status___d_n
lea ecx, [rdi + 3]
call fcn.140012790
jmp 0x1400a31d4
lea r8, [rsp + 0x20]
mov edx, 1
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x1400a31b3
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x426
je 0x1400a31b3
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.Error:_Unable_to_stop_the_service._Status___d_n
mov ecx, 3
mov r8d, eax
call fcn.140012790
lea r8, [0x1401e0b90]
mov ecx, 3
lea rdx, str._S_stopped_n
call fcn.140012790
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rdi, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.1400ac830
add rsp, 0x50
pop rbx
ret
Function at 0x1400f4218
Capabilities:
Parse pe header

Disassembly:
mov qword [rsp + 8], rbx
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
push rbp
mov rbp, rsp
sub rsp, 0x50
mov ebx, ecx
test r8d, r8d
jne 0x1400f4007
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x1400f4007
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x1400f4007
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x1400f4007
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x1400f4007
cmp dword [rcx + 0x84], 0xe
jbe 0x1400f4007
cmp dword [rcx + 0xf8], 0
je 0x1400f4007
mov ecx, ebx
call fcn.1400f4138
lea rax, [rbp + 0x18]
mov byte [rbp + 0x28], 0
mov qword [rbp - 0x20], rax
lea r9, [rbp - 0x2c]
lea rax, [rbp + 0x20]
mov qword [rbp - 0x18], rax
lea r8, [rbp - 0x20]
lea rax, [rbp + 0x28]
mov qword [rbp - 0x10], rax
lea rdx, [rbp - 0x28]
mov eax, 2
lea rcx, [rbp - 0x30]
mov dword [rbp - 0x2c], eax
mov dword [rbp - 0x28], eax
call fcn.1400f3d94
cmp dword [rbp + 0x20], 0
je 0x1400f4054
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.1400f405c
int3
xor r8d, r8d
xor edx, edx
jmp 0x1400f3fa0

Function at 0x1400fd3b4
Capabilities:
Delete file

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x1400fd3d4
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.1400bc844
or eax, 0xffffffff
jmp 0x1400fd3d6
xor eax, eax
add rsp, 0x28
ret

Function at 0x140101358
Capabilities:
Delete directory

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x140101378
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.1400bc844
or eax, 0xffffffff
jmp 0x14010137a
xor eax, eax
add rsp, 0x28
ret
Function at 0x140001010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x1400043f0]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x140004400]
mov dword [rax], 1
mov rax, qword [0x140004410]
mov dword [rax], 1
mov rax, qword [0x140004390]
cmp word [rax], 0x5a4d
jne 0x14000105a
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x1400010c0
mov rax, qword [0x1400043e0]
mov dword [0x140007020], ecx
mov eax, dword [rax]
test eax, eax
je 0x1400010b0
mov ecx, 2
call sym.__set_app_type
call sym.__p__fmode
mov rdx, qword [0x1400044b0]
mov edx, dword [rdx]
mov dword [rax], edx
call sym.__p__commode
mov rdx, qword [0x140004490]
mov edx, dword [rdx]
mov dword [rax], edx
call sym._setargv
mov rax, qword [0x140004340]
cmp dword [rax], 1
je 0x1400010f8
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x140001077
movzx edx, word [rax + 0x18]
cmp dx, 0x10b
je 0x140001110
cmp dx, 0x20b
jne 0x14000105a
cmp dword [rax + 0x84], 0xe
jbe 0x14000105a
mov edx, dword [rax + 0xf8]
xor ecx, ecx
test edx, edx
setne cl
jmp 0x14000105a
mov rcx, qword [sym._matherr]
call sym.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x14000105a
mov r8d, dword [rax + 0xe8]
xor ecx, ecx
test r8d, r8d
setne cl
jmp 0x14000105a

Function at 0x140001910
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
mov rbx, rcx
lea rax, [rsp + 0x58]
mov ecx, 2
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x28], rax
call sym.__acrt_iob_func
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sym.fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call sym.__acrt_iob_func
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sym.vfprintf
call sym.abort
nop
nop dword [rax]
Function at 0x140001980
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x1400070b4]
mov rbx, rcx
test esi, esi
jle 0x140001ab0
mov rax, qword [0x1400070b8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x1400019cb
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x140001a55
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x1400019b0
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
mov rdi, rax
test rax, rax
je 0x140001ad2
mov rax, qword [0x1400070b8]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call sym._GetPEImageBase
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x1400070b8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x140001ab7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x140001a4e
lea edx, [rax - 0x40]
and edx, 0xffffffbf
jne 0x140001a60
add dword [0x1400070b4], 1
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
mov eax, 4
cmove r8d, eax
add rbx, qword [0x1400070b8]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140001a4e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call sym.__report_error
nop dword [rax]
xor esi, esi
jmp 0x1400019d8
mov rax, qword [0x1400070b8]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call sym.__report_error
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call sym.__report_error
nop
nop word cs:[rax + rax]
nop dword [rax]
Function at 0x140002180
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
cmp edx, 2
je 0x1400022b0
ja 0x1400021c8
test edx, edx
je 0x140002248
mov eax, dword [0x140007108]
test eax, eax
je 0x140002330
mov dword [0x140007108], 1
mov eax, 1
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
cmp edx, 3
jne 0x1400021b5
mov eax, dword [0x140007108]
test eax, eax
je 0x1400021b5
lea r12, [0x140007120]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x140007100]
test rbx, rbx
je 0x140002234
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax]
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test rsi, rsi
je 0x140002358
test eax, eax
jne 0x140002358
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140002208
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x1400021b5
mov eax, dword [0x140007108]
test eax, eax
jne 0x1400022c8
mov eax, dword [0x140007108]
cmp eax, 1
jne 0x1400021b5
mov rbx, qword [0x140007100]
test rbx, rbx
je 0x140002281
nop dword [rax]
mov rcx, rbx
mov rbx, qword [rbx + 0x10]
call sym.free
test rbx, rbx
jne 0x140002270
lea rcx, [0x140007120]
mov qword [0x140007100], 0
mov dword [0x140007108], 0
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
jmp 0x1400021b5
call sym._fpreset
mov eax, 1
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
lea r12, [0x140007120]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x140007100]
test rbx, rbx
je 0x14000231c
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop word [rax + rax]
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x140002348
test rsi, rsi
je 0x140002348
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x1400022f8
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x140002252
lea rcx, [0x140007120]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
jmp 0x1400021ab
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x1400022f8
jmp 0x14000231c
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x140002208
jmp 0x140002234

Function at 0x140002370
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x140002388
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x140002390
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret

Function at 0x1400023a0
Capabilities:
Enumerate pe sections

Disassembly:
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
movzx r8d, word [rcx + 6]
lea rax, [rcx + rax + 0x18]
test r8w, r8w
je 0x1400023ed
lea ecx, [r8 - 1]
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
mov rcx, r8
cmp rdx, r8
jb 0x1400023e4
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x1400023ef
add rax, 0x28
cmp rax, r9
jne 0x1400023d0
xor eax, eax
ret
Function at 0x1400023f0
Capabilities:
Parse pe header

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rsi, rcx
call sym.strlen
cmp rax, 8
ja 0x140002480
mov rdx, qword [0x140004390]
xor ebx, ebx
cmp word [rdx], 0x5a4d
jne 0x14000246e
movsxd rax, dword [rdx + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
jne 0x14000246e
cmp word [rax + 0x18], 0x20b
jne 0x14000246e
movzx edx, word [rax + 0x14]
lea rbx, [rax + rdx + 0x18]
movzx edx, word [rax + 6]
test dx, dx
je 0x140002480
lea eax, [rdx - 1]
lea rax, [rax + rax*4]
lea rdi, [rbx + rax*8 + 0x28]
jmp 0x140002459
add rbx, 0x28
cmp rbx, rdi
je 0x140002480
mov r8d, 8
mov rdx, rsi
mov rcx, rbx
call sym.strncmp
test eax, eax
jne 0x140002450
mov rax, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
xor ebx, ebx
mov rax, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret

Function at 0x140002490
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov r8, qword [0x140004390]
xor eax, eax
cmp word [r8], 0x5a4d
jne 0x1400024b0
movsxd rdx, dword [r8 + 0x3c]
add rdx, r8
cmp dword [rdx], 0x4550
je 0x1400024b8
ret
cmp word [rdx + 0x18], 0x20b
jne 0x1400024b0
movzx eax, word [rdx + 0x14]
sub rcx, r8
movzx r8d, word [rdx + 6]
lea rax, [rdx + rax + 0x18]
test r8w, r8w
je 0x140002505
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop dword [rax]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x1400024fc
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x1400024b0
add rax, 0x28
cmp rax, r9
jne 0x1400024e8
xor eax, eax
ret

Function at 0x140002510
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x140004390]
xor ecx, ecx
cmp word [rax], 0x5a4d
jne 0x14000252f
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x140002538
mov eax, ecx
ret
cmp word [rax + 0x18], 0x20b
jne 0x14000252f
movzx ecx, word [rax + 6]
mov eax, ecx
ret

Function at 0x140002550
Capabilities:
Parse pe header

Disassembly:
mov r8, qword [0x140004390]
xor eax, eax
cmp word [r8], 0x5a4d
jne 0x140002570
movsxd rdx, dword [r8 + 0x3c]
add rdx, r8
cmp dword [rdx], 0x4550
je 0x140002578
ret
cmp word [rdx + 0x18], 0x20b
jne 0x140002570
movzx eax, word [rdx + 0x14]
movzx r8d, word [rdx + 6]
lea rax, [rdx + rax + 0x18]
test r8w, r8w
je 0x1400025c0
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea rdx, [rax + rdx*8 + 0x28]
nop dword [rax]
test byte [rax + 0x27], 0x20
je 0x1400025b7
test rcx, rcx
je 0x140002570
sub rcx, 1
add rax, 0x28
cmp rdx, rax
jne 0x1400025a8
xor eax, eax
ret

Function at 0x1400025d0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x140004390]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x1400025ef
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x1400025f8
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret