joyce8/EMBER2024-capa huggingface dataset:
Function at 0x18000f22c
Capabilities:
Query environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r14
sub rsp, 0x40
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor esi, esi
mov rbx, rax
test rax, rax
jne 0x18000f25c
xor eax, eax
jmp 0x18000f31f
mov rbp, rbx
cmp word [rax], si
je 0x18000f281
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x18000f268
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x18000f264
mov qword [rsp + 0x38], rsi
sub rbp, rbx
mov qword [rsp + 0x30], rsi
add rbp, 2
sar rbp, 1
mov r8, rbx
mov r9d, ebp
mov dword [rsp + 0x28], esi
xor edx, edx
mov qword [rsp + 0x20], rsi
xor ecx, ecx
call fcn.18000f0dc
movsxd r14, eax
test eax, eax
jne 0x18000f2bf
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x18000f255
mov rcx, r14
call fcn.18000b634
mov rdi, rax
test rax, rax
jne 0x18000f2d8
xor ecx, ecx
call fcn.18000b69c
jmp 0x18000f2b4
mov qword [rsp + 0x38], rsi
mov r9d, ebp
mov qword [rsp + 0x30], rsi
mov r8, rbx
mov dword [rsp + 0x28], r14d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rdi
call fcn.18000f0dc
test eax, eax
jne 0x18000f309
mov rcx, rdi
call fcn.18000b69c
jmp 0x18000f313
xor ecx, ecx
call fcn.18000b69c
mov rsi, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rsi
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x68]
add rsp, 0x40
pop r14
ret

Function at 0x18000f33c
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor ebp, ebp
mov rbx, rax
test rax, rax
je 0x18000f3c3
mov rsi, rbx
cmp word [rax], bp
je 0x18000f382
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x18000f36c
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x18000f368
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.18000b634
mov rdi, rax
test rax, rax
je 0x18000f3b0
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.180024720
mov rbp, rdi
xor ecx, ecx
call fcn.18000b69c
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rbp
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x180018d04
Capabilities:
Set environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x20], rdi
push rbp
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xa0
xor r15d, r15d
mov r14, rdx
mov rsi, rcx
mov qword [rbp + 0x17], r15
xor edx, edx
mov qword [rbp + 0x1f], r15
lea rcx, [rbp - 0x39]
mov qword [rbp + 0x27], r15
mov qword [rbp + 0x2f], r15
mov edi, r15d
mov qword [rbp + 0x37], r15
mov byte [rbp + 0x3f], r15b
mov qword [rbp - 0x19], r15
mov qword [rbp - 0x11], r15
mov qword [rbp - 9], r15
mov qword [rbp - 1], r15
mov qword [rbp + 7], r15
mov byte [rbp + 0xf], r15b
call fcn.18000cee4
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x180018d8e
cmp byte [rbp - 0x21], r15b
je 0x180018d89
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x180018dc4
call fcn.180010c88
test eax, eax
jne 0x180018db0
cmp byte [rbp - 0x21], r15b
je 0x180018da8
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x180018dc4
cmp byte [rbp - 0x21], r15b
je 0x180018dc1
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, r15d
lea r8, [rbp + 0x77]
mov rcx, rsi
lea rdx, [rbp + 0x17]
call fcn.18000bc7c
test eax, eax
jne 0x180018e64
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.18000cee4
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x180018e03
cmp byte [rbp - 0x21], r15b
je 0x180018e38
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x180018e38
call fcn.180010c88
test eax, eax
jne 0x180018e24
cmp byte [rbp - 0x21], r15b
je 0x180018e1d
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x180018e38
cmp byte [rbp - 0x21], r15b
je 0x180018e35
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, r15d
mov r9d, ebx
lea r8, [rbp + 0x77]
lea rdx, [rbp - 0x19]
mov rcx, r14
call fcn.18000bc7c
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x180018e64
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x180018e67
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x180018e75
mov rcx, rdi
call fcn.18000b69c
cmp byte [rbp + 0x3f], r15b
je 0x180018e84
mov rcx, qword [rbp + 0x27]
call fcn.18000b69c
lea r11, [rsp + 0xa0]
mov eax, ebx
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
Function at 0x1800204bc
Capabilities:
Read file on windows

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x30
movsxd rbp, ecx
mov r9, r8
mov rax, rbp
lea rcx, [0x180073b60]
and eax, 0x3f
mov r10, rbp
sar r10, 6
xor edi, edi
mov rsi, rdx
mov r14, rbp
lea r8, [rax + rax*8]
mov rax, qword [rcx + r10*8]
mov ecx, 4
mov qword [rsp + 0x78], rcx
mov r11, qword [rax + r8*8 + 0x28]
lea r12d, [rcx + 6]
test r9, r9
je 0x18002051a
cmp word [rdx], r12w
jne 0x18002051a
or byte [rax + r8*8 + 0x38], cl
jmp 0x180020520
and byte [rax + r8*8 + 0x38], 0xfb
lea rdx, [rdx + r9*2]
mov rcx, rsi
mov rbx, rsi
cmp rsi, rdx
jae 0x18002067b
mov r9d, 0x1a
lea r13d, [r9 - 0xd]
movzx eax, word [rcx]
cmp ax, r9w
je 0x180020656
lea r9, [rcx + 2]
cmp ax, r13w
je 0x180020559
mov rcx, r9
jmp 0x18002057c
cmp r9, rdx
jae 0x180020593
cmp word [r9], r12w
mov eax, 2
cmove rax, qword [rsp + 0x78]
add rcx, rax
mov eax, r12d
cmp word [r9], r12w
cmovne ax, r13w
mov word [rbx], ax
mov r9d, 0x1a
add rbx, 2
cmp rcx, rdx
jb 0x18002053d
jmp 0x18002067b
lea r9, [rsp + 0x80]
mov qword [rsp + 0x20], rdi
mov r8d, 2
lea rdx, [rsp + 0x70]
mov rcx, r11
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x180020650
cmp dword [rsp + 0x80], edi
je 0x180020650
mov rdx, r14
lea r11, [0x180073b60]
sar rdx, 6
and r14d, 0x3f
mov rax, qword [r11 + rdx*8]
lea r8, [r14 + r14*8]
test byte [rax + r8*8 + 0x38], 0x48
je 0x180020629
movzx eax, word [rsp + 0x70]
cmp ax, r12w
jne 0x1800205fc
mov word [rbx], r12w
jmp 0x180020677
mov word [rbx], r13w
mov word [rsp + 0x78], ax
mov rax, qword [r11 + rdx*8]
lea rcx, [rax + r8*8]
mov al, byte [rsp + rdi + 0x78]
mov byte [rcx + rdi + 0x3a], al
inc rdi
cmp rdi, 2
jl 0x180020605
mov rax, qword [r11 + rdx*8]
mov byte [rax + r8*8 + 0x3c], r12b
jmp 0x180020677
cmp word [rsp + 0x70], r12w
jne 0x180020636
cmp rbx, rsi
je 0x1800205f6
mov rdx, 0xfffffffffffffffe
mov ecx, ebp
lea r8d, [rdx + 3]
call fcn.18001f398
cmp word [rsp + 0x70], r12w
je 0x18002067b
mov word [rbx], r13w
jmp 0x180020677
lea r11, [0x180073b60]
mov rcx, qword [r11 + r10*8]
mov al, byte [rcx + r8*8 + 0x38]
test al, 0x40
jne 0x180020673
or al, 2
mov byte [rcx + r8*8 + 0x38], al
jmp 0x18002067b
mov word [rbx], r9w
add rbx, 2
sub rbx, rsi
sar rbx, 1
lea eax, [rbx + rbx]
add rsp, 0x30
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
Function at 0x140001154
Capabilities:
Terminate process

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x70
mov qword [rbp - 0x10], 0
mov dword [rbp - 0x1c], 0x30
mov eax, dword [rbp - 0x1c]
mov rax, qword gs:[rax]
mov qword [rbp - 0x28], rax
mov rax, qword [rbp - 0x28]
mov rax, qword [rax + 8]
mov qword [rbp - 0x18], rax
mov dword [rbp - 4], 0
jmp 0x1400011ac
mov rax, qword [rbp - 0x10]
cmp rax, qword [rbp - 0x18]
jne 0x14000119e
mov dword [rbp - 4], 1
jmp 0x1400011e3
mov ecx, 0x3e8
mov rax, qword [sym.imp.KERNEL32.dll_Sleep]
call rax
mov rax, qword [0x14003b490]
mov qword [rbp - 0x30], rax
mov rax, qword [rbp - 0x18]
mov qword [rbp - 0x38], rax
mov qword [rbp - 0x40], 0
mov rcx, qword [rbp - 0x38]
mov rax, qword [rbp - 0x40]
mov rdx, qword [rbp - 0x30]
lock cmpxchg qword [rdx], rcx
mov qword [rbp - 0x10], rax
cmp qword [rbp - 0x10], 0
jne 0x14000118b
mov rax, qword [0x14003b4a0]
mov eax, dword [rax]
cmp eax, 1
jne 0x1400011fd
mov ecx, 0x1f
call fcn.14001b0a0
jmp 0x14000123c
mov rax, qword [0x14003b4a0]
mov eax, dword [rax]
test eax, eax
jne 0x140001232
mov rax, qword [0x14003b4a0]
mov dword [rax], 1
mov rax, qword [0x14003b4e0]
mov rdx, rax
mov rax, qword [0x14003b4d0]
mov rcx, rax
call sub.api_ms_win_crt_runtime_l1_1_0.dll__initterm
jmp 0x14000123c
mov dword [0x14003f024], 1
mov rax, qword [0x14003b4a0]
mov eax, dword [rax]
cmp eax, 1
jne 0x140001270
mov rax, qword [0x14003b4c0]
mov rdx, rax
mov rax, qword [0x14003b4b0]
mov rcx, rax
call sub.api_ms_win_crt_runtime_l1_1_0.dll__initterm
mov rax, qword [0x14003b4a0]
mov dword [rax], 2
cmp dword [rbp - 4], 0
jne 0x140001294
mov rax, qword [0x14003b490]
mov qword [rbp - 0x48], rax
mov qword [rbp - 0x50], 0
mov rdx, qword [rbp - 0x50]
mov rax, qword [rbp - 0x48]
xchg qword [rax], rdx
mov rax, qword [0x14003b3e0]
mov rax, qword [rax]
test rax, rax
je 0x1400012bf
mov rax, qword [0x14003b3e0]
mov rax, qword [rax]
mov r8d, 0
mov edx, 2
mov ecx, 0
call rax
call fcn.14001a328
mov rax, qword [0x14003b520]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
call rax
mov rdx, qword [0x14003b480]
mov qword [rdx], rax
lea rax, section..text
mov rcx, rax
call sub.api_ms_win_crt_runtime_l1_1_0.dll__set_invalid_parameter_handler
call fcn.140019b20
mov eax, dword [0x14003f004]
lea rdx, [0x14003f008]
mov ecx, eax
call fcn.14000147c
call fcn.1400198b7
mov rax, qword [0x14003b410]
mov rax, qword [rax]
mov rdx, qword [0x14003f010]
mov qword [rax], rdx
mov rcx, qword [0x14003f010]
mov rdx, qword [0x14003f008]
mov eax, dword [0x14003f004]
mov r8, rcx
mov ecx, eax
call fcn.1400016d0
mov dword [0x14003f01c], eax
mov eax, dword [0x14003f020]
test eax, eax
jne 0x14000135d
mov eax, dword [0x14003f01c]
mov ecx, eax
call sub.api_ms_win_crt_runtime_l1_1_0.dll_exit
mov eax, dword [0x14003f024]
test eax, eax
jne 0x14000136c
call sub.api_ms_win_crt_runtime_l1_1_0.dll__cexit
mov eax, dword [0x14003f01c]
add rsp, 0x70
pop rbp
ret
Function at 0x140001378
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov rax, qword [0x14003b440]
mov dword [rax], 1
mov rax, qword [0x14003b450]
mov dword [rax], 1
mov rax, qword [0x14003b460]
mov dword [rax], 1
mov rax, qword [0x14003b400]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x1400013c9
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x1400013f5
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
movzx eax, ax
cmp eax, 0x10b
je 0x14000141b
cmp eax, 0x20b
je 0x140001442
jmp 0x140001471
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0x5c]
cmp eax, 0xe
ja 0x14000142e
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0xd0]
test eax, eax
setne al
movzx eax, al
jmp 0x140001476
mov rax, qword [rbp - 0x18]
mov qword [rbp - 0x20], rax
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0x6c]
cmp eax, 0xe
ja 0x14000145d
mov eax, 0
jmp 0x140001476
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0xe0]
test eax, eax
setne al
movzx eax, al
jmp 0x140001476
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x140019b30
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x30]
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], rdx
mov qword [rbp + 0x30], r8
mov qword [rbp + 0x38], r9
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov ecx, 2
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov r9, rax
mov r8d, 0x1b
mov edx, 1
lea rax, str.Mingw_w64_runtime_failure:_n
mov rcx, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
mov rbx, qword [rbp - 8]
mov ecx, 2
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov rcx, rax
mov rax, qword [rbp + 0x20]
mov r8, rbx
mov rdx, rax
call fcn.14001ae90
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
nop

Function at 0x14001a802
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x14003f168]
test eax, eax
je 0x14001a89a
lea rax, [0x14003f140]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x14003f170]
mov qword [rbp - 8], rax
jmp 0x14001a87e
mov rax, qword [rbp - 8]
mov eax, dword [rax]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_TlsGetValue]
call rax
mov qword [rbp - 0x10], rax
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
test eax, eax
jne 0x14001a872
cmp qword [rbp - 0x10], 0
je 0x14001a872
mov rax, qword [rbp - 8]
mov rdx, qword [rax + 8]
mov rax, qword [rbp - 0x10]
mov rcx, rax
call rdx
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x10]
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x14001a838
lea rax, [0x14003f140]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x14001a89b
nop
add rsp, 0x30
pop rbp
ret

Function at 0x14001a9a0
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov rax, qword [rbp + 0x10]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x14001a9c8
mov eax, 0
jmp 0x14001aa16
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x14001a9f1
mov eax, 0
jmp 0x14001aa16
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
cmp ax, 0x20b
je 0x14001aa11
mov eax, 0
jmp 0x14001aa16
mov eax, 1
add rsp, 0x20
pop rbp
ret
Function at 0x14001aa1c
Capabilities:
Enumerate pe sections

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov rax, qword [rbp + 0x10]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp + 0x10]
add rax, rdx
mov qword [rbp - 0x18], rax
mov dword [rbp - 0xc], 0
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 0x14]
movzx edx, ax
mov rax, qword [rbp - 0x18]
add rax, rdx
add rax, 0x18
mov qword [rbp - 8], rax
jmp 0x14001aa9a
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x14001aa91
mov rax, qword [rbp - 8]
mov edx, dword [rax + 0xc]
mov rax, qword [rbp - 8]
mov eax, dword [rax + 8]
add eax, edx
mov eax, eax
cmp qword [rbp + 0x18], rax
jae 0x14001aa91
mov rax, qword [rbp - 8]
jmp 0x14001aaaf
add dword [rbp - 0xc], 1
add qword [rbp - 8], 0x28
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 6]
movzx eax, ax
cmp dword [rbp - 0xc], eax
jb 0x14001aa64
mov eax, 0
add rsp, 0x20
pop rbp
ret

Function at 0x140001c88
Capabilities:
Parse pe header

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

Disassembly:
sub rsp, 0x28
mov rax, qword [0x00404f50]
xor ecx, ecx
mov dword [rax], 1
mov rax, qword [0x00404f60]
mov dword [rax], 1
mov rax, qword [0x00404f70]
mov dword [rax], 1
mov rax, qword [0x00404ef0]
cmp word [rax], 0x5a4d
jne 0x40105a
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x4010c0
mov rax, qword [0x00404f40]
mov dword [0x00408020], ecx
mov eax, dword [rax]
test eax, eax
je 0x4010b0
mov ecx, 2
call sym.__set_app_type
call sym.__p__fmode
mov rdx, qword [0x00405010]
mov edx, dword [rdx]
mov dword [rax], edx
call sym.__p__commode
mov rdx, qword [0x00404ff0]
mov edx, dword [rdx]
mov dword [rax], edx
call sym._setargv
mov rax, qword [0x00404ea0]
cmp dword [rax], 1
je 0x4010f8
xor eax, eax
add rsp, 0x28
ret
mov ecx, 1
call sym.__set_app_type
jmp 0x401077
movzx edx, word [rax + 0x18]
cmp dx, 0x10b
je 0x401110
cmp dx, 0x20b
jne 0x40105a
cmp dword [rax + 0x84], 0xe
jbe 0x40105a
mov edx, dword [rax + 0xf8]
xor ecx, ecx
test edx, edx
setne cl
jmp 0x40105a
mov rcx, qword [sym._matherr]
call sym.__mingw_setusermatherr
xor eax, eax
add rsp, 0x28
ret
cmp dword [rax + 0x74], 0xe
jbe 0x40105a
mov r8d, dword [rax + 0xe8]
xor ecx, ecx
test r8d, r8d
setne cl
jmp 0x40105a
Function at 0x401552
Capabilities:
Connect socket
Connect udp socket
Create udp socket
Initialize winsock library
Resolve dns
Send data
Send data on socket

Disassembly:
push rbp
push rdi
push rsi
sub rsp, 0xac0
lea rbp, [rsp + 0x80]
mov qword [rbp + 0xa60], rcx
mov dword [rbp + 0xa68], edx
mov dword [rbp + 0xa70], r8d
lea rax, [rbp + 0x880]
mov rdx, rax
mov ecx, 0x202
mov rax, qword [sym.imp.WS2_32.dll_WSAStartup]
call rax
mov r8d, 0
mov edx, 2
mov ecx, 2
mov rax, qword [sym.imp.WS2_32.dll_socket]
call rax
mov dword [rbp + 0xa38], eax
mov ecx, 0
call sym.time
mov qword [rbp + 0xa30], rax
mov rax, qword [rbp + 0xa60]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_gethostbyname]
call rax
mov qword [rbp + 0xa28], rax
lea rax, [rbp + 0x870]
mov r8d, 0x10
mov edx, 0
mov rcx, rax
call sym.memset
mov rax, qword [rbp + 0xa28]
movzx eax, word [rax + 0x12]
movsx r8, ax
mov rax, qword [rbp + 0xa28]
mov rax, qword [rax + 0x18]
mov rax, qword [rax]
lea rdx, [rbp + 0x870]
lea rcx, [rdx + 4]
mov rdx, rax
call sym.memmove
mov rax, qword [rbp + 0xa28]
movzx eax, word [rax + 0x10]
mov word [rbp + 0x870], ax
mov eax, dword [rbp + 0xa68]
mov word [rbp + 0x872], ax
mov dword [rbp + 0xa3c], 0
lea rax, [rbp - 0x60]
lea rdx, [0x00403020]
mov ecx, 0x11a
mov rdi, rax
mov rsi, rdx
rep movsq qword [rdi], qword [rsi]
call sym.rand
movsxd rcx, eax
movabs rdx, 0xe865ac7b7603a197
mov rax, rcx
mul rdx
mov rax, rdx
shr rax, 8
imul rdx, rax, 0x11a
mov rax, rcx
sub rax, rdx
mov rax, qword [rbp + rax*8 - 0x60]
mov qword [rbp + 0xa20], rax
cmp dword [rbp + 0xa3c], 0x31
jbe 0x401739
mov eax, dword [rbp + 0xa38]
cdqe
mov rdx, qword [rbp + 0xa20]
mov r9d, 0
mov r8d, 0x400
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_send]
call rax
mov eax, dword [rbp + 0xa38]
cdqe
lea rdx, [rbp + 0x870]
mov r8d, 0x10
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_connect]
call rax
mov ecx, 0
call sym.time
mov edx, dword [rbp + 0xa70]
movsxd rcx, edx
mov rdx, qword [rbp + 0xa30]
add rdx, rcx
cmp rax, rdx
jl 0x40172f
mov eax, dword [rbp + 0xa38]
cdqe
mov rcx, rax
call sym.fclose
mov ecx, 0
call sym._exit
mov dword [rbp + 0xa3c], 0
add dword [rbp + 0xa3c], 1
jmp 0x40164d

Function at 0x401a60
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 dword [rax]
Function at 0x401ad0
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x004090b4]
test esi, esi
mov rbx, rcx
jle 0x401c00
mov rax, qword [0x004090b8]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x401b1b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x401ba5
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x401b00
mov rcx, rbx
call sym.__mingw_GetSectionForAddress
test rax, rax
mov rdi, rax
je 0x401c22
mov rax, qword [0x004090b8]
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 [0x004090b8]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x401c07
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x401b9e
lea edx, [rax - 0x40]
and edx, 0xffffffbf
jne 0x401bb0
add dword [0x004090b4], 1
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
cmp eax, 2
mov r8d, 0x40
mov eax, 4
mov rcx, qword [rsp + 0x20]
cmove r8d, eax
mov rdx, qword [rsp + 0x38]
add rbx, qword [0x004090b8]
mov r9, rbx
mov qword [rbx + 8], rcx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x401b9e
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 0x401b28
mov rax, qword [0x004090b8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov edx, dword [rdi + 8]
mov r8, qword [rax + rbx + 0x18]
call sym.__report_error
lea rcx, str.Address__p_has_no_image_section
mov rdx, rbx
call sym.__report_error
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x4021c0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x00409120]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x00409100]
test rbx, rbx
je 0x40221c
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 0x402213
test eax, eax
jne 0x402213
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x4021f8
mov rcx, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]

Function at 0x402430
Capabilities:
Parse pe header

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