joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402720
Capabilities:
Clear file content

Disassembly:
push esi
mov esi, dword [esp + 8]
mov eax, dword [esi + 0x91c]
test eax, eax
jne 0x40278b
test byte [esi], 2
je 0x40275e
cmp byte [esi + 1], al
jne 0x40275e
push dword [esi + 0x920]
call sub.KERNEL32.dll_SetEndOfFile
test al, al
jne 0x40275e
push 0
push 0x4378e4
push str.truncate
push 0x430da0
call sym.align_comments.exe__sys_sys_error_bomb_16
cmp byte [esi + 1], 6
je 0x402798
push dword [esi + 0x920]
call fcn.0040b734
test al, al
jne 0x402798
push 0
push 0x4378e4
push str.close
push 0x430da0
call sym.align_comments.exe__sys_sys_error_bomb_16
jmp 0x402798
push esi
call eax
mov dword [esi + 0x91c], 0
add esi, 0x918
cmp dword [esi], 0
je 0x4027a9
push esi
call sym.align_comments.exe__sys_mem_dealloc_4
pop esi
ret 4

Function at 0x403240
Capabilities:
Read file on windows

Disassembly:
push esi
mov esi, dword [esp + 0x18]
push edi
push esi
call sym.align_comments.exe__sys_error_none_4
mov edi, dword [esp + 0x10]
test edi, edi
je 0x4032d9
push ebx
push dword [0x437994]
lea eax, [esp + 0x24]
push eax
mov eax, dword [esp + 0x18]
push edi
push dword [esp + 0x24]
push dword [eax + 0x920]
call sub.KERNEL32.dll_ReadFile
mov ebx, dword [esp + 0x1c]
test al, al
jne 0x40329b
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x6d
je 0x4032a5
mov dword [esi + 0xc], eax
mov eax, ebx
pop ebx
pop edi
pop esi
mov dword [eax], 0
ret 0x14
mov eax, dword [esp + 0x20]
mov dword [ebx], eax
test eax, eax
jne 0x4032bb
push esi
push 1
push 0xfffffffffffffffd
mov dword [ebx], 0
call sym.align_comments.exe__sys_stat_set_12
pop ebx
pop edi
pop esi
ret 0x14
cmp eax, edi
jae 0x4032d8
push esi
push 0xa
push 0xfffffffffffffffd
call sym.align_comments.exe__sys_stat_set_12
push esi
push edi
call sym.align_comments.exe__sys_stat_parm_int_8
push esi
push dword [ebx]
call sym.align_comments.exe__sys_stat_parm_int_8
pop ebx
pop edi
pop esi
ret 0x14

Function at 0x403560
Capabilities:
Write file on windows

Disassembly:
mov eax, dword [esp + 4]
lea ecx, [esp + 4]
push ebx
push edi
push dword [0x437998]
movsx ebx, word [eax + 2]
add eax, 4
mov edi, dword [esp + 0x14]
push ecx
push ebx
push eax
push dword [edi + 0x920]
call sub.KERNEL32.dll_WriteFile
test al, al
jne 0x40359e
call sub.KERNEL32.dll_GetLastError
mov ecx, dword [esp + 0x14]
pop edi
pop ebx
mov dword [ecx + 0xc], eax
ret 0xc
cmp dword [esp + 0xc], ebx
jne 0x4035e5
push dword [0x437998]
lea eax, [esp + 0x10]
mov ebx, 2
push eax
push ebx
push 0x430f38
push dword [edi + 0x920]
call sub.KERNEL32.dll_WriteFile
test al, al
je 0x40358d
cmp dword [esp + 0xc], ebx
jne 0x4035e5
mov eax, dword [edi + 0x914]
test eax, eax
js 0x403613
inc eax
mov dword [edi + 0x914], eax
pop edi
pop ebx
ret 0xc
push esi
mov esi, dword [esp + 0x18]
push esi
push 9
push 0xfffffffffffffffd
call sym.align_comments.exe__sys_stat_set_12
push esi
lea eax, [edi + 0x50c]
push eax
call sym.align_comments.exe__sys_stat_parm_vstr_8
push esi
push ebx
call sym.align_comments.exe__sys_stat_parm_int_8
push esi
push dword [esp + 0x14]
call sym.align_comments.exe__sys_stat_parm_int_8
pop esi
pop edi
pop ebx
ret 0xc
Function at 0x4037a0
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x10
push esi
mov esi, dword [esp + 0x24]
push esi
call sym.align_comments.exe__sys_error_none_4
lea eax, [esp + 0x24]
mov dword [esp + 0x24], 0x10
push eax
lea eax, [esp + 8]
push eax
mov eax, dword [esp + 0x20]
push dword [eax + 0x920]
call sub.WS2_32.dll_getsockname
test eax, eax
je 0x4037e2
call sub.WS2_32.dll_WSAGetLastError
mov dword [esi + 0xc], eax
pop esi
add esp, 0x10
ret 0x10
push 4
lea eax, [esp + 0xc]
push eax
call sym.align_comments.exe__sys_order_flip_8
push 2
lea eax, [esp + 0xa]
push eax
call sym.align_comments.exe__sys_order_flip_8
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 8]
pop esi
mov dword [ecx], eax
mov ecx, dword [esp + 0x1c]
mov ax, word [esp + 2]
mov word [ecx], ax
add esp, 0x10
ret 0x10

Function at 0x403870
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket

Disassembly:
sub esp, 0x10
push esi
mov esi, dword [esp + 0x24]
push edi
push esi
call sym.align_comments.exe__sys_error_none_4
call sym.align_comments.exe__sys_sys_netstart_0
push 0
push 1
push 2
call sub.WS2_32.dll_socket
mov edi, eax
cmp edi, 0xffffffff
jne 0x4038a6
call sub.WS2_32.dll_WSAGetLastError
pop edi
mov dword [esi + 0xc], eax
pop esi
add esp, 0x10
ret 0x10
lea eax, [esp + 8]
push eax
call sym.align_comments.exe__file_inet_sockaddr_init_4
mov eax, dword [esp + 0x1c]
mov dword [esp + 0xc], eax
mov ax, word [esp + 0x20]
mov word [esp + 0xa], ax
lea eax, [esp + 0xc]
push 4
push eax
call sym.align_comments.exe__sys_order_flip_8
push 2
lea eax, [esp + 0xe]
push eax
call sym.align_comments.exe__sys_order_flip_8
push dword [0x430f44]
lea eax, [esp + 0xc]
push eax
push edi
call sub.WS2_32.dll_connect
test eax, eax
jne 0x403896
mov esi, dword [esp + 0x24]
push esi
call fcn.00403e10
mov dword [esi + 0x920], edi
pop edi
pop esi
add esp, 0x10
ret 0x10
Function at 0x403b40
Capabilities:
Create tcp socket
Create udp socket
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x10
push esi
push edi
mov edi, dword [esp + 0x28]
push edi
call sym.align_comments.exe__sys_error_none_4
call sym.align_comments.exe__sys_sys_netstart_0
push 0
push 1
push 2
call sub.WS2_32.dll_socket
mov esi, dword [esp + 0x24]
mov dword [esi + 4], eax
cmp eax, 0xffffffff
jne 0x403b7b
call sub.WS2_32.dll_WSAGetLastError
mov dword [edi + 0xc], eax
pop edi
pop esi
add esp, 0x10
ret 0x10
lea eax, [esp + 8]
push eax
call sym.align_comments.exe__file_inet_sockaddr_init_4
mov ax, word [esp + 0x20]
mov word [esp + 0xa], ax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0xc], eax
lea eax, [esp + 0xc]
push 4
push eax
call sym.align_comments.exe__sys_order_flip_8
push 2
lea eax, [esp + 0xe]
push eax
call sym.align_comments.exe__sys_order_flip_8
push dword [0x430f40]
lea eax, [esp + 0xc]
push eax
push dword [esi + 4]
call sub.WS2_32.dll_bind
test eax, eax
jne 0x403c12
lea eax, [esp + 0x28]
mov dword [esp + 0x28], 0x10
push eax
lea eax, [esp + 0xc]
push eax
push dword [esi + 4]
call sub.WS2_32.dll_getsockname
test eax, eax
jne 0x403c12
push 4
lea eax, [esp + 0x10]
push eax
call sym.align_comments.exe__sys_order_flip_8
push 2
lea eax, [esp + 0xe]
push eax
call sym.align_comments.exe__sys_order_flip_8
mov ax, word [esp + 0xa]
push 8
push dword [esi + 4]
mov word [esi], ax
call sub.WS2_32.dll_listen
test eax, eax
je 0x403c22
call sub.WS2_32.dll_WSAGetLastError
mov dword [edi + 0xc], eax
push dword [esi + 4]
call sub.WS2_32.dll_closesocket
pop edi
pop esi
add esp, 0x10
ret 0x10

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

Disassembly:
push esi
mov esi, dword [esp + 0x18]
push esi
call sym.align_comments.exe__sys_error_none_4
mov eax, dword [esp + 0xc]
push 0x10
push dword [eax + 0x918]
push 0
push dword [esp + 0x1c]
push dword [esp + 0x18]
push dword [eax + 0x920]
call sub.WS2_32.dll_sendto
mov ecx, eax
mov eax, dword [esp + 0x14]
test ecx, ecx
jns 0x403c78
mov dword [eax], 0
call sub.WS2_32.dll_WSAGetLastError
mov dword [esi + 0xc], eax
pop esi
ret 0x14
mov dword [eax], ecx
cmp ecx, dword [esp + 0x10]
je 0x403c8a
push esi
push 0x1c
push 0xfffffffffffffffd
call sym.align_comments.exe__sys_stat_set_12
pop esi
ret 0x14
Function at 0x403c90
Capabilities:
Create udp socket

Disassembly:
push esi
mov esi, dword [esp + 0x14]
push edi
push esi
call sym.align_comments.exe__sys_error_none_4
call sym.align_comments.exe__sys_sys_netstart_0
push 0
push 2
push 2
call sub.WS2_32.dll_socket
mov edi, eax
cmp edi, 0xffffffff
jne 0x403cc0
call sub.WS2_32.dll_WSAGetLastError
pop edi
mov dword [esi + 0xc], eax
pop esi
ret 0x10
lea eax, [esp + 0x18]
push eax
push 0x10
call sym.align_comments.exe__sys_mem_alloc_8
mov eax, dword [esp + 0x18]
mov ecx, 2
push 4
mov word [eax], cx
mov ecx, dword [esp + 0x1c]
mov ax, word [esp + 0x14]
mov word [ecx + 2], ax
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x10]
mov dword [ecx + 4], eax
mov eax, dword [esp + 0x1c]
add eax, 4
push eax
call sym.align_comments.exe__sys_order_flip_8
mov eax, dword [esp + 0x18]
push 2
add eax, 2
push eax
call sym.align_comments.exe__sys_order_flip_8
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
mov dword [ecx + 0x920], edi
pop edi
mov word [ecx], 0xa03
mov byte [ecx + 2], 0
mov dword [ecx + 4], 0x400
mov dword [ecx + 0x408], 0x100
mov dword [ecx + 0x50c], 0x400
mov dword [ecx + 0x910], 0
mov dword [ecx + 0x914], 0xfffffffe
mov dword [ecx + 0x918], eax
mov dword [ecx + 0x91c], 0x403840
pop esi
ret 0x10
Function at 0x403e90
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x1c
push esi
mov esi, dword [esp + 0x30]
push edi
push esi
call sym.align_comments.exe__sys_error_none_4
mov edi, dword [esp + 0x30]
test edi, edi
je 0x404031
push ebx
mov ebx, dword [esp + 0x30]
push ebp
mov ebp, dword [ebx + 0x918]
test ebp, ebp
jne 0x403ee3
push 1
call fcn.0040e20c
push eax
push 0x36
push 1
push str.INTERNAL_ERROR:_Data_pointer_NIL_in_FILE_READ_INETSTR.
call fcn.0040e4a1
push 0x430fc0
call fcn.00404180
add esp, 0x18
call sym.align_comments.exe__sys_bomb_0
push 0x4379b4
push 0
push 1
push dword [0x4379b0]
mov dword [esp + 0x30], 0
mov dword [esp + 0x34], 0
call sub.KERNEL32.dll_CreateEventA
mov dword [esp + 0x28], eax
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x40]
push eax
push edi
push dword [esp + 0x3c]
push dword [ebx + 0x920]
call sub.KERNEL32.dll_WriteFile
test al, al
jne 0x403ff8
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x3e5
jne 0x403fc5
movss xmm0, dword [ebp + 4]
or eax, 0xffffffff
comiss xmm0, dword [0x423220]
jbe 0x403f8f
movsd xmm1, qword [0x423230]
sub esp, 8
cvtps2pd xmm0, xmm0
mulsd xmm0, qword [0x423238]
maxsd xmm1, xmm0
addsd xmm1, qword [0x423228]
movsd qword [esp + 0x18], xmm1
fld qword [esp + 0x18]
fstp qword [esp]
call fcn.0040f8e0
fstp qword [esp + 0x18]
cvttsd2si eax, qword [esp + 0x18]
add esp, 8
push eax
push dword [esp + 0x2c]
call sub.KERNEL32.dll_WaitForSingleObject
cmp eax, 0x102
je 0x403fdb
cmp eax, 0xffffffff
je 0x403fc0
push 1
lea eax, [esp + 0x40]
push eax
lea eax, [esp + 0x20]
push eax
push dword [ebx + 0x920]
call sub.KERNEL32.dll_GetOverlappedResult
test al, al
jne 0x403ff8
call sub.KERNEL32.dll_GetLastError
push dword [esp + 0x28]
mov dword [esi + 0xc], eax
call fcn.0040b734
pop ebp
pop ebx
pop edi
pop esi
add esp, 0x1c
ret 0x10
push esi
push 0x20
push 0xfffffffffffffffd
call sym.align_comments.exe__sys_stat_set_12
push dword [esp + 0x28]
call fcn.0040b734
pop ebp
pop ebx
pop edi
pop esi
add esp, 0x1c
ret 0x10
cmp dword [esp + 0x3c], edi
je 0x404026
push esi
push 9
push 0xfffffffffffffffd
call sym.align_comments.exe__sys_stat_set_12
push esi
lea eax, [ebx + 0x50c]
push eax
call sym.align_comments.exe__sys_stat_parm_vstr_8
push esi
push edi
call sym.align_comments.exe__sys_stat_parm_int_8
push esi
push dword [esp + 0x40]
call sym.align_comments.exe__sys_stat_parm_int_8
push dword [esp + 0x28]
call fcn.0040b734
pop ebp
pop ebx
pop edi
pop esi
add esp, 0x1c
ret 0x10
Function at 0x4040a0
Capabilities:
Resolve dns

Disassembly:
sub esp, 0x400
push ebx
mov ebx, dword [esp + 0x40c]
push esi
mov esi, dword [esp + 0x414]
push edi
mov edi, dword [esp + 0x410]
push esi
push ebx
push edi
call sym.align_comments.exe__string_t_inetadr_12
push esi
call sym.align_comments.exe__sys_error_4
test al, al
je 0x40413c
push ebp
push esi
call sym.align_comments.exe__sys_error_none_4
call sym.align_comments.exe__sys_sys_netstart_0
movsx ebp, word [edi + 2]
cmp dword [0x430f3c], ebp
cmovl ebp, dword [0x430f3c]
cmp ebp, 1
jl 0x404104
lea eax, [edi + 4]
push ebp
push eax
lea eax, [esp + 0x18]
push eax
call fcn.0040b830
add esp, 0xc
mov al, byte [0x4379a4]
mov byte [esp + ebp + 0x10], al
lea eax, [esp + 0x10]
push eax
call sub.WS2_32.dll_gethostbyname
pop ebp
test eax, eax
jne 0x404148
call sub.WS2_32.dll_WSAGetLastError
mov dword [esi + 0xc], eax
cmp eax, 0x2af9
jne 0x40413c
push esi
push 0xf
push 0xfffffffffffffffd
call sym.align_comments.exe__sys_stat_set_12
push esi
push edi
call sym.align_comments.exe__sys_stat_parm_vstr_8
pop edi
pop esi
pop ebx
add esp, 0x400
ret 0xc
mov eax, dword [eax + 0xc]
test eax, eax
je 0x40412b
mov eax, dword [eax]
test eax, eax
je 0x40412b
mov eax, dword [eax]
push 4
push ebx
mov dword [ebx], eax
call sym.align_comments.exe__sys_order_flip_8
pop edi
pop esi
pop ebx
add esp, 0x400
ret 0xc

Function at 0x405320
Capabilities:
Accept command line arguments

Disassembly:
mov eax, 0x1070
call fcn.0040abd0
call sym.align_comments.exe__sys_init_0
call sym.align_comments.exe__util_init_0
mov eax, 4
mov dword [0x43aa24], 0x400
mov word [esp], ax
movzx eax, word [0x4310f0]
push eax
push dword [esp + 0x1080]
mov dword [0x43ae28], 0x100
push 0x43ae28
mov dword [0x43af2c], 0x20
mov dword [0x438a00], 0x2000
call sym.align_comments.exe__string_vstring_12
mov byte [0x4379bc], 1
call sub.KERNEL32.dll_GetCommandLineA
test eax, eax
je 0x4053a1
movzx ecx, word [0x4310f0]
push ecx
push eax
push 0x438a00
call sym.align_comments.exe__string_vstring_12
mov eax, 1
mov word [0x43aa04], ax
lea eax, [esp + 8]
push eax
lea eax, [esp + 4]
push eax
push 0x43aa04
push 0x438a00
call sym.align_comments.exe__string_token_16
mov ax, word [0x43aa04]
mov word [0x43aa06], ax
mov dword [0x43aa20], 1
mov byte [0x43af50], 0
add esp, 0x1070
ret 0xc
Function at 0x4073f0
Capabilities:
Get disk information

Disassembly:
push ecx
cmp byte [0x437b70], 0
jne 0x4074cf
mov al, byte [0x437b71]
push ebx
mov ebx, 0x41
mov dword [0x437b74], 0x30004
mov word [0x437b79], 0x5c3a
mov byte [0x437b7b], al
mov byte [0x437b70], 1
mov byte [esp + 7], 0x20
mov byte [esp + 6], 0x20
mov byte [0x437b78], bl
nop dword [eax + eax]
push 0x437b78
call sub.KERNEL32.dll_GetDriveTypeA
add eax, 0xfffffffe
cmp eax, 3
ja case.default.0x407452
jmp dword [eax*4 + 0x4074e4]
mov al, byte [esp + 7]
mov dl, byte [esp + 6]
cmp al, 0x20
jne 0x407492
mov al, byte [0x437b78]
mov byte [esp + 7], al
jmp 0x407492
cmp byte [esp + 6], 0x20
movzx edx, byte [esp + 6]
movzx eax, byte [0x437b78]
cmove edx, eax
mov byte [esp + 6], dl
jmp 0x40748e
mov dl, byte [esp + 6]
mov al, byte [esp + 7]
inc ebx
mov byte [0x437b78], bl
cmp ebx, 0x5a
jle 0x407440
cmp al, 0x20
je 0x4074ba
pop ebx
push dword [esp + 8]
mov byte [0x437b78], al
push 0x437b74
call sym.align_comments.exe__string_copy_8
pop ecx
ret 4
cmp dl, 0x20
movzx eax, dl
mov ecx, 0x43
cmovne ecx, eax
mov byte [0x437b78], cl
pop ebx
push dword [esp + 8]
push 0x437b74
call sym.align_comments.exe__string_copy_8
pop ecx
ret 4
Function at 0x4078c0
Capabilities:
Initialize winsock library

Disassembly:
mov eax, 0x106c
call fcn.0040abd0
cmp byte [0x4379d0], 0
jne 0x4079e9
lea eax, [esp + 4]
push eax
call sym.align_comments.exe__sys_error_none_4
push 0x4379d4
mov word [esp + 4], 0x7f7f
push dword [esp + 4]
mov word [0x4379d6], 0
call sub.WS2_32.dll_WSAStartup
mov dword [esp + 0x10], eax
lea eax, [esp + 4]
push eax
call sym.align_comments.exe__sys_error_4
test al, al
je 0x4079e2
push ebx
mov word [esp + 4], 1
mov ebx, 1
push 0x4379d4
push dword [esp + 8]
call sub.WS2_32.dll_WSAStartup
mov dword [esp + 0x14], eax
lea eax, [esp + 8]
push eax
call sym.align_comments.exe__sys_error_4
test al, al
jne 0x40796f
call sub.WS2_32.dll_WSACleanup
test eax, eax
je 0x40796f
call sub.WS2_32.dll_WSAGetLastError
push 0
push 0x437b7c
push str.err_netclose
mov dword [esp + 0x20], eax
lea eax, [esp + 0x14]
push 0x431410
push eax
call sym.align_comments.exe__sys_error_abort_20
mov al, byte [0x4379d6]
test al, al
jne 0x4079a7
inc ebx
mov byte [esp + 4], bl
cmp ebx, 0x7f
jle 0x407922
push 0
push 0x437b7c
push str.err_netversion
push 0x431410
call sym.align_comments.exe__sys_message_bomb_16
pop ebx
mov byte [0x4379d0], 1
add esp, 0x106c
ret
mov byte [esp + 4], al
mov al, byte [0x4379d7]
push 0x4379d4
mov byte [esp + 9], al
push dword [esp + 8]
call sub.WS2_32.dll_WSAStartup
push 0
push 0x437b7c
push str.err_netstart
mov dword [esp + 0x20], eax
lea eax, [esp + 0x14]
push 0x431410
push eax
call sym.align_comments.exe__sys_error_abort_20
pop ebx
mov byte [0x4379d0], 1
add esp, 0x106c
ret

Function at 0x407f40
Capabilities:
Write file on windows

Disassembly:
push 1
call fcn.0040e20c
push eax
push 0x21
push 1
push str._Program_aborted_on_error._
call fcn.0040e4a1
push 0x4317d0
call fcn.00404180
add esp, 0x18
jmp sym.align_comments.exe__sys_exit_error_0

Function at 0x407f70
Capabilities:
Query environment variable

Disassembly:
sub esp, 0x884
lea eax, [esp]
push dword [0x4317d8]
push eax
push dword [esp + 0x890]
call sym.align_comments.exe__string_t_c_12
push dword [0x4317dc]
lea eax, [esp + 0x88]
push eax
lea eax, [esp + 8]
push eax
call sub.KERNEL32.dll_GetEnvironmentVariableA
test eax, eax
jne 0x407fd4
push dword [esp + 0x890]
push 2
push 0xffffffffffffffff
call sym.align_comments.exe__sys_stat_set_12
push dword [esp + 0x890]
push dword [esp + 0x88c]
call sym.align_comments.exe__sys_stat_parm_vstr_8
add esp, 0x884
ret 0xc
movzx eax, word [0x4317e0]
push eax
lea eax, [esp + 0x88]
push eax
push dword [esp + 0x894]
call sym.align_comments.exe__string_vstring_12
push dword [esp + 0x890]
call sym.align_comments.exe__sys_error_none_4
add esp, 0x884
ret 0xc
Function at 0x408010
Capabilities:
Set environment variable

Disassembly:
sub esp, 0x884
push esi
mov esi, dword [esp + 0x894]
push esi
call sym.align_comments.exe__sys_error_none_4
push 0x84
lea eax, [esp + 8]
push eax
push dword [esp + 0x894]
call sym.align_comments.exe__string_t_c_12
push 0x800
lea eax, [esp + 0x8c]
push eax
push dword [esp + 0x898]
call sym.align_comments.exe__string_t_c_12
lea eax, [esp + 0x88]
push eax
lea eax, [esp + 8]
push eax
call sub.KERNEL32.dll_SetEnvironmentVariableA
test al, al
jne 0x408071
call sub.KERNEL32.dll_GetLastError
mov dword [esi + 0xc], eax
pop esi
add esp, 0x884
ret 0xc

Function at 0x408080
Capabilities:
Set environment variable

Disassembly:
sub esp, 0x88
push esi
push dword [0x4317d4]
lea eax, [esp + 0xc]
push eax
push dword [esp + 0x98]
call sym.align_comments.exe__string_t_c_12
mov al, byte [0x437c50]
mov esi, dword [esp + 0x94]
push esi
mov byte [esp + 0xb], al
call sym.align_comments.exe__sys_error_none_4
lea eax, [esp + 7]
push eax
lea eax, [esp + 0xc]
push eax
call sub.KERNEL32.dll_SetEnvironmentVariableA
test al, al
jne 0x4080cf
call sub.KERNEL32.dll_GetLastError
mov dword [esi + 0xc], eax
pop esi
add esp, 0x88
ret 8

Function at 0x4080e0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x58
push esi
mov esi, dword [esp + 0x68]
mov eax, 0x50
push edi
mov word [esp + 0xc], ax
lea eax, [esp + 0xc]
push eax
push dword [esp + 0x68]
mov byte [esi], 0
call sym.align_comments.exe__string_copy_8
lea eax, [esp + 0xc]
push eax
call sym.align_comments.exe__string_terminate_null_4
mov edi, dword [esp + 0x70]
lea eax, [esp + 0x64]
push edi
push eax
push 1
call fcn.004081d0
push edi
call sym.align_comments.exe__sys_error_4
test al, al
jne 0x4081be
push ebx
mov ebx, dword [esp + 0x6c]
movsx eax, word [ebx]
mov dword [esp + 0x70], eax
lea eax, [esp + 0x70]
push eax
lea eax, [ebx + 4]
push eax
lea eax, [esp + 0x14]
push eax
push 0
lea eax, [esp + 0x24]
push eax
push dword [esp + 0x7c]
call sub.ADVAPI32.dll_RegQueryValueExA
mov ecx, dword [esp + 0x70]
mov dword [edi + 0xc], eax
mov word [ebx + 2], cx
cmp dword [edi + 0xc], 0xea
jne 0x408173
push edi
call sym.align_comments.exe__sys_error_none_4
jmp 0x40818e
test cx, cx
jle 0x40818e
movsx eax, cx
mov al, byte [eax + ebx + 3]
cmp al, byte [0x437c51]
jne 0x40818e
lea eax, [ecx - 1]
mov word [ebx + 2], ax
push dword [esp + 0x68]
call sub.ADVAPI32.dll_RegCloseKey
push edi
call sym.align_comments.exe__sys_error_4
pop ebx
test al, al
jne 0x4081be
mov eax, dword [esp + 8]
sub eax, 1
je 0x4081bb
sub eax, 1
jne 0x4081be
or byte [esi], 2
pop edi
pop esi
add esp, 0x58
ret 0x10
or byte [esi], 1
pop edi
pop esi
add esp, 0x58
ret 0x10
Function at 0x4082c0
Capabilities:
Delete registry value

Disassembly:
sub esp, 0x54
mov eax, 0x50
push esi
mov word [esp + 4], ax
lea eax, [esp + 4]
push eax
push dword [esp + 0x60]
call sym.align_comments.exe__string_copy_8
lea eax, [esp + 4]
push eax
call sym.align_comments.exe__string_terminate_null_4
mov esi, dword [esp + 0x60]
lea eax, [esp + 0x5c]
push esi
push eax
push 2
call fcn.004081d0
push esi
call sym.align_comments.exe__sys_error_4
test al, al
jne 0x408318
push esi
call sym.align_comments.exe__sys_error_none_4
lea eax, [esp + 8]
push eax
push dword [esp + 0x60]
call sub.ADVAPI32.dll_RegDeleteValueA
mov dword [esi + 0xc], eax
pop esi
add esp, 0x54
ret 8
Function at 0x408320
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
mov eax, 0x2068
call fcn.0040abd0
mov eax, 0x50
mov byte [esp + 3], 0
push ebx
mov bh, byte [esp + 0x2078]
mov word [esp + 0x14], ax
mov eax, 0x2000
push esi
mov word [esp + 0x6c], ax
lea eax, [esp + 0x18]
push eax
push dword [esp + 0x2078]
call sym.align_comments.exe__string_copy_8
lea eax, [esp + 0x18]
push eax
call sym.align_comments.exe__string_terminate_null_4
mov esi, dword [esp + 0x2080]
lea eax, [esp + 0xc]
push esi
push eax
push 3
call fcn.004081d0
push esi
call sym.align_comments.exe__sys_error_4
test al, al
jne 0x4084ec
movsx eax, word [esp + 0x6c]
mov dword [esp + 0x14], eax
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x74]
push eax
lea eax, [esp + 0x18]
push eax
push 0
lea eax, [esp + 0x2c]
push eax
push dword [esp + 0x20]
call sub.ADVAPI32.dll_RegQueryValueExA
mov ecx, dword [esp + 0x14]
mov dword [esi + 0xc], eax
mov word [esp + 0x6e], cx
cmp eax, 0xea
jne 0x4083cc
push esi
call sym.align_comments.exe__sys_error_none_4
jmp 0x4083e8
test cx, cx
jle 0x4083e8
movsx eax, cx
mov al, byte [esp + eax + 0x6f]
cmp al, byte [0x437c52]
jne 0x4083e8
lea eax, [ecx - 1]
mov word [esp + 0x6e], ax
mov bl, bh
push esi
and bl, 1
call sym.align_comments.exe__sys_error_4
test al, al
je 0x408401
mov dword [esp + 0x10], 1
jmp 0x408431
mov eax, dword [esp + 0x10]
test bl, bl
je 0x40840e
cmp eax, 1
jne 0x408431
test bh, 2
je 0x408418
cmp eax, 2
jne 0x408431
push dword [esp + 0x2078]
lea eax, [esp + 0x70]
push eax
call sym.align_comments.exe__string_equal_8
test al, al
jne 0x4084e3
lea eax, [esp + 0x6c]
push eax
push dword [esp + 0x207c]
call sym.align_comments.exe__string_copy_8
lea eax, [esp + 0x6c]
push eax
call sym.align_comments.exe__string_terminate_null_4
mov ecx, dword [esp + 0x10]
test bl, bl
mov eax, 1
cmovne ecx, eax
test bh, 2
mov eax, 2
cmovne ecx, eax
movsx eax, word [esp + 0x6e]
inc eax
mov dword [esp + 0x10], ecx
push eax
lea eax, [esp + 0x74]
push eax
push ecx
push dword [0x437c54]
lea eax, [esp + 0x2c]
push eax
push dword [esp + 0x20]
call sub.ADVAPI32.dll_RegSetValueExA
push esi
mov dword [esi + 0xc], eax
call sym.align_comments.exe__sys_error_4
test al, al
jne 0x4084cb
push dword [esp + 0xc]
mov byte [esp + 0xf], 1
call sub.ADVAPI32.dll_RegFlushKey
push esi
mov dword [esi + 0xc], eax
call sym.align_comments.exe__sys_error_4
test al, al
jne 0x4084cb
push dword [esp + 0xc]
call sub.ADVAPI32.dll_RegCloseKey
mov dword [esi + 0xc], eax
mov al, 1
pop esi
pop ebx
add esp, 0x2068
ret 0x10
push dword [esp + 0xc]
call sub.ADVAPI32.dll_RegCloseKey
mov al, byte [esp + 0xb]
pop esi
pop ebx
add esp, 0x2068
ret 0x10
push dword [esp + 0xc]
call sub.ADVAPI32.dll_RegCloseKey
pop esi
xor al, al
pop ebx
add esp, 0x2068
ret 0x10
Function at 0x408ef0
Capabilities:
Get hostname

Disassembly:
mov eax, 0x146c
call fcn.0040abd0
lea eax, [esp]
mov dword [esp], 0x400
push eax
lea eax, [esp + 8]
push eax
call sub.KERNEL32.dll_GetComputerNameA
test al, al
jne 0x408f4a
lea eax, [esp + 0x404]
push eax
call sym.align_comments.exe__sys_error_none_4
call sub.KERNEL32.dll_GetLastError
push 0
push 0x437c5c
push str.node_name_get
mov dword [esp + 0x41c], eax
lea eax, [esp + 0x410]
push 0x433130
push eax
call sym.align_comments.exe__sys_error_abort_20
push dword [esp]
lea eax, [esp + 8]
push eax
push dword [esp + 0x1478]
call sym.align_comments.exe__string_vstring_12
push dword [esp + 0x1470]
call sym.align_comments.exe__string_downcase_4
add esp, 0x146c
ret 4