joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4d52fa
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x4d5332
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.004d3387
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.004d335f
jmp 0x4d533e
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x4d69ec
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x4d6a2e
call fcn.004dc7a8
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x4d6a2e
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x4d6a25
xor eax, eax
jmp 0x4d6a36
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.004d6a3c
pop edi
pop esi
pop ebx
ret 4

Function at 0x4dccd8
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x4dcd06
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x4dcd24
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.004dcc3e
jmp 0x4dcd24
mov eax, dword [esi + 0x14]
test eax, eax
je 0x4dcd24
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.004dcc3e
test edi, edi
mov eax, edi
jne 0x4dcd0e
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub esp, 0x1c
xor eax, eax
cmp word [0x400000], 0x5a4d
mov dword [0x406054], 1
mov dword [0x406050], 1
mov dword [0x40604c], 1
jne 0x401056
mov edx, dword [0x40003c]
cmp dword [edx + 0x400000], 0x4550
lea ecx, [edx + 0x400000]
je 0x4010b0
mov dword [0x40600c], eax
mov eax, dword [0x406060]
test eax, eax
je 0x4010a0
mov dword [esp], 2
call sym.___set_app_type
call sym.___p__fmode
mov edx, dword [0x406074]
mov dword [eax], edx
call sym.___p__commode
mov edx, dword [0x40605c]
mov dword [eax], edx
call sym.__setargv
cmp dword [0x403018], 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], sym.__matherr
call sym.___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 0x401790
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov dword [esp], 2
lea ebx, [esp + 0x24]
call sym.___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 sym.___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 0x4017f0
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x30
mov esi, dword [0x406068]
test esi, esi
jle 0x401910
mov eax, dword [0x40606c]
xor ecx, ecx
add eax, 0xc
mov edx, dword [eax]
cmp ebx, edx
jb 0x401824
mov edi, dword [eax + 4]
add edx, dword [edi + 8]
cmp ebx, edx
jb 0x4018a7
add ecx, 1
add eax, 0x14
cmp ecx, esi
jne 0x401810
mov dword [esp], ebx
call sym.___mingw_GetSectionForAddress
mov edi, eax
test eax, eax
je 0x401937
mov eax, dword [0x40606c]
lea ebx, [esi + esi*4]
shl ebx, 2
add eax, ebx
mov dword [eax + 0x10], edi
mov dword [eax], 0
call sym.__GetPEImageBase
mov edx, dword [0x40606c]
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 0x401917
mov eax, dword [esp + 0x28]
lea edx, [eax - 0x40]
and edx, 0xffffffbf
je 0x4018a0
lea edx, [eax - 4]
and edx, 0xfffffffb
jne 0x4018b0
add dword [0x406068], 1
add esp, 0x30
pop ebx
pop esi
pop edi
ret
cmp eax, 2
mov edx, 4
mov eax, 0x40
mov ecx, dword [esp + 0x20]
cmove eax, edx
mov edx, dword [esp + 0x14]
add ebx, dword [0x40606c]
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 0x4018a0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call sym.___report_error
lea esi, [esi]
lea esi, [esi]
xor esi, esi
jmp 0x40182e
mov eax, dword [0x40606c]
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 sym.___report_error
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call sym.___report_error
lea esi, [esi]
nop

Function at 0x401e50
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x406084
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x40607c]
sub esp, 4
test ebx, ebx
je 0x401ea5
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 0x401e9e
test esi, esi
je 0x401e9e
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x401e80
mov dword [esp], 0x406084
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x402200
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [0x400000], 0x5a4d
jne 0x402225
mov ecx, dword [0x40003c]
cmp dword [ecx + 0x400000], 0x4550
lea edx, [ecx + 0x400000]
je 0x402230
ret
cmp word [ecx + 0x400018], 0x10b
jne 0x402225
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 si, si
je 0x402278
xor ecx, ecx
mov edx, dword [eax + 0xc]
cmp ebx, edx
jb 0x40226e
add edx, dword [eax + 8]
cmp ebx, edx
jb 0x40227a
add ecx, 1
add eax, 0x28
cmp ecx, esi
jne 0x402260
xor eax, eax
pop ebx
pop esi
ret
Function at 0x401000
Capabilities:
Write file on windows

Disassembly:
sub esp, 8
push 0x42a004
push dword [esp + 0x14]
push dword [esp + 0x14]
call sym.fxh.exe__string_cmline_set_12
mov eax, 0x20
mov word [0x42f7a8], ax
call sym.fxh.exe__string_cmline_init_0
push 0x42e740
push 0x42f7d0
call sym.fxh.exe__string_cmline_token_fp2_8
push 0x42e740
call sym.fxh.exe__string_cmline_req_check_4
call sym.fxh.exe__string_cmline_end_abort_0
movsd xmm0, qword [0x42f7d0]
sub esp, 8
mulsd xmm0, qword [0x421228]
addsd xmm0, qword [0x421220]
movsd qword [esp + 8], xmm0
fld qword [esp + 8]
fstp qword [esp]
call fcn.0040b690
movzx eax, word [section..data]
add esp, 8
fstp qword [esp]
cvttsd2si ecx, qword [esp]
push 0x42e740
push 4
push eax
push 0x10
mov dword [0x42f7cc], ecx
shr ecx, 0x10
push ecx
push 0x42f7a8
call sym.fxh.exe__string_f_int_max_base_24
push 0
push 0x42f828
push 0x42f7d8
push 0x42f7d8
push 0x42e740
call sym.fxh.exe__sys_error_abort_20
mov ax, word [0x42f7aa]
cmp ax, 0x20
jle 0x4010e4
cwde
push 0x42f82c
sub eax, 0x20
push eax
push 0x42a008
call fcn.004011e0
mov ax, word [0x42f7aa]
add esp, 0xc
push esi
test ax, ax
jle 0x4010fc
cmp ax, 0x20
jge 0x4010f5
movsx esi, ax
jmp 0x4010fe
mov esi, 0x20
jmp 0x4010fe
xor esi, esi
push 1
call fcn.00409fbc
push eax
push esi
push 1
push 0x42f7ac
call fcn.0040a251
movzx eax, word [section..data]
add esp, 0x14
push 0x42e740
push 5
push eax
movzx eax, word [0x42f7cc]
push 0x10
push eax
push 0x42f7a8
call sym.fxh.exe__string_f_int_max_base_24
push 0
push 0x42f828
push 0x42f7d8
push 0x42f7d8
push 0x42e740
call sym.fxh.exe__sys_error_abort_20
push 0x2e
push 0x42a00c
call fcn.004011e0
mov ax, word [0x42f7aa]
add esp, 8
cmp ax, 0x20
jle 0x40118c
cwde
push 0x42f82d
sub eax, 0x20
push eax
push 0x42a010
call fcn.004011e0
mov ax, word [0x42f7aa]
add esp, 0xc
test ax, ax
jle 0x4011a3
cmp ax, 0x20
jge 0x40119c
movsx esi, ax
jmp 0x4011a5
mov esi, 0x20
jmp 0x4011a5
xor esi, esi
push 1
call fcn.00409fbc
push eax
push esi
push 1
push 0x42f7ac
call fcn.0040a251
push 0x42a014
call fcn.004011e0
add esp, 0x18
xor eax, eax
pop esi
add esp, 8
ret
Function at 0x401760
Capabilities:
Accept command line arguments

Disassembly:
mov eax, 0x1070
call fcn.00406c20
call sym.fxh.exe__sys_init_0
call sym.fxh.exe__util_init_0
mov eax, 4
mov dword [0x432904], 0x400
mov word [esp], ax
movzx eax, word [0x42a1f8]
push eax
push dword [esp + 0x1080]
mov dword [0x432d08], 0x100
push 0x432d08
mov dword [0x432e0c], 0x20
mov dword [0x4308e0], 0x2000
call sym.fxh.exe__string_vstring_12
mov byte [0x42f834], 1
call sub.KERNEL32.dll_GetCommandLineA
test eax, eax
je 0x4017e1
movzx ecx, word [0x42a1f8]
push ecx
push eax
push 0x4308e0
call sym.fxh.exe__string_vstring_12
mov eax, 1
mov word [0x4328e4], ax
lea eax, [esp + 8]
push eax
lea eax, [esp + 4]
push eax
push 0x4328e4
push 0x4308e0
call sym.fxh.exe__string_token_16
mov ax, word [0x4328e4]
mov word [0x4328e6], ax
mov dword [0x432900], 1
mov byte [0x432e30], 0
add esp, 0x1070
ret 0xc

Function at 0x4029c0
Capabilities:
Write file on windows

Disassembly:
push 1
call fcn.00409fbc
push eax
push 0x21
push 1
push str._Program_aborted_on_error._
call fcn.0040a251
push 0x42a368
call fcn.004011e0
add esp, 0x18
jmp sym.fxh.exe__sys_exit_error_0
Function at 0x402d10
Capabilities:
Write file on windows

Disassembly:
push 0x42a378
call sym.fxh.exe__string_upcase_4
push 0x42a780
call sym.fxh.exe__string_upcase_4
push 1
call fcn.00409fbc
push eax
push 8
push 1
push str.Status__
call fcn.0040a251
mov ax, word [0x42a782]
add esp, 0x14
cmp ax, 0x50
jle 0x402d66
cwde
push 0x42f83d
sub eax, 0x50
push eax
push 0x42a9b0
call fcn.004011e0
mov ax, word [0x42a782]
add esp, 0xc
push esi
test ax, ax
jle 0x402d7e
cmp ax, 0x50
jge 0x402d77
movsx esi, ax
jmp 0x402d80
mov esi, 0x50
jmp 0x402d80
xor esi, esi
push 1
call fcn.00409fbc
push eax
push esi
push 1
push 0x42a784
call fcn.0040a251
push 1
call fcn.00409fbc
push eax
push 0x10
push 1
push str.__in_subsystem__
call fcn.0040a251
mov ax, word [0x42a37a]
mov esi, 0x400
add esp, 0x28
cmp ax, si
jle 0x402dda
cwde
push 0x42f83e
sub eax, esi
push eax
push 0x42a9c8
call fcn.004011e0
mov ax, word [0x42a37a]
add esp, 0xc
test ax, ax
jle 0x402de9
cmp ax, si
jge 0x402deb
movsx esi, ax
jmp 0x402deb
xor esi, esi
push 1
call fcn.00409fbc
push eax
push esi
push 1
push 0x42a37c
call fcn.0040a251
push 1
call fcn.00409fbc
push eax
push 2
push 1
push 0x42a9cc
call fcn.0040a251
push 0x42a9d0
call fcn.004011e0
add esp, 0x2c
mov byte [0x42a370], 1
pop esi
ret
Function at 0x403c00
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x104
xor eax, eax
push ebx
mov ebx, dword [esp + 0x10c]
push esi
mov esi, dword [esp + 0x114]
mov word [esi + 2], ax
test ebx, ebx
jne 0x403c2d
pop esi
xor al, al
pop ebx
add esp, 0x104
ret 8
push ebp
push edi
cmp word [esi], ax
jle 0x403d33
push 0
push dword [0x42f848]
mov dword [esp + 0x18], eax
lea eax, [esp + 0x18]
push eax
push dword [0x42c448]
push ebx
push 0
push 0x11ff
call sub.KERNEL32.dll_FormatMessageA
test eax, eax
je 0x403c79
push eax
push dword [esp + 0x14]
push esi
call sym.fxh.exe__string_vstring_12
push dword [esp + 0x10]
call sub.KERNEL32.dll_LocalFree
jmp 0x403d2d
mov eax, dword [esp + 0x10]
test eax, eax
je 0x403c87
push eax
call sub.KERNEL32.dll_LocalFree
push str.RASAPI32.DLL
mov ebp, 1
call sub.KERNEL32.dll_LoadLibraryA
mov edi, eax
test edi, edi
jne 0x403ccc
push ebp
call fcn.00409fbc
push eax
push 0x1c
push ebp
push str.Could_not_load_RASAIP32.DLL.
call fcn.0040a251
push 0x42c484
call fcn.004011e0
add esp, 0x18
mov al, 1
pop edi
pop ebp
pop esi
pop ebx
add esp, 0x104
ret 8
push str.RasGetErrorStringA
push edi
call sub.KERNEL32.dll_GetProcAddress
test eax, eax
jne 0x403d00
push 1
call fcn.00409fbc
push eax
push 0x2e
push 1
push str.Could_not_find_RasGetErrorStringA_entry_point.
call fcn.0040a251
push 0x42c4b8
call fcn.004011e0
add esp, 0x18
jmp 0x403d10
push dword [0x42c45c]
lea ecx, [esp + 0x18]
push ecx
push ebx
call eax
mov ebp, eax
push edi
call sub.KERNEL32.dll_FreeLibrary
test ebp, ebp
jne 0x403d33
movzx eax, word [0x42c460]
push eax
lea eax, [esp + 0x18]
push eax
push esi
call sym.fxh.exe__string_vstring_12
push esi
call sym.fxh.exe__string_unpad_4
pop edi
pop ebp
pop esi
mov al, 1
pop ebx
add esp, 0x104
ret 8
Function at 0x4040d0
Capabilities:
Create thread

Disassembly:
push esi
mov esi, dword [esp + 0x14]
push esi
call sym.fxh.exe__sys_error_none_4
cmp byte [0x42f845], 0
jne 0x4040f5
push 0x432e50
call sub.KERNEL32.dll_InitializeCriticalSection
mov byte [0x42f845], 1
lea eax, [esp + 0x14]
push eax
push 0
push dword [esp + 0x14]
push dword [esp + 0x14]
push dword [0x42f854]
push dword [0x42f850]
call sub.KERNEL32.dll_CreateThread
mov ecx, dword [esp + 0x10]
mov dword [ecx], eax
test eax, eax
jne 0x404127
call sub.KERNEL32.dll_GetLastError
mov dword [esi + 0xc], eax
pop esi
ret 0x10

Function at 0x4042c0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x418
push ebx
push esi
push edi
mov eax, 0x10
mov ebx, 0x400
push 1
mov word [esp + 0x10], ax
mov word [esp + 0x24], bx
call fcn.00409fbc
push eax
push 0x2e
push 1
push str.Error_reading_global.env_environment_file_set.
call fcn.0040a251
push 0x42c780
call fcn.004011e0
add esp, 0x18
xor eax, eax
mov word [esp + 0x22], ax
lea eax, [esp + 0x20]
push 0x42c6b0
push eax
call sym.fxh.exe__string_appends_8
push 0x20
lea eax, [esp + 0x24]
push eax
call sym.fxh.exe__string_append1_8
mov edi, dword [esp + 0x428]
lea eax, [esp + 0xc]
push dword [edi + 0x914]
push eax
call sym.fxh.exe__string_f_int_8
lea eax, [esp + 0xc]
push eax
lea eax, [esp + 0x24]
push eax
call sym.fxh.exe__string_append_8
push 0x42c700
lea eax, [esp + 0x24]
push eax
call sym.fxh.exe__string_appends_8
mov ax, word [esp + 0x22]
cmp ax, bx
jle 0x40437c
cwde
push 0x42f8da
sub eax, ebx
push eax
push 0x42c784
call fcn.004011e0
mov ax, word [esp + 0x2e]
add esp, 0xc
test ax, ax
jle 0x40438f
cmp ax, bx
jge 0x40438b
movsx esi, ax
jmp 0x404391
mov esi, ebx
jmp 0x404391
xor esi, esi
push 1
call fcn.00409fbc
push eax
push esi
lea eax, [esp + 0x30]
push 1
push eax
call fcn.0040a251
push 0x42c788
call fcn.004011e0
movzx ecx, word [edi + 0x50e]
add esp, 0x18
mov eax, ecx
cmp cx, bx
jle 0x4043e3
movsx eax, cx
push 0x42f8db
sub eax, 0x400
push eax
push 0x42c78c
call fcn.004011e0
movzx eax, word [edi + 0x50e]
add esp, 0xc
test ax, ax
jle 0x4043f6
cmp ax, bx
jge 0x4043f2
movsx esi, ax
jmp 0x4043f8
mov esi, ebx
jmp 0x4043f8
xor esi, esi
push 1
call fcn.00409fbc
push eax
push esi
lea eax, [edi + 0x510]
push 1
push eax
call fcn.0040a251
push 0x42c790
call fcn.004011e0
add esp, 0x18
call sym.fxh.exe__sys_bomb_0
pop edi
pop esi
pop ebx
add esp, 0x418
ret 4
Function at 0x404e80
Capabilities:
Set environment variable

Disassembly:
sub esp, 0x88
push esi
push dword [0x42c798]
lea eax, [esp + 0xc]
push eax
push dword [esp + 0x98]
call sym.fxh.exe__string_t_c_12
mov al, byte [0x42f8dc]
mov esi, dword [esp + 0x94]
push esi
mov byte [esp + 0xb], al
call sym.fxh.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 0x404ecf
call sub.KERNEL32.dll_GetLastError
mov dword [esi + 0xc], eax
pop esi
add esp, 0x88
ret 8

Function at 0x404ee0
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.fxh.exe__string_copy_8
lea eax, [esp + 4]
push eax
call sym.fxh.exe__string_terminate_null_4
mov esi, dword [esp + 0x60]
lea eax, [esp + 0x5c]
push esi
push eax
push 2
call fcn.00404f40
push esi
call sym.fxh.exe__sys_error_4
test al, al
jne 0x404f38
push esi
call sym.fxh.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 0x405030
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.fxh.exe__string_copy_8
lea eax, [esp + 0xc]
push eax
call sym.fxh.exe__string_terminate_null_4
mov edi, dword [esp + 0x70]
lea eax, [esp + 0x64]
push edi
push eax
push 1
call fcn.00404f40
push edi
call sym.fxh.exe__sys_error_4
test al, al
jne 0x40510e
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 0x4050c3
push edi
call sym.fxh.exe__sys_error_none_4
jmp 0x4050de
test cx, cx
jle 0x4050de
movsx eax, cx
mov al, byte [eax + ebx + 3]
cmp al, byte [0x42f8dd]
jne 0x4050de
lea eax, [ecx - 1]
mov word [ebx + 2], ax
push dword [esp + 0x68]
call sub.ADVAPI32.dll_RegCloseKey
push edi
call sym.fxh.exe__sys_error_4
pop ebx
test al, al
jne 0x40510e
mov eax, dword [esp + 8]
sub eax, 1
je 0x40510b
sub eax, 1
jne 0x40510e
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 0x405120
Capabilities:
Query environment variable

Disassembly:
sub esp, 0x884
lea eax, [esp]
push dword [0x42c79c]
push eax
push dword [esp + 0x890]
call sym.fxh.exe__string_t_c_12
push dword [0x42c7a0]
lea eax, [esp + 0x88]
push eax
lea eax, [esp + 8]
push eax
call sub.KERNEL32.dll_GetEnvironmentVariableA
test eax, eax
jne 0x405184
push dword [esp + 0x890]
push 2
push 0xffffffffffffffff
call sym.fxh.exe__sys_stat_set_12
push dword [esp + 0x890]
push dword [esp + 0x88c]
call sym.fxh.exe__sys_stat_parm_vstr_8
add esp, 0x884
ret 0xc
movzx eax, word [0x42c7a4]
push eax
lea eax, [esp + 0x88]
push eax
push dword [esp + 0x894]
call sym.fxh.exe__string_vstring_12
push dword [esp + 0x890]
call sym.fxh.exe__sys_error_none_4
add esp, 0x884
ret 0xc
Function at 0x4051c0
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
mov eax, 0x2068
call fcn.00406c20
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.fxh.exe__string_copy_8
lea eax, [esp + 0x18]
push eax
call sym.fxh.exe__string_terminate_null_4
mov esi, dword [esp + 0x2080]
lea eax, [esp + 0xc]
push esi
push eax
push 3
call fcn.00404f40
push esi
call sym.fxh.exe__sys_error_4
test al, al
jne 0x40538c
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 0x40526c
push esi
call sym.fxh.exe__sys_error_none_4
jmp 0x405288
test cx, cx
jle 0x405288
movsx eax, cx
mov al, byte [esp + eax + 0x6f]
cmp al, byte [0x42f8de]
jne 0x405288
lea eax, [ecx - 1]
mov word [esp + 0x6e], ax
mov bl, bh
push esi
and bl, 1
call sym.fxh.exe__sys_error_4
test al, al
je 0x4052a1
mov dword [esp + 0x10], 1
jmp 0x4052d1
mov eax, dword [esp + 0x10]
test bl, bl
je 0x4052ae
cmp eax, 1
jne 0x4052d1
test bh, 2
je 0x4052b8
cmp eax, 2
jne 0x4052d1
push dword [esp + 0x2078]
lea eax, [esp + 0x70]
push eax
call sym.fxh.exe__string_equal_8
test al, al
jne 0x405383
lea eax, [esp + 0x6c]
push eax
push dword [esp + 0x207c]
call sym.fxh.exe__string_copy_8
lea eax, [esp + 0x6c]
push eax
call sym.fxh.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 [0x42f8e0]
lea eax, [esp + 0x2c]
push eax
push dword [esp + 0x20]
call sub.ADVAPI32.dll_RegSetValueExA
push esi
mov dword [esi + 0xc], eax
call sym.fxh.exe__sys_error_4
test al, al
jne 0x40536b
push dword [esp + 0xc]
mov byte [esp + 0xf], 1
call sub.ADVAPI32.dll_RegFlushKey
push esi
mov dword [esi + 0xc], eax
call sym.fxh.exe__sys_error_4
test al, al
jne 0x40536b
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 0x4053a0
Capabilities:
Set environment variable

Disassembly:
sub esp, 0x884
push esi
mov esi, dword [esp + 0x894]
push esi
call sym.fxh.exe__sys_error_none_4
push 0x84
lea eax, [esp + 8]
push eax
push dword [esp + 0x894]
call sym.fxh.exe__string_t_c_12
push 0x800
lea eax, [esp + 0x8c]
push eax
push dword [esp + 0x898]
call sym.fxh.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 0x405401
call sub.KERNEL32.dll_GetLastError
mov dword [esi + 0xc], eax
pop esi
add esp, 0x884
ret 0xc

Function at 0x4054e0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x28
cmp byte [0x42f844], 0
mov eax, 0x20
mov word [esp + 4], ax
jne 0x4054fb
call sym.fxh.exe__sys_read_env_global_0
push esi
lea eax, [esp + 8]
push eax
push dword [esp + 0x34]
call sym.fxh.exe__string_copy_8
lea eax, [esp + 8]
push eax
call sym.fxh.exe__string_upcase_4
mov eax, dword [0x432e4c]
mov esi, 0x432e4c
mov dword [esp + 4], eax
test eax, eax
je 0x405546
add eax, 4
push eax
lea eax, [esp + 0xc]
push eax
call sym.fxh.exe__string_equal_8
test al, al
jne 0x4055a7
mov esi, dword [esp + 4]
mov eax, dword [esi]
mov dword [esp + 4], eax
test eax, eax
jne 0x405526
lea eax, [esp + 4]
push eax
push 0x108
call sym.fxh.exe__sys_mem_alloc_8
mov eax, dword [esp + 4]
test eax, eax
jne 0x405589
push 1
call fcn.00409fbc
push eax
push 0x3a
push 1
push str.Unable_to_allocate_more_virtual_memory.__The_disk_is_full.
call fcn.0040a251
push 0x42c82c
call fcn.004011e0
add esp, 0x18
call sym.fxh.exe__sys_bomb_0
mov eax, dword [esp + 4]
add eax, 4
push eax
lea eax, [esp + 0xc]
push eax
call sym.fxh.exe__sys_read_env_lang_8
mov eax, dword [esp + 4]
mov dword [eax], 0
mov eax, dword [esp + 4]
mov dword [esi], eax
mov ecx, dword [esp + 4]
mov eax, dword [esp + 0x34]
add ecx, 4
pop esi
mov dword [eax], ecx
add esp, 0x28
ret 8