joyce8/EMBER2024-capa huggingface dataset:
Function at 0xbe5630
Capabilities:
Decompress data using aplib

Disassembly:
call 0xbe5780
push ebx
mov ebx, esp
push ebx
mov esi, dword [ebx + 8]
mov edi, dword [ebx + 0x10]
cld
mov dl, 0x80
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
mov ebx, 2
add dl, dl
jne 0xbe5656
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0xbe5642
add dl, dl
jne 0xbe5661
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0xbe56b4
xor eax, eax
add dl, dl
jne 0xbe566e
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0xbe5755
add dl, dl
jne 0xbe567d
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0xbe5688
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0xbe5693
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0xbe569e
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
je 0xbe56aa
push edi
mov eax, eax
sub edi, eax
mov al, byte [edi]
pop edi
mov byte [edi], al
inc edi
mov ebx, 2
jmp 0xbe564d
mov eax, 1
add dl, dl
jne 0xbe56c2
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0xbe56cd
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0xbe56b9
sub eax, ebx
mov ebx, 1
jne 0xbe5700
mov ecx, 1
add dl, dl
jne 0xbe56e6
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0xbe56f1
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0xbe56dd
push esi
mov esi, edi
sub esi, ebp
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0xbe564d
dec eax
shl eax, 8
mov al, byte [esi]
inc esi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0xbe5717
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0xbe5722
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0xbe570e
cmp eax, 0x7d00
jae 0xbe5745
cmp eax, 0x500
jb 0xbe5740
inc ecx
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0xbe564d
cmp eax, 0x7f
ja 0xbe5748
add ecx, 2
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0xbe564d
mov al, byte [esi]
inc esi
xor ecx, ecx
shr al, 1
je 0xbe5776
adc ecx, 2
mov ebp, eax
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
mov ebx, 1
jmp 0xbe564d
pop ebx
sub edi, dword [ebx + 0x10]
mov eax, edi
pop ebx
ret 0x10
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub esp, 0x1c
xor eax, eax
cmp word [0x400000], 0x5a4d
mov dword [0x40d05c], 1
mov dword [0x40d058], 1
mov dword [0x40d054], 1
jne 0x401056
mov edx, dword [0x40003c]
cmp dword [edx + 0x400000], 0x4550
lea ecx, [edx + 0x400000]
je 0x4010b0
mov dword [0x40d014], eax
mov eax, dword [0x40d068]
test eax, eax
je 0x4010a0
mov dword [esp], 2
call sym.___set_app_type
call sym.___p__fmode
mov edx, dword [0x40d07c]
mov dword [eax], edx
call sym.___p__commode
mov edx, dword [0x40d064]
mov dword [eax], edx
call dbg._setargv
cmp dword [0x409020], 1
je 0x4010e0
xor eax, eax
add esp, 0x1c
ret
mov dword [esp], 1
call sym.___set_app_type
jmp 0x401070
movzx edx, word [ecx + 0x18]
cmp dx, 0x10b
je 0x4010f8
cmp dx, 0x20b
jne 0x401056
cmp dword [ecx + 0x84], 0xe
jbe 0x401056
mov edx, dword [ecx + 0xf8]
xor eax, eax
test edx, edx
setne al
jmp 0x401056
mov dword [esp], dbg._matherr
call dbg.__mingw_setusermatherr
xor eax, eax
add esp, 0x1c
ret
cmp dword [ecx + 0x74], 0xe
jbe 0x401056
mov ecx, dword [ecx + 0xe8]
xor eax, eax
test ecx, ecx
setne al
jmp 0x401056
Function at 0x401de0
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov dword [esp], 2
lea ebx, [esp + 0x24]
call dbg.__acrt_iob_func
mov dword [esp + 8], 0x1b
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], str.Mingw_w64_runtime_failure:_n
call sym._fwrite
mov dword [esp], 2
call dbg.__acrt_iob_func
mov edx, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], edx
call sym._vfprintf
call sym._abort
lea esi, [esi]

Function at 0x401e40
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x30
mov esi, dword [0x40d070]
test esi, esi
jle 0x401f60
mov eax, dword [0x40d074]
xor ecx, ecx
add eax, 0xc
mov edx, dword [eax]
cmp edx, ebx
ja 0x401e74
mov edi, dword [eax + 4]
add edx, dword [edi + 8]
cmp ebx, edx
jb 0x401ef7
add ecx, 1
add eax, 0x14
cmp ecx, esi
jne 0x401e60
mov dword [esp], ebx
call dbg.__mingw_GetSectionForAddress
mov edi, eax
test eax, eax
je 0x401f87
mov eax, dword [0x40d074]
lea ebx, [esi + esi*4]
shl ebx, 2
add eax, ebx
mov dword [eax + 0x10], edi
mov dword [eax], 0
call dbg._GetPEImageBase
mov edx, dword [0x40d074]
add eax, dword [edi + 0xc]
mov dword [edx + ebx + 0xc], eax
lea edx, [esp + 0x14]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x401f67
mov eax, dword [esp + 0x28]
lea edx, [eax - 0x40]
and edx, 0xffffffbf
je 0x401ef0
lea edx, [eax - 4]
and edx, 0xfffffffb
jne 0x401f00
add dword [0x40d070], 1
add esp, 0x30
pop ebx
pop esi
pop edi
ret
cmp eax, 2
mov edx, 0x40
mov eax, 4
mov ecx, dword [esp + 0x20]
cmovne eax, edx
mov edx, dword [esp + 0x14]
add ebx, dword [0x40d074]
mov dword [ebx + 8], ecx
mov dword [ebx + 4], edx
mov dword [esp + 0xc], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], ecx
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
test eax, eax
jne 0x401ef0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call dbg.__report_error
lea esi, [esi]
lea esi, [esi]
xor esi, esi
jmp 0x401e7e
mov eax, dword [0x40d074]
mov eax, dword [eax + ebx + 0xc]
mov dword [esp + 8], eax
mov eax, dword [edi + 8]
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov dword [esp + 4], eax
call dbg.__report_error
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call dbg.__report_error
lea esi, [esi]
nop
Function at 0x4024c0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x40d08c
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x40d084]
sub esp, 4
test ebx, ebx
je 0x402515
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
lea esi, [esi]
mov eax, dword [ebx]
mov dword [esp], eax
call ebp
sub esp, 4
mov esi, eax
call edi
test eax, eax
jne 0x40250e
test esi, esi
je 0x40250e
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x4024f0
mov dword [esp], 0x40d08c
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x402840
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [0x400000], 0x5a4d
jne 0x402865
mov ecx, dword [0x40003c]
cmp dword [ecx + 0x400000], 0x4550
lea edx, [ecx + 0x400000]
je 0x402870
ret
cmp word [ecx + 0x400018], 0x10b
jne 0x402865
push esi
movzx eax, word [ecx + 0x400014]
push ebx
movzx esi, word [ecx + 0x400006]
mov ebx, dword [esp + 0xc]
lea eax, [edx + eax + 0x18]
sub ebx, 0x400000
test esi, esi
je 0x4028b8
xor ecx, ecx
nop
mov edx, dword [eax + 0xc]
cmp ebx, edx
jb 0x4028ae
add edx, dword [eax + 8]
cmp ebx, edx
jb 0x4028ba
add ecx, 1
add eax, 0x28
cmp ecx, esi
jne 0x4028a0
xor eax, eax
pop ebx
pop esi
ret
Function at 0x401040
Capabilities:
Persist via default file association registry key
Set registry value
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [0x403004]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 8], 2
push esi
mov esi, dword [ebp + 0xc]
je 0x401089
push dword [esi]
push str.Usage:__s__filepath__n
call fcn.00401010
push dword [esi]
push str.Example:__s__C:path_toyourexecutable.exe__n
call fcn.00401010
add esp, 0x10
mov eax, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004011a8
mov esp, ebp
pop ebp
ret
mov esi, dword [esi + 4]
test esi, esi
jne 0x4010a5
push 0x402118
call fcn.00401010
add esp, 4
push 1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
push esi
push str.Setting_registry_with_filepath:__ls_n
call fcn.00401010
add esp, 8
lea eax, [ebp - 8]
push eax
push str.SoftwareClassesms_settingsShellopencommand
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
test eax, eax
je 0x4010f3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.RegCreateKeyW_error_:__ld_n
call fcn.00401010
add esp, 8
mov eax, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004011a8
mov esp, ebp
pop ebp
ret
push str.RegCreateKeyW_success_n
call fcn.00401010
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax*2 + 2]
push eax
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push 1
push 0
push 0
push dword [ebp - 8]
call esi
test eax, eax
je 0x401156
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.RegSetValueExW_filepath_error_:__ld_n
call fcn.00401010
add esp, 8
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004011a8
mov esp, ebp
pop ebp
ret
push str.RegSetValueExW_filepath_success_n
call fcn.00401010
add esp, 4
push 2
push 0x4022ec
push 1
push 0
push str.DelegateExecute
push dword [ebp - 8]
call esi
test eax, eax
je 0x40118a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.RegSetValueExW_DelegateExecute_error_:__ld_n
jmp 0x401131
push str.RegSetValueExW_DelegateExecute_success_n
call fcn.00401010
mov ecx, dword [ebp - 4]
add esp, 4
xor ecx, ebp
xor eax, eax
pop esi
call fcn.004011a8
mov esp, ebp
pop ebp
ret
Function at 0x4013c0
Capabilities:
Encode data using xor

Disassembly:
jmp 0x412d00
push ebx
mov ebx, dword [esp + 0xc]
push edi
xor edi, edi
test ebx, ebx
je 0x412e87
push ebp
mov ebp, dword [esp + 0x10]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_InitializeAcl]
nop dword [eax]
push 0
push 0
push 0
call esi
xor byte [edi + ebp], 0xa6
push 0
push 0
push 0
call esi
add byte [edi + ebp], 0xa2
push 0
push 0
push 0
call esi
add byte [edi + ebp], 0xed
push 0
push 0
push 0
call esi
xor byte [edi + ebp], 0x19
push 0
push 0
push 0
call esi
sub byte [edi + ebp], 0x80
push 0
push 0
push 0
call esi
add byte [edi + ebp], 0xad
push 0
push 0
push 0
call esi
xor byte [edi + ebp], 0x7b
push 0
push 0
push 0
call esi
add byte [edi + ebp], 0x9e
push 0
push 0
push 0
call esi
add byte [edi + ebp], 0x9c
push 0
push 0
push 0
call esi
xor byte [edi + ebp], 0xdb
push 0
push 0
push 0
call esi
add byte [edi + ebp], 0x95
push 0
push 0
push 0
call esi
add byte [edi + ebp], 0x59
push 0
push 0
push 0
call esi
add byte [edi + ebp], 0xe4
push 0
push 0
push 0
call esi
xor byte [edi + ebp], 0x7b
push 0
push 0
push 0
call esi
xor byte [edi + ebp], 0x6e
push 0
push 0
push 0
call esi
add byte [edi + ebp], 0x81
push 0
push 0
push 0
call esi
add byte [edi + ebp], 0xd1
push 0
push 0
push 0
call esi
add byte [edi + ebp], 0x24
push 0
push 0
push 0
call esi
add byte [edi + ebp], 0xe3
push 0
push 0
push 0
call esi
xor byte [edi + ebp], 0x40
push 0
push 0
push 0
call esi
add byte [edi + ebp], 0x46
push 0
push 0
push 0
call esi
add byte [edi + ebp], 0x37
push 0
push 0
push 0
call esi
add byte [edi + ebp], 0x39
push 0
push 0
push 0
call esi
add byte [edi + ebp], 0x6f
push 0
push 0
push 0
call esi
add byte [edi + ebp], 0xe5
push 0
push 0
push 0
call esi
add byte [edi + ebp], 0xda
push 0
push 0
push 0
call esi
xor byte [edi + ebp], 0xc1
push 0
push 0
push 0
call esi
add byte [edi + ebp], 0xa1
push 0
push 0
push 0
call esi
add byte [edi + ebp], 0x58
inc edi
cmp edi, ebx
jb 0x412d20
pop esi
pop ebp
pop edi
pop ebx
ret

Function at 0x4035da
Capabilities:
Terminate process

Disassembly:
jmp 0x451c59
push 0x17
call dword [sym.imp.KERNEL32.dll_IsProcessorFeaturePresent]
test eax, eax
je 0x451c6a
push 5
pop ecx
int 0x29
push esi
push 1
mov esi, 0xc0000417
push esi
push 2
call fcn.00405902
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
pop esi
ret

Function at 0x40370b
Capabilities:
Query environment variable

Disassembly:
jmp 0x49b112
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x49b123
pop esi
ret
push ebx
push edi
push esi
call fcn.0049aff9
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.00403fd5
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x49b14b
push ebx
push esi
push edi
call fcn.004056f5
add esp, 0xc
push 0
call fcn.0040623f
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret
Function at 0x4019a0
Capabilities:
Manipulate user privileges

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
test esi, esi
je 0x401b84
lea eax, [esp + 0x10]
push eax
call fcn.00401000
add esp, 4
test eax, eax
je 0x4019d4
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x20]
push edx
mov ecx, esi
call fcn.00401070
add esp, 8
test eax, eax
je 0x401a03
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_LsaClose]
mov eax, 2
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [esp + 0x1c]
call fcn.00401900
test eax, eax
je 0x401a27
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_LsaClose]
mov eax, 3
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x18]
push edx
push esi
push eax
mov dword [esp + 0x34], str.SeServiceLogonRight
mov dword [esp + 0x30], 0x280026
mov dword [esp + 0x28], 0xffffffff
call dword [sym.imp.ADVAPI32.dll_LsaEnumerateAccountRights]
mov ebx, dword [sym.imp.ADVAPI32.dll_LsaNtStatusToWinError]
test eax, eax
je 0x401aa7
push eax
call ebx
mov edi, eax
cmp edi, 2
je 0x401aa7
push esi
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_LsaClose]
call fcn.00402080
mov edx, dword [ebp + 8]
push eax
push edx
push 0x40000209
call fcn.004147fb
add eax, 0x40
push eax
call fcn.00402220
add esp, 0x10
mov eax, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x14]
xor edi, edi
cmp dword [esp + 0x18], edi
jbe 0x401ae5
mov cx, word [eax + edi*8]
cmp cx, word [esp + 0x20]
jne 0x401ade
movzx edx, word [esp + 0x22]
mov ecx, dword [esp + 0x24]
push edx
mov edx, dword [eax + edi*8 + 4]
push ecx
push edx
call fcn.0041475d
add esp, 0xc
test eax, eax
je 0x401b44
mov eax, dword [esp + 0x14]
inc edi
cmp edi, dword [esp + 0x18]
jb 0x401ab3
push eax
call dword [sym.imp.ADVAPI32.dll_LsaFreeMemory]
mov eax, dword [esp + 0x10]
push 1
lea edx, [esp + 0x24]
push edx
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_LsaAddAccountRights]
push esi
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_LsaClose]
test edi, edi
je 0x401b6a
push edi
call ebx
mov edi, eax
call fcn.00402080
push eax
push 0x4000020a
call fcn.004147fb
add eax, 0x40
push eax
call fcn.00402220
add esp, 0xc
mov eax, 5
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_LsaFreeMemory]
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_LsaClose]
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 8]
push edx
push 0x40000204
call fcn.004147fb
add eax, 0x20
push eax
call fcn.00402220
add esp, 0xc
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x401c60
Capabilities:
Query environment variable

Disassembly:
push edi
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov edi, eax
test edi, edi
jne 0x401c95
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
call fcn.00402080
push eax
push ebx
push 0xc00003fe
push 1
call fcn.004021b0
add esp, 0x14
xor eax, eax
pop edi
ret
push esi
lea eax, [edi + edi]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
jne 0x401cce
push eax
push str.expand_environment_string
push str.ExpandEnvironmentStrings__
push 0xc00003eb
push 1
call fcn.004021b0
add esp, 0x14
pop esi
xor eax, eax
pop edi
ret
push edi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
jne 0x401d0f
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
call fcn.00402080
push eax
push ebx
push 0xc00003fe
push 1
call fcn.004021b0
add esp, 0x14
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop esi
xor eax, eax
pop edi
ret
mov eax, esi
pop esi
pop edi
ret

Function at 0x401d20
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
push ecx
push edi
mov edi, eax
xor eax, eax
mov dword [ebp - 4], eax
cmp word [edi], ax
je 0x401dcc
push ebx
push esi
cmp word [edi], 0
mov ebx, edi
je 0x401d4f
nop
cmp word [ebx], 0x3d
je 0x401d55
add ebx, 2
cmp word [ebx], 0
jne 0x401d40
cmp word [ebx], 0x3d
jne 0x401db9
xor eax, eax
mov word [ebx], ax
cmp byte [ebp + 8], al
je 0x401d91
add ebx, 2
call fcn.00401c60
mov esi, eax
test esi, esi
je 0x401d8e
push esi
push edi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
test eax, eax
jne 0x401d7c
inc dword [ebp - 4]
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x401da1
push ebx
jmp 0x401d93
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
test eax, eax
jne 0x401da1
inc dword [ebp - 4]
add ebx, 2
cmp word [ebx], 0
je 0x401db9
lea ebx, [ebx]
add ebx, 2
cmp word [ebx], 0
jne 0x401db0
cmp word [ebx + 2], 0
lea edi, [ebx + 2]
jne 0x401d37
mov eax, dword [ebp - 4]
pop esi
pop ebx
pop edi
mov esp, ebp
pop ebp
ret
Function at 0x401e50
Capabilities:
Create process on windows
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5c
push 0x44
lea eax, [ebp - 0x5c]
push 0
push eax
call fcn.0041a110
add esp, 0xc
xor eax, eax
lea ecx, [ebp - 0x14]
push ecx
lea edx, [ebp - 0x5c]
push edx
push eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push eax
push 0x404
push 0
push 0
push 0
mov dword [ebp - 0x5c], 0x44
call fcn.004086e0
push eax
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x401eb7
mov ecx, dword [ebp - 0x14]
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
xor eax, eax
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor edx, edx
cmp eax, 0x57
sete dl
lea eax, [edx + edx - 1]
mov esp, ebp
pop ebp
ret

Function at 0x402080
Capabilities:
Get thread local storage value
Identify system language via api
Set thread local storage value

Disassembly:
mov eax, dword [0x4261f0]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x4020bb
push 0xffff
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
jne 0x4020ad
mov eax, str._out_of_memory_for_error_message_
pop esi
ret
mov ecx, dword [0x4261f0]
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push ebx
push 0
push 0xffff
push esi
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLangID]
mov ebx, dword [sym.imp.KERNEL32.dll_FormatMessageW]
movzx edx, ax
push edx
push edi
push 0
push 0x1200
call ebx
test eax, eax
jne 0x402116
push eax
push 0xffff
push esi
push eax
push edi
push eax
push 0x1200
call ebx
test eax, eax
jne 0x402116
push edi
push str.system_error__lu
push 0xffffffffffffffff
push 0xffff
push esi
call fcn.004149b0
add esp, 0x14
test eax, eax
jns 0x402116
pop ebx
xor eax, eax
pop esi
ret
pop ebx
mov eax, esi
pop esi
ret

Function at 0x402120
Capabilities:
Identify system language via api

Disassembly:
push ebp
mov ebp, esp
push ecx
push edi
push 0
push 0xffff
lea eax, [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLangID]
mov edi, dword [sym.imp.KERNEL32.dll_FormatMessageW]
movzx ecx, ax
push ecx
push esi
push 0
push 0xb00
call edi
test eax, eax
jne 0x40219a
push eax
push 0xffff
lea edx, [ebp - 4]
push edx
push eax
push esi
push eax
push 0xb00
call edi
test eax, eax
jne 0x40219a
push 0x40
push eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push esi
push str.system_error__lu
push 0xffffffffffffffff
push 0xffff
push eax
mov dword [ebp - 4], eax
call fcn.004149b0
add esp, 0x14
test eax, eax
jns 0x40219a
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 4]
pop edi
mov esp, ebp
pop ebp
ret
Function at 0x4021b0
Capabilities:
Access the windows event log

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
push esi
push str.invgate
push 0
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov esi, eax
test esi, esi
je 0x402214
mov ecx, dword [ebp + 0x10]
xor eax, eax
test ecx, ecx
je 0x4021e9
lea edx, [ebp + 0x10]
cmp eax, 0xf
jge 0x4021e9
add edx, 4
mov dword [ebp + eax*4 - 0x40], ecx
mov ecx, dword [edx]
inc eax
test ecx, ecx
jne 0x4021d6
mov edx, dword [ebp + 0xc]
push 0
lea ecx, [ebp - 0x40]
push ecx
push 0
push eax
push 0
push edx
mov dword [ebp + eax*4 - 0x40], 0
mov eax, dword [ebp + 8]
push 0
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_ReportEventW]
push esi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
pop esi
mov esp, ebp
pop ebp
ret