joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140054790
Capabilities:
Write file on windows

Disassembly:
sub rsp, 0x38
cmp byte [rcx + 0xf1e], 0
movsxd r10, r9d
je 0x1400548b4
cmp r8d, 0xff
jne 0x1400547f1
lea eax, [r10 - 0xec]
cmp eax, 0x13
ja 0x1400547db
lea r8, [0x140000000]
mov r9, qword [r8 + r10*8 + 0x786c0]
mov r8, rdx
lea rdx, str._s_IAC__s_n
add rsp, 0x38
jmp fcn.1400311c0
mov r8, rdx
mov r9d, r10d
lea rdx, str._s_IAC__d_n
add rsp, 0x38
jmp fcn.1400311c0
cmp r8d, 0xfb
jne 0x140054803
lea r9, str.WILL
jmp 0x140054841
cmp r8d, 0xfc
jne 0x140054815
lea r9, str.WONT
jmp 0x140054841
cmp r8d, 0xfd
jne 0x140054827
lea r9, [0x1400790e4]
jmp 0x140054841
xor r9d, r9d
lea rax, str.DONT
cmp r8d, 0xfe
cmove r9, rax
test r9, r9
je 0x14005489d
cmp r10d, 0x27
jg 0x140054874
lea r8, [0x140000000]
mov r8, qword [r8 + r10*8 + 0x78ce0]
test r8, r8
jne 0x140054884
mov r8, rdx
mov dword [rsp + 0x20], r10d
lea rdx, str._s__s__d_n
call fcn.1400311c0
add rsp, 0x38
ret
cmp r10d, 0xff
jne 0x14005485b
lea r8, str.EXOPL
mov qword [rsp + 0x20], r8
mov r8, rdx
lea rdx, str._s__s__s_n
call fcn.1400311c0
add rsp, 0x38
ret
mov r9d, r8d
mov dword [rsp + 0x20], r10d
mov r8, rdx
lea rdx, str._s__d__d_n
call fcn.1400311c0
add rsp, 0x38
ret

Function at 0x140054c00
Capabilities:
Send data
Send data on socket

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
push rdi
sub rsp, 0x20
mov rbp, qword [rcx]
mov edi, r8d
mov esi, edx
mov byte [rax + 0x10], 0xff
xor r9d, r9d
mov byte [rax + 0x11], sil
mov rbx, rcx
mov byte [rax + 0x12], dil
mov rcx, qword [rcx + 0x4c0]
lea rdx, [rax + 0x10]
lea r8d, [r9 + 3]
call qword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x140054c5f
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.Sending_data_failed___d_
mov rcx, rbp
mov r8d, eax
call fcn.140031040
mov rcx, qword [rbx]
lea rdx, str.SENT
mov r9d, edi
mov r8d, esi
call fcn.140054790
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop rdi
ret
Function at 0x140054e10
Capabilities:
Send data
Send data on socket

Disassembly:
cmp edx, 0x1f
jne 0x140054fb8
push rbp
push rdi
push r14
sub rsp, 0x20
mov rbp, qword [rcx]
mov r14, rcx
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x58], r15
mov rdi, qword [rbp + 0x1e0]
lea rsi, [rdi + 0x1cb8]
lea rbx, [rdi + 0x1eb8]
mov qword [rbx], rsi
cmp rsi, rbx
jae 0x140054e75
lea rax, [rsi + 1]
mov byte [rsi], 0xff
mov qword [rbx], rax
cmp rax, rbx
jae 0x140054e75
mov byte [rax], 0xfa
inc qword [rbx]
mov rax, qword [rbx]
cmp rax, rbx
jae 0x140054e75
mov byte [rax], dl
inc qword [rbx]
movzx ecx, word [rdi + 0x1ca8]
call qword [sym.imp.WS2_32.dll_htons]
movzx ecx, word [rdi + 0x1caa]
movzx r15d, ax
mov word [rsp + 0x48], ax
call qword [sym.imp.WS2_32.dll_htons]
mov r9, qword [rbx]
movzx ecx, ax
cmp r9, rbx
jae 0x140054eac
mov byte [r9], r15b
inc qword [rbx]
mov r9, qword [rbx]
mov r15, qword [rsp + 0x58]
cmp r9, rbx
jae 0x140054f02
movzx eax, byte [rsp + 0x49]
mov byte [r9], al
inc qword [rbx]
mov r9, qword [rbx]
cmp r9, rbx
jae 0x140054f02
mov byte [r9], cl
inc qword [rbx]
mov r9, qword [rbx]
cmp r9, rbx
jae 0x140054f02
shr cx, 8
mov byte [r9], cl
inc qword [rbx]
mov r9, qword [rbx]
cmp r9, rbx
jae 0x140054f02
mov byte [r9], 0xff
inc qword [rbx]
mov r9, qword [rbx]
cmp r9, rbx
jae 0x140054f02
mov byte [r9], 0xf0
mov r9, qword [rbx]
inc r9
mov qword [rdi + 0x1ec0], r9
lea r8, [rdi + 0x1cba]
sub r9, rsi
mov qword [rbx], rsi
sub r9, 2
mov edx, 0x3e
mov rcx, rbp
call fcn.1400548c0
mov rcx, qword [r14 + 0x4c0]
xor r9d, r9d
mov rdx, rsi
lea r8d, [r9 + 3]
call qword [sym.imp.WS2_32.dll_send]
mov rsi, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x40]
test eax, eax
jns 0x140054f64
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.Sending_data_failed___d_
mov rcx, rbp
mov r8d, eax
call fcn.140031040
lea rdx, [rdi + 0x1cbb]
mov r8d, 4
mov rcx, r14
call fcn.140054c90
mov rcx, qword [r14 + 0x4c0]
lea rdx, [rdi + 0x1cbf]
xor r9d, r9d
lea r8d, [r9 + 2]
call qword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x140054fb0
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.Sending_data_failed___d_
mov rcx, rbp
mov r8d, eax
call fcn.140031040
add rsp, 0x20
pop r14
pop rdi
pop rbp
ret
Function at 0x140056720
Capabilities:
Receive data
Receive data on socket

Disassembly:
push rbx
push rdi
push r14
sub rsp, 0xd0
mov rax, qword [0x140088080]
xor rax, rsp
mov qword [rsp + 0xc0], rax
mov rbx, qword [rcx + 0xa00]
lea rax, [rsp + 0x30]
mov rdi, qword [rcx]
mov r14, rcx
mov dword [rsp + 0x30], 0x80
xor r9d, r9d
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x40]
mov r8d, dword [rbx + 0x15c]
mov rdx, qword [rbx + 0x168]
add r8d, 4
mov rcx, qword [rbx + 0x18]
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_recvfrom]
cmp dword [rbx + 0x150], 0
mov dword [rbx + 0x154], eax
jne 0x1400567b5
movsxd r8, dword [rsp + 0x30]
lea rcx, [rbx + 0xd0]
lea rdx, [rsp + 0x40]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [rsp + 0x30]
mov dword [rbx + 0x150], eax
mov r8d, dword [rbx + 0x154]
mov qword [rsp + 0xf8], rbp
mov qword [rsp + 0x100], rsi
cmp r8d, 4
jge 0x140056816
lea rdx, str.Received_too_short_packet
mov rcx, rdi
call fcn.140031040
mov dword [rbx + 0xc], 7
xor eax, eax
mov rsi, qword [rsp + 0x100]
mov rbp, qword [rsp + 0xf8]
mov rcx, qword [rsp + 0xc0]
xor rcx, rsp
call fcn.1400698b0
add rsp, 0xd0
pop r14
pop rdi
pop rbx
ret
mov rdx, qword [rbx + 0x168]
movzx eax, byte [rdx]
movzx ecx, byte [rdx + 1]
shl eax, 8
or ecx, eax
mov dword [rbx + 0xc], ecx
sub ecx, 3
je 0x1400568d1
sub ecx, 1
je 0x140056944
sub ecx, 1
je 0x140056880
cmp ecx, 1
je 0x140056863
lea r8, str.Internal_error:_Unexpected_packet
mov rcx, rdi
lea rdx, [0x140076b40]
call fcn.140031040
jmp 0x140056944
add r8d, 0xfffffffe
add rdx, 2
mov rcx, rbx
call fcn.140056450
test eax, eax
je 0x140056944
jmp 0x1400567ea
movzx ecx, byte [rdx + 2]
lea eax, [r8 - 4]
movsxd rbp, eax
lea rsi, [rdx + 4]
movzx eax, byte [rdx + 3]
mov r8, rbp
shl ecx, 8
xor edx, edx
or ecx, eax
mov dword [rbx + 8], ecx
mov rcx, rsi
call sub.VCRUNTIME140.dll_memchr
test rax, rax
je 0x140056944
sub rax, rsi
cmp rax, rbp
jae 0x140056944
mov r8, rsi
lea rdx, str.TFTP_error:__s_n
mov rcx, rdi
call fcn.1400311c0
jmp 0x140056944
cmp r8d, 4
jle 0x140056944
movzx eax, byte [rdx + 3]
movzx ecx, byte [rdx + 2]
shl ecx, 8
or ecx, eax
movzx eax, word [rbx + 0x48]
inc eax
movzx eax, ax
cmp eax, ecx
jne 0x140056944
lea eax, [r8 - 4]
mov rcx, r14
lea r8, [rdx + 4]
movsxd r9, eax
mov edx, 1
call fcn.140030f60
mov esi, eax
test eax, eax
je 0x140056923
mov edx, 5
mov rcx, rbx
call fcn.140057410
mov eax, esi
jmp 0x1400567ea
mov eax, dword [rbx + 0x154]
mov rcx, rdi
sub eax, 4
cdqe
add qword [rdi + 0xf8], rax
mov rdx, qword [rdi + 0xf8]
call fcn.14003f840
mov rcx, r14
call fcn.14003fb20
test eax, eax
je 0x1400567e8
mov edx, 5
mov rcx, rbx
call fcn.140057410
mov eax, Ordinal_45
jmp 0x1400567ea
Function at 0x1400696e0
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 0x140069722
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 0x140069769
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 0x1400697c2
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 0x140069780
mov eax, dword [rbx + 0x1c]
cmp rsi, rax
jae 0x140069803
nop word [rax + rax]
mov rcx, qword [rdi + 8]
lea rdx, [0x14007c2ca]
mov r8d, 1
call qword [rbx + reloc.WS2_32.dll_htonl]
mov rcx, qword [rdi + 0x10]
lea rdx, [0x14007c2cb]
mov r8d, 1
call qword [rbx + reloc.WS2_32.dll_htonl]
mov eax, dword [rbx + 0x1c]
inc rsi
cmp rsi, rax
jb 0x1400697d0
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 0x14006a6cc
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x14006a716
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x14006a716
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x14006a716
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x14006a716
cmp dword [rcx + 0x84], 0xe
jbe 0x14006a716
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x14006a718
xor al, al
add rsp, 0x28
ret
Function at 0x140aed058
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.140aed1df
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 0x140aed089
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140aed06f
add dl, dl
jne 0x140aed096
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140aed0f6
xor eax, eax
add dl, dl
jne 0x140aed0a5
mov dl, byte [rsi]
inc rsi
adc dl, dl
jae 0x140aed1ad
add dl, dl
jne 0x140aed0b6
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140aed0c3
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140aed0d0
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140aed0dd
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
je 0x140aed0ea
push rdi
mov eax, eax
sub rdi, rax
mov al, byte [rdi]
pop rdi
mov byte [rdi], al
inc rdi
mov ebx, 2
jmp 0x140aed07e
mov eax, 1
add dl, dl
jne 0x140aed106
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x140aed113
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140aed0fb
sub eax, ebx
mov ebx, 1
jne 0x140aed14c
mov ecx, 1
add dl, dl
jne 0x140aed12e
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x140aed13b
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140aed123
push rsi
mov rsi, rdi
sub rsi, rbp
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140aed07e
dec eax
shl eax, 8
mov al, byte [rsi]
inc rsi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x140aed168
mov dl, byte [rsi]
inc rsi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x140aed175
mov dl, byte [rsi]
inc rsi
adc dl, dl
jb 0x140aed15d
cmp eax, 0x7d00
jae 0x140aed19b
cmp eax, 0x500
jb 0x140aed196
inc ecx
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140aed07e
cmp eax, 0x7f
ja 0x140aed19e
add ecx, 2
push rsi
mov rsi, rdi
sub rsi, rax
rep movsb byte [rdi], byte [rsi]
pop rsi
jmp 0x140aed07e
mov al, byte [rsi]
inc rsi
xor ecx, ecx
shr al, 1
je 0x140aed1d2
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 0x140aed07e
pop r10
sub rdi, qword [r10 + 0x20]
mov eax, edi
pop r10
ret 0x20
Function at 0x140001bf0
Capabilities:
Parse pe header

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

Function at 0x140008d7c
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x140008b78
Function at 0x14000db10
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 0x14000db40
xor eax, eax
jmp 0x14000dc03
mov rbp, rbx
cmp word [rax], si
je 0x14000db65
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], si
jne 0x14000db4c
lea rbp, [rbp + rax*2]
add rbp, 2
cmp word [rbp], si
jne 0x14000db48
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.14000da30
movsxd r14, eax
test eax, eax
jne 0x14000dba3
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x14000db39
mov rcx, r14
call fcn.14000c108
mov rdi, rax
test rax, rax
jne 0x14000dbbc
xor ecx, ecx
call fcn.14000b5a0
jmp 0x14000db98
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.14000da30
test eax, eax
jne 0x14000dbed
mov rcx, rdi
call fcn.14000b5a0
jmp 0x14000dbf7
xor ecx, ecx
call fcn.14000b5a0
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 0x1400102f4
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.14000779c
mov rax, qword [rbp - 0x31]
mov ebx, 0xfde9
cmp dword [rax + 0xc], ebx
jne 0x14001037e
cmp byte [rbp - 0x21], r15b
je 0x140010379
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, ebx
jmp 0x1400103b4
call fcn.14000a3ac
test eax, eax
jne 0x1400103a0
cmp byte [rbp - 0x21], r15b
je 0x140010398
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov r9d, 1
jmp 0x1400103b4
cmp byte [rbp - 0x21], r15b
je 0x1400103b1
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.14000c17c
test eax, eax
jne 0x140010454
xor edx, edx
lea rcx, [rbp - 0x39]
call fcn.14000779c
mov rax, qword [rbp - 0x31]
cmp dword [rax + 0xc], ebx
jne 0x1400103f3
cmp byte [rbp - 0x21], r15b
je 0x140010428
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
jmp 0x140010428
call fcn.14000a3ac
test eax, eax
jne 0x140010414
cmp byte [rbp - 0x21], r15b
je 0x14001040d
mov rax, qword [rbp - 0x39]
and dword [rax + 0x3a8], 0xfffffffd
mov ebx, 1
jmp 0x140010428
cmp byte [rbp - 0x21], r15b
je 0x140010425
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.14000c17c
mov rdi, qword [rbp - 9]
test eax, eax
jne 0x140010454
mov rcx, qword [rbp + 0x27]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ebx, eax
jmp 0x140010457
mov ebx, r15d
cmp byte [rbp + 0xf], r15b
je 0x140010465
mov rcx, rdi
call fcn.14000b5a0
cmp byte [rbp + 0x3f], r15b
je 0x140010474
mov rcx, qword [rbp + 0x27]
call fcn.14000b5a0
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 0x1400118d0
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x1400118f8
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x1400118f8
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x401530
Capabilities:
Read file on windows

Disassembly:
push rbx
sub rsp, 0x20
mov eax, dword [0x004eb04c]
test eax, eax
mov rbx, rcx
jle 0x401588
mov r9, qword [0x004eb040]
mov edx, edx
mov r8d, 1
call sub.msvcrt.dll_fread
cmp eax, 1
jne 0x401568
mov rax, rbx
add rsp, 0x20
pop rbx
ret
mov rcx, qword [0x004eb040]
call sub.msvcrt.dll_feof
test eax, eax
je 0x401588
mov dword [0x004eb048], 2
nop word [rax + rax]
xor ebx, ebx
jmp 0x40155b

Function at 0x401590
Capabilities:
Read file on windows

Disassembly:
sub rsp, 0x38
mov ecx, dword [0x004eb04c]
test ecx, ecx
jle 0x4015f2
lea rcx, [rsp + 0x2c]
mov r8d, 1
mov edx, 4
mov r9, qword [0x004eb040]
call sub.msvcrt.dll_fread
cmp eax, 1
jne 0x4015d8
mov edx, dword [0x004eb050]
mov eax, dword [rsp + 0x2c]
test edx, edx
je 0x4015cf
bswap eax
add rsp, 0x38
ret
mov rcx, qword [0x004eb040]
call sub.msvcrt.dll_feof
test eax, eax
je 0x4015f2
mov dword [0x004eb048], 2
xor eax, eax
add rsp, 0x38
ret

Function at 0x402880
Capabilities:
Query environment variable

Disassembly:
push rbx
sub rsp, 0x20
test edx, edx
mov rbx, rcx
je 0x4028a0
sub edx, 1
test edx, edx
jle 0x4028be
mov dword [rbx + 0x80], edx
add rsp, 0x20
pop rbx
ret
mov rax, qword [rcx]
mov rax, qword [rax + 8]
mov rcx, qword [rax + 0xc0]
call sub.msvcrt.dll__fileno_1
mov ecx, eax
call sub.msvcrt.dll__isatty
test eax, eax
jne 0x4028d0
mov edx, 0x7fffffff
mov dword [rbx + 0x80], edx
add rsp, 0x20
pop rbx
ret
lea rcx, str.COLUMNS
call sub.msvcrt.dll_getenv
test rax, rax
mov rcx, rax
je 0x4028f8
call sub.msvcrt.dll_atoi
test eax, eax
jle 0x4028f8
lea edx, [rax - 1]
jmp 0x40288f
mov edx, 0x7ffffffe
jmp 0x402893
Function at 0x402900
Capabilities:
Query environment variable

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rbx, rcx
mov ecx, 0x48
mov esi, edx
call fcn.00457cb0
xor edx, edx
mov rcx, rax
mov qword [rbx], rax
call fcn.00412250
lea rdx, [rbx + 0x10]
xor eax, eax
mov ecx, 7
mov rdi, rdx
rep stosq qword [rdi], rax
movsxd rcx, esi
shl rcx, 2
mov dword [rdi], 0
mov byte [rbx + 0x4c], 0
mov dword [rbx + 0x50], esi
call fcn.00457cb0
test esi, esi
mov rcx, rax
mov qword [rbx + 0x58], rax
jle 0x402966
mov r8d, esi
xor edx, edx
shl r8, 2
call sub.msvcrt.dll_memset
mov rax, qword [rbx]
mov rcx, rbx
mov byte [rbx + 0x7c], 0
lea rdi, [0x004066c0]
mov edx, dword [rax + 0x28]
call fcn.00402880
xor eax, eax
xor edx, edx
xor ecx, ecx
mov word [rbx + 0x94], ax
movq xmm0, rdi
lea rax, [0x00404dc0]
mov word [rbx + 0x120], cx
movq xmm1, rax
mov dword [rbx + 0x84], 0x5e5e5e
lea rax, [0x004021a0]
punpcklqdq xmm0, xmm1
mov byte [rbx + 0x88], 0
movups xmmword [rbx + 0xa8], xmm0
lea rcx, str.GCC_EXTRA_DIAGNOSTIC_OUTPUT
pxor xmm0, xmm0
mov qword [rbx + 0x8c], 0
mov dword [rbx + 0x98], 0
mov word [rbx + 0x9c], dx
mov byte [rbx + 0x9e], 0
mov dword [rbx + 0xa0], 0
mov qword [rbx + 0xb8], rax
movups xmmword [rbx + 0xc0], xmm0
mov qword [rbx + 0xd0], 0
movups xmmword [rbx + 0xd8], xmm0
mov dword [rbx + 0x100], 0
mov qword [rbx + 0x108], 0
mov qword [rbx + 0xf8], 0
mov dword [rbx + 0x110], 0
mov qword [rbx + 0x118], 0
call sub.msvcrt.dll_getenv
test rax, rax
mov rsi, rax
je 0x402a7e
lea rdx, str.fixits_v1
mov rcx, rax
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x402ae8
mov dword [rbx + 0x124], 1
movabs rax, 0x100000000
pxor xmm0, xmm0
mov qword [rbx + 0x130], 8
mov qword [rbx + 0x128], rax
lea rax, [0x00402200]
mov qword [rbx + 0x138], 0
mov qword [rbx + 0x140], 0
movups xmmword [rbx + 0x148], xmm0
mov qword [rbx + 0x158], rax
mov qword [rbx + 0x168], 0
movups xmmword [rbx + 0x170], xmm0
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
lea rdx, str.fixits_v2
mov rcx, rsi
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x402a7e
mov dword [rbx + 0x124], 2
jmp 0x402a7e
Function at 0x406700
Capabilities:
Query environment variable

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea rcx, str.GCC_COLORS
call sub.msvcrt.dll_getenv
test rax, rax
mov rbp, rax
je 0x40687c
movzx r14d, byte [rax]
xor eax, eax
test r14b, r14b
je 0x406881
lea rdi, [rbp + 1]
xor r13d, r13d
xor esi, esi
xor r12d, r12d
jmp 0x406770
test r12, r12
je 0x406768
cmp r14b, 0x3b
je 0x406768
sub r14d, 0x30
cmp r14b, 9
ja 0x40687c
nop dword [rax]
movzx r14d, byte [rdi]
add rdi, 1
lea rax, [rdi - 1]
test r14b, r14b
je 0x4067a8
cmp r14b, 0x3a
je 0x4067a8
cmp r14b, 0x3d
jne 0x406748
cmp rax, rbp
je 0x40687c
test r12, r12
jne 0x40687c
sub rax, rbp
mov r12, rdi
mov rsi, rax
jmp 0x406768
test r12, r12
mov rcx, qword [0x00482020]
je 0x406868
lea rbx, [0x00482020]
sub rax, r12
test rcx, rcx
mov r13, rax
je 0x4067fd
lea rbx, [0x00482020]
jmp 0x4067e5
mov rcx, qword [rbx + 0x18]
add rbx, 0x18
test rcx, rcx
je 0x4067fd
movzx eax, byte [rbx + 0x10]
cmp rax, rsi
jne 0x4067d8
mov r8, rsi
mov rdx, rbp
call sub.msvcrt.dll_memcmp
test eax, eax
jne 0x4067d8
test r12, r12
mov rcx, qword [rbx + 8]
je 0x406851
test rcx, rcx
je 0x406851
cmp byte [rbx + 0x11], 0
jne 0x406890
lea rcx, [r13 + 7]
call fcn.00457cb0
mov r8, r13
mov rdx, r12
mov rbp, rax
mov eax, 0x5b1b
mov word [rbp], ax
lea rcx, [rbp + 2]
call sub.msvcrt.dll_memcpy
lea rax, [rbp + r13 + 2]
mov qword [rbx + 8], rbp
mov dword [rax], 0x4b5b1b6d
mov byte [rax + 4], 0
mov byte [rbx + 0x11], 1
movzx r14d, byte [rdi - 1]
test r14b, r14b
je 0x40687c
mov rbp, rdi
xor r12d, r12d
jmp 0x406768
sub rax, rbp
test rcx, rcx
mov rsi, rax
jne 0x4067ca
test r14b, r14b
jne 0x406856
mov eax, 1
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
call fcn.004694f0
jmp 0x406811
sub rsp, 0x38
cmp ecx, 1
je 0x40698f
cmp ecx, 2
jne 0x406970
mov ecx, 0xfffffff4
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov rcx, rax
lea rax, [rax - 1]
cmp rax, 0xfffffffffffffffd
jbe 0x406980
xor eax, eax
add rsp, 0x38
ret
test ecx, ecx
je 0x406966
jmp 0x47fa80
lea rdx, [rsp + 0x2c]
call qword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
je 0x406966
add rsp, 0x38
jmp 0x406700