joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400ac1c0
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rdi
push r14
sub rsp, 0x20
mov eax, dword [rcx + 0x18]
mov rbx, rcx
mov ebp, r8d
mov r14, rdx
lea ecx, [rax + rax]
mov eax, dword [rbx + 0x20]
add rax, 0x18
add rcx, rax
call qword [sub.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rdi, rax
test rax, rax
jne 0x1400ac202
mov rbx, qword [rsp + 0x50]
add rsp, 0x20
pop r14
pop rdi
pop rbp
ret
lea rcx, [rax + 0x18]
mov qword [rax], rbx
mov qword [rax + 8], rcx
mov eax, dword [rbx + 0x18]
add rax, rcx
mov qword [rsp + 0x48], rsi
mov qword [rdi + 0x10], rax
cmp ebp, dword [rbx + 0x1c]
jbe 0x1400ac249
call qword [rbx]
mov rcx, qword [rdi + 8]
mov r8d, ebp
mov rdx, r14
call qword [rbx + reloc.WS2_32.dll_htonl]
mov r14d, dword [rbx + 0x18]
add r14, qword [rdi + 0x10]
mov rdx, qword [rdi + 8]
mov rcx, r14
call qword [rbx + reloc.WS2_32.dll_recv]
mov rcx, qword [rdi + 8]
mov ebp, dword [rbx + 0x20]
call qword [rbx]
mov rcx, qword [rdi + 0x10]
call qword [rbx]
xor esi, esi
test rbp, rbp
je 0x1400ac2a2
mov rsi, rbp
nop dword [rax + rax]
movzx eax, byte [r14]
lea rdx, [rsp + 0x40]
xor al, 0x36
mov r8d, 1
mov byte [rsp + 0x40], al
mov rcx, qword [rdi + 8]
call qword [rbx + reloc.WS2_32.dll_htonl]
movzx eax, byte [r14]
lea rdx, [rsp + 0x40]
xor al, 0x5c
lea r14, [r14 + 1]
mov byte [rsp + 0x40], al
mov r8d, 1
mov rcx, qword [rdi + 0x10]
call qword [rbx + reloc.WS2_32.dll_htonl]
sub rbp, 1
jne 0x1400ac260
mov eax, dword [rbx + 0x1c]
cmp rsi, rax
jae 0x1400ac2e3
nop word [rax + rax]
mov rcx, qword [rdi + 8]
lea rdx, [0x1400e4ad2]
mov r8d, 1
call qword [rbx + reloc.WS2_32.dll_htonl]
mov rcx, qword [rdi + 0x10]
lea rdx, [0x1400e4ad3]
mov r8d, 1
call qword [rbx + reloc.WS2_32.dll_htonl]
mov eax, dword [rbx + 0x1c]
inc rsi
cmp rsi, rax
jb 0x1400ac2b0
mov rsi, qword [rsp + 0x48]
mov rax, rdi
mov rbx, qword [rsp + 0x50]
add rsp, 0x20
pop r14
pop rdi
pop rbp
ret

Function at 0x1400ad1cc
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x1400ad216
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x1400ad216
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x1400ad216
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x1400ad216
cmp dword [rcx + 0x84], 0xe
jbe 0x1400ad216
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x1400ad218
xor al, al
add rsp, 0x28
ret
Function at 0x1400ad424
Capabilities:
Get geographical location

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x40
mov rbx, rdx
lea r8, [rsp + 0x60]
mov edi, ecx
mov edx, 0x20000001
lea rcx, str._x_sys_default_locale
mov r9d, 2
call qword [sym.imp.KERNEL32.dll_GetLocaleInfoEx]
test eax, eax
jne 0x1400ad45e
xor r9d, r9d
mov dword [rsp + 0x60], r9d
jmp 0x1400ad463
mov r9d, dword [rsp + 0x60]
and qword [rsp + 0x30], 0
mov r8d, edi
and dword [rsp + 0x28], 0
xor edx, edx
mov ecx, 0x1300
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_FormatMessageA]
mov edx, eax
test eax, eax
je 0x1400ad4ac
mov r8, qword [rbx]
dec r8
add r8, rdx
movzx ecx, byte [r8]
lea rax, reloc.WS2_32.dll_accept
cmp byte [rcx + rax], 0
je 0x1400ad4ac
dec r8
sub rdx, 1
jne 0x1400ad492
mov rbx, qword [rsp + 0x50]
mov rax, rdx
add rsp, 0x40
pop rdi
ret
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
mov rax, qword [0x00408d30]
xor edx, edx
mov dword [rax], 1
mov rax, qword [0x00408d40]
mov dword [rax], 1
mov rax, qword [0x00408d50]
mov dword [rax], 1
mov rax, qword [0x00408d20]
mov dword [rax], 1
mov rax, qword [0x00408c00]
cmp word [rax], 0x5a4d
je 0x4010b0
mov rax, qword [0x00408d10]
mov dword [0x0040b008], edx
mov eax, dword [rax]
test eax, eax
je 0x4010a0
mov ecx, 2
call sym.__set_app_type
call sym.__p__fmode
mov rdx, qword [0x00408cd0]
mov edx, dword [rdx]
mov dword [rax], edx
call sym._setargv
mov rax, qword [0x00408bb0]
cmp dword [rax], 1
je 0x4010f0
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x401075
movsxd rcx, dword [rax + 0x3c]
add rax, rcx
cmp dword [rax], 0x4550
jne 0x401058
movzx ecx, word [rax + 0x18]
cmp cx, 0x10b
je 0x401103
cmp cx, 0x20b
jne 0x401058
cmp dword [rax + 0x84], 0xe
jbe 0x401058
mov ecx, dword [rax + 0xf8]
xor edx, edx
test ecx, ecx
setne dl
jmp 0x401058
lea rcx, [sym._matherr]
call sym.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x401058
mov r8d, dword [rax + 0xe8]
xor edx, edx
test r8d, r8d
setne dl
jmp 0x401058
Function at 0x401947
Capabilities:
Delete service

Disassembly:
push rbp
push rsi
push rbx
mov rbp, rsp
sub rsp, 0x50
mov qword [rbp + 0x20], rcx
mov r8d, 0xf003f
mov edx, 0
mov ecx, 0
mov rax, qword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
call rax
mov qword [rbp - 0x10], rax
cmp qword [rbp - 0x10], 0
jne 0x4019c2
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov dword [rbp - 0x14], eax
cmp dword [rbp - 0x14], 5
je 0x4019b8
mov ecx, 2
mov rax, qword [sym.__acrt_iob_func]
call rax
mov rcx, rax
mov eax, dword [rbp - 0x14]
mov r8d, eax
lea rdx, str.OpenSCManager_failed___lu__n
call sym.fprintf
mov eax, 0x67
jmp 0x401b1b
mov eax, 0x66
jmp 0x401b1b
mov rax, qword [rbp + 0x20]
mov rdx, qword [rax + 0x38]
mov rax, qword [rbp - 0x10]
mov r8d, 0x10000
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_OpenServiceA]
call rax
mov qword [rbp - 0x20], rax
cmp qword [rbp - 0x20], 0
jne 0x401a76
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov dword [rbp - 0x24], eax
cmp dword [rbp - 0x24], 0x424
jne 0x401a2e
mov rax, qword [rbp + 0x20]
mov rbx, qword [rax + 0x38]
mov ecx, 2
mov rax, qword [sym.__acrt_iob_func]
call rax
mov r8, rbx
lea rdx, str.Service_does_not_exist:__s
mov rcx, rax
call sym.fprintf
jmp 0x401a5c
mov rax, qword [rbp + 0x20]
mov rbx, qword [rax + 0x38]
mov ecx, 2
mov rax, qword [sym.__acrt_iob_func]
call rax
mov rcx, rax
mov eax, dword [rbp - 0x24]
mov r9d, eax
mov r8, rbx
lea rdx, str.Failed_to_open_service__s___lu__n
call sym.fprintf
mov rax, qword [rbp - 0x10]
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call rax
mov eax, 0x68
jmp 0x401b1b
mov dword [rbp - 4], 0
mov rax, qword [rbp - 0x20]
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_DeleteService]
call rax
test eax, eax
je 0x401abb
mov rax, qword [rbp + 0x20]
mov rbx, qword [rax + 0x38]
mov ecx, 2
mov rax, qword [sym.__acrt_iob_func]
call rax
mov r8, rbx
lea rdx, str.Service_removed:__s_n
mov rcx, rax
call sym.fprintf
jmp 0x401af8
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov esi, eax
mov rax, qword [rbp + 0x20]
mov rbx, qword [rax + 0x38]
mov ecx, 2
mov rax, qword [sym.__acrt_iob_func]
call rax
mov r9d, esi
mov r8, rbx
lea rdx, str.Failed_to_remove_service__s___lu__n
mov rcx, rax
call sym.fprintf
mov dword [rbp - 4], 0x69
mov rax, qword [rbp - 0x20]
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call rax
mov rax, qword [rbp - 0x10]
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call rax
mov eax, dword [rbp - 4]
add rsp, 0x50
pop rbx
pop rsi
pop rbp
ret
Function at 0x4020ec
Capabilities:
Start service

Disassembly:
push rbp
push rbx
sub rsp, 0x48
lea rbp, [rsp + 0x80]
mov qword [rbp - 0x20], rcx
mov r8d, 0xf003f
mov edx, 0
mov ecx, 0
mov rax, qword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
call rax
mov qword [rbp - 0x48], rax
cmp qword [rbp - 0x48], 0
jne 0x40216b
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov dword [rbp - 0x4c], eax
cmp dword [rbp - 0x4c], 5
je 0x402161
mov ecx, 2
mov rax, qword [sym.__acrt_iob_func]
call rax
mov rcx, rax
mov eax, dword [rbp - 0x4c]
mov r8d, eax
lea rdx, str.OpenSCManager_failed___lu__n
call sym.fprintf
mov eax, 0x67
jmp 0x4022fa
mov eax, 0x66
jmp 0x4022fa
mov rax, qword [rbp - 0x20]
mov rdx, qword [rax + 0x38]
mov rax, qword [rbp - 0x48]
mov r8d, 0x10
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_OpenServiceA]
call rax
mov qword [rbp - 0x58], rax
cmp qword [rbp - 0x58], 0
jne 0x40221f
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov dword [rbp - 0x5c], eax
cmp dword [rbp - 0x5c], 0x424
jne 0x4021d7
mov rax, qword [rbp - 0x20]
mov rbx, qword [rax + 0x38]
mov ecx, 2
mov rax, qword [sym.__acrt_iob_func]
call rax
mov r8, rbx
lea rdx, str.Service_does_not_exist:__s
mov rcx, rax
call sym.fprintf
jmp 0x402205
mov rax, qword [rbp - 0x20]
mov rbx, qword [rax + 0x38]
mov ecx, 2
mov rax, qword [sym.__acrt_iob_func]
call rax
mov rcx, rax
mov eax, dword [rbp - 0x5c]
mov r9d, eax
mov r8, rbx
lea rdx, str.Failed_to_open_service__s___lu__n
call sym.fprintf
mov rax, qword [rbp - 0x48]
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call rax
mov eax, 0x68
jmp 0x4022fa
mov rax, qword [rbp - 0x58]
mov r8d, 0
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_StartServiceA]
call rax
test eax, eax
jne 0x4022ad
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
mov dword [rbp - 0x60], eax
cmp dword [rbp - 0x60], 0x420
jne 0x40227d
mov rax, qword [rbp - 0x20]
mov rbx, qword [rax + 0x38]
mov ecx, 2
mov rax, qword [sym.__acrt_iob_func]
call rax
mov r8, rbx
lea rdx, str.Service_is_already_running:__s
mov rcx, rax
call sym.fprintf
jmp 0x4022d5
mov rax, qword [rbp - 0x20]
mov rbx, qword [rax + 0x38]
mov ecx, 2
mov rax, qword [sym.__acrt_iob_func]
call rax
mov rcx, rax
mov eax, dword [rbp - 0x60]
mov r9d, eax
mov r8, rbx
lea rdx, str.Failed_to_start_service__s___lu__n
call sym.fprintf
jmp 0x4022d5
mov rax, qword [rbp - 0x20]
mov rbx, qword [rax + 0x38]
mov ecx, 2
mov rax, qword [sym.__acrt_iob_func]
call rax
mov r8, rbx
lea rdx, str.Service_started:__s_n
mov rcx, rax
call sym.fprintf
mov rax, qword [rbp - 0x58]
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call rax
mov rax, qword [rbp - 0x48]
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call rax
mov eax, 0
add rsp, 0x48
pop rbx
pop rbp
ret
Function at 0x402400
Capabilities:
Create directory

Disassembly:
push rbp
push rdi
sub rsp, 0x58
lea rbp, [rsp + 0x80]
mov qword [rbp - 0x10], rcx
lea rdx, [rbp - 0x60]
mov eax, 0
mov ecx, 6
mov rdi, rdx
rep stosq qword [rdi], rax
lea rax, [rbp - 0x60]
mov rdx, rax
mov rcx, qword [rbp - 0x10]
call sym.stat
cmp eax, 0xffffffff
jne 0x402475
mov rcx, qword [rbp - 0x10]
mov rax, qword [sym.imp.msvcrt.dll__mkdir]
call rax
cmp eax, 0xffffffff
jne 0x402475
mov ecx, 2
mov rax, qword [sym.__acrt_iob_func]
call rax
mov r8, qword [rbp - 0x10]
lea rdx, str.Cannot_create_directory:__s_n
mov rcx, rax
call sym.fprintf
mov eax, 0
jmp 0x40247a
mov eax, 1
add rsp, 0x58
pop rdi
pop rbp
ret

Function at 0x402f23
Capabilities:
Query environment variable
Write file on windows

Disassembly:
push rbp
push rdi
sub rsp, 0x38
lea rbp, [rsp + 0x80]
mov qword [rbp - 0x30], rcx
mov qword [rbp - 0x28], rdx
mov ecx, 0x104
call sym.malloc
mov rdx, rax
mov rax, qword [rbp - 0x30]
mov qword [rax + 0x20], rdx
mov rax, qword [rbp - 0x30]
mov rax, qword [rax + 0x20]
mov r8d, 0x104
mov edx, 0
mov rcx, rax
call sym.memset
cmp qword [rbp - 0x28], 0
je 0x402f94
mov rax, qword [rbp - 0x30]
mov rax, qword [rax + 0x20]
mov rdx, qword [rbp - 0x28]
mov rcx, rax
call sym.strcpy
mov rax, qword [rbp - 0x30]
mov dword [rax + 8], 0
jmp 0x4030f0
mov rax, qword [rbp - 0x30]
mov rdx, qword [rax + 0x30]
mov rax, qword [rbp - 0x30]
mov rax, qword [rax + 0x20]
mov rcx, rax
call dbg.pathCopy
mov rax, qword [rbp - 0x30]
mov rdx, qword [rax + 0x20]
mov rax, rdx
mov rcx, 0xffffffffffffffff
mov r8, rax
mov eax, 0
mov rdi, r8
repne scasb al, byte [rdi]
mov rax, rcx
not rax
sub rax, 1
add rax, rdx
movabs rdi, 0x78652e6176616a5c
mov qword [rax], rdi
mov word [rax + 8], 0x65
mov rax, qword [rbp - 0x30]
mov rax, qword [rax + 0x20]
mov rcx, rax
call dbg.fileExists
test eax, eax
je 0x40300f
mov rax, qword [rbp - 0x30]
mov dword [rax + 8], 1
jmp 0x4030f0
lea rcx, str.JAVA_HOME
call sym.getenv
mov qword [rbp - 0x58], rax
cmp qword [rbp - 0x58], 0
je 0x4030a1
mov rax, qword [rbp - 0x30]
mov rax, qword [rax + 0x20]
mov rdx, qword [rbp - 0x58]
mov rcx, rax
call sym.strcpy
mov rax, qword [rbp - 0x30]
mov rdx, qword [rax + 0x20]
mov rax, rdx
mov rcx, 0xffffffffffffffff
mov r8, rax
mov eax, 0
mov rdi, r8
repne scasb al, byte [rdi]
mov rax, rcx
not rax
sub rax, 1
add rax, rdx
movabs rdi, 0x76616a5c6e69625c
mov qword [rax], rdi
mov dword [rax + 8], 0x78652e61
mov word [rax + 0xc], 0x65
mov rax, qword [rbp - 0x30]
mov rax, qword [rax + 0x20]
mov rcx, rax
call dbg.fileExists
test eax, eax
je 0x4030a1
mov rax, qword [rbp - 0x30]
mov dword [rax + 8], 0
jmp 0x4030f0
mov rax, qword [rbp - 0x30]
mov rax, qword [rax + 0x20]
mov rcx, rax
call sym.free
mov rax, qword [rbp - 0x30]
mov qword [rax + 0x20], 0
mov ecx, 2
mov rax, qword [sym.__acrt_iob_func]
call rax
mov r9, rax
mov r8d, 0x1c
mov edx, 1
lea rcx, str._r_nJAVA_HOME_is_not_defined_r_n
call sym.fwrite
mov rax, qword [rbp - 0x30]
mov dword [rax + 0x18], 2
add rsp, 0x38
pop rdi
pop rbp
ret
Function at 0x403765
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0x78
lea rbp, [rsp + 0x80]
mov dword [rbp + 0x10], ecx
mov qword [rbp + 0x18], rdx
lea rdx, [rbp - 0x60]
mov rax, qword [rbp + 0x18]
mov r8, rdx
mov rdx, rax
mov ecx, dword [rbp + 0x10]
call dbg.initAndParseConfig
mov dword [rbp - 0x14], 0x37
mov eax, dword [rbp - 0x48]
test eax, eax
jne 0x403852
mov eax, dword [rbp - 0x60]
cmp eax, 6
ja case.0x4037ce.0
mov eax, eax
lea rdx, [rax*4]
lea rax, [0x0040859c]
mov eax, dword [rdx + rax]
cdqe
lea rdx, [0x0040859c]
add rax, rdx
jmp rax
lea rax, [rbp - 0x60]
mov rcx, rax
call dbg.svcStart
mov dword [rbp - 0x14], eax
jmp 0x403885
lea rax, [rbp - 0x60]
mov rcx, rax
call dbg.svcStop
mov dword [rbp - 0x14], eax
jmp 0x403885
lea rax, [rbp - 0x60]
mov rcx, rax
call dbg.svcStatus
mov dword [rbp - 0x14], eax
jmp 0x403885
lea rax, [rbp - 0x60]
mov rcx, rax
call dbg.svcInstall
mov dword [rbp - 0x14], eax
jmp 0x403885
lea rax, [rbp - 0x60]
mov rcx, rax
call dbg.svcRemove
mov dword [rbp - 0x14], eax
jmp 0x403885
lea rax, [rbp - 0x60]
mov rcx, rax
call dbg.qdbDispatchService
mov dword [rbp - 0x14], 0
jmp 0x403885
lea rax, [rbp - 0x60]
mov rcx, rax
call dbg.qdbConsole
mov dword [rbp - 0x14], eax
nop
jmp 0x403885
lea rax, [rbp - 0x60]
mov rcx, rax
call dbg.logConfigError
mov rax, qword [rbp + 0x18]
mov rbx, qword [rax]
mov ecx, 2
mov rax, qword [sym.__acrt_iob_func]
call rax
mov r8, rbx
lea rdx, str.Usage:__s__startstopstatusinstallremove____d_dir____f____j_JAVA_HOME____t_tag_
mov rcx, rax
call sym.fprintf
lea rax, [rbp - 0x60]
mov rcx, rax
call dbg.freeConfig
cmp dword [rbp - 0x14], 0x66
jne 0x4038bf
mov ecx, 2
mov rax, qword [sym.__acrt_iob_func]
call rax
mov r9, rax
mov r8d, 0x31
mov edx, 1
lea rcx, str.ACCESS_DENIED_n_nPlease_try_again_as_Administrator.
call sym.fwrite
mov eax, dword [rbp - 0x14]
add rsp, 0x78
pop rbx
pop rbp
ret

Function at 0x4038d0
Capabilities:
Access the windows event log

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x60
mov eax, ecx
mov qword [rbp + 0x18], rdx
mov qword [rbp + 0x20], r8
mov word [rbp + 0x10], ax
mov rax, qword [rbp + 0x18]
mov rdx, rax
mov ecx, 0
mov rax, qword [sym.imp.ADVAPI32.dll_RegisterEventSourceA]
call rax
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
je 0x403968
mov rax, qword [rbp + 0x20]
mov qword [rbp - 0x10], rax
movzx eax, word [rbp + 0x10]
mov rcx, qword [rbp - 8]
mov qword [rsp + 0x40], 0
lea rdx, [rbp - 0x10]
mov qword [rsp + 0x38], rdx
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x28], 1
mov qword [rsp + 0x20], 0
mov r9d, 0xc0000000
mov r8d, 0
mov edx, eax
mov rax, qword [sym.imp.ADVAPI32.dll_ReportEventA]
call rax
mov rax, qword [rbp - 8]
mov rcx, rax
mov rax, qword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
call rax
nop
add rsp, 0x60
pop rbp
ret
Function at 0x4048a0
Capabilities:
Allocate or change rwx memory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x0040b624]
test esi, esi
mov rbx, rcx
mov rbp, rdx
mov rdi, r8
jle 0x404a28
mov rax, qword [0x0040b628]
xor ecx, ecx
add rax, 0x18
nop
mov rdx, qword [rax]
cmp rbx, rdx
jb 0x4048ec
mov r8, qword [rax + 8]
mov r8d, dword [r8 + 8]
add rdx, r8
cmp rbx, rdx
jb 0x404975
add ecx, 1
add rax, 0x28
cmp ecx, esi
jne 0x4048d0
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
test rax, rax
mov r12, rax
je 0x404a5d
mov rax, qword [0x0040b628]
lea rsi, [rsi + rsi*4]
shl rsi, 3
add rax, rsi
mov qword [rax + 0x20], r12
mov dword [rax], 0
call sym._GetPEImageBase
mov ecx, dword [r12 + 0xc]
lea rdx, [rsp + 0x20]
mov r8d, 0x30
add rcx, rax
mov rax, qword [0x0040b628]
mov qword [rax + rsi + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x404a40
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x40496e
sub eax, 0x40
and eax, 0xffffffbf
jne 0x4049d0
add dword [0x0040b624], 1
cmp edi, 8
jae 0x4049a3
test dil, 4
jne 0x404a14
test edi, edi
je 0x404998
movzx eax, byte [rbp]
test dil, 2
mov byte [rbx], al
jne 0x404a2f
add rsp, 0x50
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov eax, edi
sub edi, 1
mov rdx, qword [rbp + rax - 8]
cmp edi, 8
mov qword [rbx + rax - 8], rdx
jb 0x404998
and edi, 0xfffffff8
xor eax, eax
mov edx, eax
add eax, 8
mov rcx, qword [rbp + rdx]
cmp eax, edi
mov qword [rbx + rdx], rcx
jb 0x4049bc
jmp 0x404998
add rsi, qword [0x0040b628]
mov r8d, 0x40
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r9, rsi
mov qword [rsi + 8], rcx
mov qword [rsi + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x40496e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call sym.__report_error
mov eax, dword [rbp]
mov edi, edi
mov dword [rbx], eax
mov eax, dword [rbp + rdi - 4]
mov dword [rbx + rdi - 4], eax
jmp 0x404998
xor esi, esi
jmp 0x4048f7
mov edi, edi
movzx eax, word [rbp + rdi - 2]
mov word [rbx + rdi - 2], ax
jmp 0x404998
mov rax, qword [0x0040b628]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [r12 + 8]
mov r8, qword [rax + rsi + 0x18]
call sym.__report_error
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call sym.__report_error
nop
nop dword [rax]

Function at 0x4051b0
Capabilities:
Get thread local storage value

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
lea rcx, [0x0040b900]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x0040b8e0]
test rbx, rbx
je 0x405204
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x4051fb
test rsi, rsi
je 0x4051fb
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x4051e0
lea rcx, [0x0040b900]
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x405440
Capabilities:
Parse pe header

Disassembly:
cmp word [rcx], 0x5a4d
je 0x405450
xor eax, eax
ret
jmp sym._ValidateImageBase.part.0

Function at 0x405460
Capabilities:
Enumerate pe sections

Disassembly:
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
lea rax, [rcx + rax + 0x18]
movzx ecx, word [rcx + 6]
test ecx, ecx
je 0x4054a1
sub ecx, 1
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
mov r8d, dword [rax + 0xc]
cmp r8, rdx
mov rcx, r8
ja 0x405498
add ecx, dword [rax + 8]
cmp rcx, rdx
ja 0x4054a3
add rax, 0x28
cmp rax, r9
jne 0x405484
xor eax, eax
ret

Function at 0x405540
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x00408c00]
cmp word [r8], 0x5a4d
mov rdx, rcx
jne 0x4055ad
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x4055ad
movsxd rax, dword [r8 + 0x3c]
mov rcx, rdx
sub rcx, r8
add r8, rax
movzx edx, word [r8 + 6]
movzx eax, word [r8 + 0x14]
test edx, edx
lea rax, [r8 + rax + 0x18]
je 0x4055ad
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop
mov r8d, dword [rax + 0xc]
cmp rcx, r8
mov rdx, r8
jb 0x4055a4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x4055af
add rax, 0x28
cmp rax, r9
jne 0x405590
xor eax, eax
add rsp, 0x28
ret

Function at 0x4056b0
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r8, qword [0x00408c00]
xor eax, eax
cmp word [r8], 0x5a4d
mov rdx, rcx
je 0x4056d0
add rsp, 0x28
ret
mov rcx, r8
call sym._ValidateImageBase.part.0
test eax, eax
je 0x4056c8
movsxd rax, dword [r8 + 0x3c]
mov rcx, rdx
sub rcx, r8
add r8, rax
movzx edx, word [r8 + 6]
movzx eax, word [r8 + 0x14]
test edx, edx
lea rax, [r8 + rax + 0x18]
je 0x40572d
sub edx, 1
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
cmp rcx, r8
mov rdx, r8
jb 0x405724
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x405734
add rax, 0x28
cmp rax, r9
jne 0x405710
xor eax, eax
add rsp, 0x28
ret
mov eax, dword [rax + 0x24]
not eax
shr eax, 0x1f
add rsp, 0x28
ret

Function at 0x405750
Capabilities:
Enumerate pe sections

Disassembly:
sub rsp, 0x28
mov r11, qword [0x00408c00]
cmp word [r11], 0x5a4d
mov r9d, ecx
jne 0x4057be
mov rcx, r11
call sym._ValidateImageBase.part.0
test eax, eax
je 0x4057be
movsxd rax, dword [r11 + 0x3c]
add rax, r11
mov edx, dword [rax + 0x90]
test edx, edx
je 0x4057be
movzx ecx, word [rax + 0x14]
lea rcx, [rax + rcx + 0x18]
movzx eax, word [rax + 6]
test eax, eax
je 0x4057be
sub eax, 1
lea rax, [rax + rax*4]
lea rax, [rcx + rax*8 + 0x28]
mov r10d, dword [rcx + 0xc]
cmp rdx, r10
mov r8, r10
jb 0x4057b5
add r8d, dword [rcx + 8]
cmp rdx, r8
jb 0x4057c5
add rcx, 0x28
cmp rcx, rax
jne 0x4057a0
xor eax, eax
add rsp, 0x28
ret
add rdx, r11
jne 0x4057d8
jmp 0x4057be
sub r9d, 1
add rdx, 0x14
mov ecx, dword [rdx + 4]
test ecx, ecx
jne 0x4057e6
mov eax, dword [rdx + 0xc]
test eax, eax
je 0x4057be
test r9d, r9d
jg 0x4057d0
mov eax, dword [rdx + 0xc]
add rax, r11
add rsp, 0x28
ret
Function at 0x4068c0
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
lea rax, [rsp + 0x58]
mov rbx, rcx
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
nop
nop
nop
nop
nop
nop

Function at 0x140459717
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov r8, rax
lea rsp, [rsp + 8]
jmp 0x140460775