joyce8/EMBER2024-capa huggingface dataset:
Function at 0x499c20
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push edi
push esi
push ebx
sub esp, 0x10
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x499c50
mov ebx, dword [esp + 0x28]
test ebx, ebx
je 0x499d20
add esp, 0x10
mov eax, 1
pop ebx
pop esi
pop edi
ret 0xc
cmp eax, 1
je 0x499d50
cmp eax, 3
jne 0x499c3a
mov eax, dword [0x4bcf8c]
cmp eax, 0xffffffff
je 0x499c3a
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov ebx, eax
test eax, eax
je 0x499c3a
test byte [eax + 0x20], 0x30
je 0x499d80
mov eax, dword [eax + 0xb4]
test eax, eax
je 0x499c93
call sym.__pthread_cleanup_dest.part.0
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x499cc5
mov dword [esp], eax
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
mov eax, dword [ebx + 0x18]
sub esp, 4
test eax, eax
je 0x499cb7
mov dword [esp], eax
call esi
sub esp, 4
mov dword [ebx + 0x18], 0
mov dword [ebx + 0x14], 0
lea eax, [ebx + 0x1c]
mov dword [esp], eax
call dbg.pthread_mutex_destroy
lea eax, [ebx + 0x38]
mov dword [esp], eax
call dbg.pthread_spin_destroy
cmp eax, 1
je 0x499e00
mov ecx, dword [ebx + 0xb0]
mov dword [ebx + 0x38], 0xffffffff
test ecx, ecx
je 0x499e70
mov eax, dword [0x4bcf8c]
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
sub esp, 8
jmp 0x499c3a
mov eax, dword [0x26c2690]
test eax, eax
je 0x499c3a
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_RemoveVectoredExceptionHandler]
mov dword [0x26c2690], 0
sub esp, 4
jmp 0x499c3a
mov dword [esp + 4], dbg.SetThreadName_VEH
mov dword [esp], 1
call dword [sym.imp.KERNEL32.dll_AddVectoredExceptionHandler]
sub esp, 8
mov dword [0x26c2690], eax
mov eax, 1
add esp, 0x10
pop ebx
pop esi
pop edi
ret 0xc
mov edx, dword [ebx + 0x68]
mov eax, dword [eax + 0x18]
test edx, edx
jne 0x499e08
test eax, eax
je 0x499d9a
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
mov eax, dword [ebx + 0xb4]
mov dword [ebx + 0x18], 0
mov dword [ebx + 0x68], 1
test eax, eax
je 0x499db7
call sym.__pthread_cleanup_dest.part.0
lea edi, [ebx + 0x1c]
lea esi, [ebx + 0x38]
test byte [ebx + 0x24], 4
je 0x499e50
mov eax, dword [ebx + 0x14]
mov dword [ebx], 0xdeadbeef
test eax, eax
je 0x499de0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
mov dword [ebx + 0x14], 0
mov dword [esp], edi
call dbg.pthread_mutex_destroy
mov dword [esp], esi
call dbg.pthread_spin_destroy
cmp eax, 1
jne 0x499ce4
call sym._replace_spin_keys.part.0
lea esi, [esi]
test eax, eax
je 0x499e18
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
lea eax, [ebx + 0x1c]
mov dword [ebx + 0x18], 0
mov dword [esp], eax
call dbg.pthread_mutex_destroy
lea eax, [ebx + 0x38]
mov dword [esp], eax
call dbg.pthread_spin_destroy
cmp eax, 1
je 0x499e00
mov dword [ebx + 0x38], 0xffffffff
jmp 0x499c3a
mov dword [esp], edi
call dbg.pthread_mutex_destroy
mov dword [esp], esi
call dbg.pthread_spin_destroy
cmp eax, 1
jne 0x499e3a
jmp 0x499e00
mov eax, ebx
call sym._push_pthread_mem.part.0
jmp 0x499cf9
Function at 0x49a6f0
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 0x1c
cmp dword [0x26c26b4], 1
je 0x49a701
call sym.__pthread_once_raw.part.0.constprop.0
mov eax, dword [0x4bcf8c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
test eax, eax
je 0x49a728
mov edx, dword [eax + 0xb4]
add esp, 0x1c
mov eax, edx
ret
call sym.___pthread_self_lite.part.0
xor edx, edx
test eax, eax
jne 0x49a716
mov eax, edx
add esp, 0x1c
ret

Function at 0x49a740
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 0x1c
cmp dword [0x26c26b4], 1
je 0x49a751
call sym.__pthread_once_raw.part.0.constprop.0
mov eax, dword [0x4bcf8c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
test eax, eax
je 0x49a770
mov eax, dword [eax + 0x18]
add esp, 0x1c
ret
call sym.___pthread_self_lite.part.0
test eax, eax
jne 0x49a766
add esp, 0x1c
ret

Function at 0x49a7d0
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 0x1c
cmp dword [0x26c26b4], 1
je 0x49a7e1
call sym.__pthread_once_raw.part.0.constprop.0
mov eax, dword [0x4bcf8c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
test eax, eax
je 0x49a800
add eax, 0xc
add esp, 0x1c
ret
call sym.___pthread_self_lite.part.0
test eax, eax
jne 0x49a7f6
jmp 0x49a7f9

Function at 0x49a830
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push esi
push ebx
sub esp, 0x14
mov esi, dword [esp + 0x20]
call sym.___pthread_self_lite
mov dword [eax + 4], esi
mov ebx, eax
mov eax, dword [eax + 0xb4]
test eax, eax
je 0x49a852
call sym.__pthread_cleanup_dest.part.0
test byte [ebx + 0x20], 0x30
jne 0x49a86c
add ebx, 0x70
mov dword [esp + 4], 1
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll_longjmp]
mov eax, dword [0x4bcf8c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, eax
push edx
test eax, eax
je 0x49a8af
cmp dword [ebx + 0x14], 0
mov eax, dword [eax + 0x18]
je 0x49a8f3
mov dword [ebx + 0x68], 1
mov esi, dword [ebx + 4]
test eax, eax
je 0x49a8a2
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
mov dword [ebx + 0x18], 0
test byte [ebx + 0x24], 4
jne 0x49a8b8
mov dword [esp], esi
call dword [sym.imp.msvcrt.dll__endthreadex]
mov eax, dword [ebx + 0x14]
mov dword [ebx], 0xdeadbeef
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
mov dword [ebx + 0x14], 0
mov eax, ebx
call sym._push_pthread_mem
mov eax, dword [0x4bcf8c]
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push eax
push eax
jmp 0x49a8af
mov dword [ebx], 0xdeadbeef
test eax, eax
je 0x49a907
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
mov dword [ebx + 0x18], 0
mov esi, dword [ebx + 4]
jmp 0x49a8d2
Function at 0x49a920
Capabilities:
Get thread local storage value

Disassembly:
mov eax, dword [0x26c26bc]
test eax, eax
jne 0x49a930
xor eax, eax
ret
sub esp, 0x1c
cmp dword [0x26c26b4], 1
je 0x49a941
call sym.__pthread_once_raw.part.0.constprop.0
mov eax, dword [0x4bcf8c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
test eax, eax
je 0x49a980
mov edx, dword [eax + 0x10]
test edx, edx
jle 0x49a968
xor eax, eax
add esp, 0x1c
ret
test byte [eax + 0x20], 3
je 0x49a95d
mov eax, dword [eax + 0x24]
and eax, 1
jmp 0x49a95f
call sym.___pthread_self_lite.part.0
test eax, eax
je 0x49a95d
jmp 0x49a956

Function at 0x49a990
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 0x1c
cmp dword [0x26c26b4], 1
je 0x49a9a1
call sym.__pthread_once_raw.part.0.constprop.0
mov eax, dword [0x4bcf8c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
test eax, eax
je 0x49a9e0
mov edx, dword [esp + 0x20]
add eax, 0x10
test edx, edx
jle 0x49a9d0
lock add dword [eax], 1
add esp, 0x1c
ret
lock sub dword [eax], 1
add esp, 0x1c
ret
call sym.___pthread_self_lite.part.0
test eax, eax
jne 0x49a9b6
add esp, 0x1c
ret

Function at 0x49aae0
Capabilities:
Get thread local storage value

Disassembly:
push esi
push ebx
sub esp, 0x14
cmp dword [0x26c26b4], 1
je 0x49aaf3
call sym.__pthread_once_raw.part.0.constprop.0
mov eax, dword [0x4bcf8c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov ebx, eax
test eax, eax
je 0x49ab50
test byte [ebx + 0x20], 0xc
jne 0x49ab19
mov eax, dword [0x26c26bc]
test eax, eax
jne 0x49ab20
add esp, 0x14
pop ebx
pop esi
ret
lea esi, [ebx + 0x1c]
mov dword [esp], esi
call dbg.pthread_mutex_lock
movzx eax, byte [ebx + 0x20]
test al, 3
je 0x49ab42
mov edx, dword [ebx + 0x24]
test dl, 1
je 0x49ab42
mov ecx, dword [ebx + 0x10]
test ecx, ecx
jle 0x49ab61
mov dword [esp], esi
call dbg.pthread_mutex_unlock
add esp, 0x14
pop ebx
pop esi
ret
call sym.___pthread_self_lite.part.0
mov ebx, eax
test eax, eax
jne 0x49ab0a
add esp, 0x14
pop ebx
pop esi
ret
and eax, 0xfffffff3
and edx, 0xfffffffe
or eax, 4
mov dword [ebx + 0x24], edx
mov byte [ebx + 0x20], al
mov eax, dword [ebx + 0x18]
test eax, eax
je 0x49ab81
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push eax
mov dword [esp], esi
call dbg.pthread_mutex_unlock
call dbg._pthread_invoke_cancel
nop
Function at 0x49b600
Capabilities:
Get thread local storage value

Disassembly:
push esi
push ebx
sub esp, 0x24
mov esi, dword [esp + 0x30]
test esi, esi
je 0x49b738
mov dword [esp], 0x4bcf84
call dbg.pthread_mutex_lock
mov eax, esi
call dbg.__pthread_get_pointer
mov dword [esp], 0x4bcf84
mov ebx, eax
call dbg.pthread_mutex_unlock
test ebx, ebx
je 0x49b738
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x49b738
lea edx, [esp + 0x1c]
mov dword [esp], eax
mov dword [esp + 4], edx
call dword [sym.imp.KERNEL32.dll_GetHandleInformation]
sub esp, 8
test eax, eax
je 0x49b738
test byte [ebx + 0x24], 4
jne 0x49b748
cmp dword [0x26c26b4], 1
je 0x49b679
call sym.__pthread_once_raw.part.0.constprop.0
mov eax, dword [0x4bcf8c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
test eax, eax
je 0x49b758
cmp esi, dword [eax + 0xb4]
je 0x49b770
mov ecx, dword [ebx + 0x68]
mov eax, dword [ebx + 0x14]
test ecx, ecx
je 0x49b6b0
lea edx, [eax - 1]
cmp edx, 0xfffffffd
ja 0x49b6c7
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [ebx + 0x14]
sub esp, 8
mov dword [esp], eax
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
mov eax, dword [ebx + 0x18]
sub esp, 4
test eax, eax
je 0x49b6e4
mov dword [esp], eax
call esi
sub esp, 4
mov edx, dword [esp + 0x34]
mov dword [ebx + 0x18], 0
test edx, edx
je 0x49b6fc
mov eax, dword [ebx + 4]
mov ecx, dword [esp + 0x34]
mov dword [ecx], eax
lea eax, [ebx + 0x1c]
mov dword [esp], eax
call dbg.pthread_mutex_destroy
lea eax, [ebx + 0x38]
mov dword [esp], eax
call dbg.pthread_spin_destroy
cmp eax, 1
je 0x49b777
mov eax, dword [ebx + 0xb0]
mov dword [ebx + 0x38], 0xffffffff
xor esi, esi
test eax, eax
jne 0x49b73d
mov eax, ebx
call sym._push_pthread_mem.part.0
jmp 0x49b73d
mov esi, 3
add esp, 0x24
mov eax, esi
pop ebx
pop esi
ret
mov esi, 0x16
add esp, 0x24
mov eax, esi
pop ebx
pop esi
ret
call sym.___pthread_self_lite.part.0
test eax, eax
je 0x49b69e
jmp 0x49b692
mov esi, 0x24
jmp 0x49b73d
call sym._replace_spin_keys.part.0
lea esi, [esi]

Function at 0x49ee10
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 0x49ee70
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x30
mov esi, dword [0x26c2700]
test esi, esi
jle 0x49ef90
mov eax, dword [0x26c2704]
xor ecx, ecx
add eax, 0xc
mov edx, dword [eax]
cmp edx, ebx
ja 0x49eea4
mov edi, dword [eax + 4]
add edx, dword [edi + 8]
cmp ebx, edx
jb 0x49ef27
add ecx, 1
add eax, 0x14
cmp ecx, esi
jne 0x49ee90
mov dword [esp], ebx
call dbg.__mingw_GetSectionForAddress
mov edi, eax
test eax, eax
je 0x49efb7
mov eax, dword [0x26c2704]
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 [0x26c2704]
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 0x49ef97
mov eax, dword [esp + 0x28]
lea edx, [eax - 0x40]
and edx, 0xffffffbf
je 0x49ef20
lea edx, [eax - 4]
and edx, 0xfffffffb
jne 0x49ef30
add dword [0x26c2700], 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 [0x26c2704]
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 0x49ef20
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 0x49eeae
mov eax, dword [0x26c2704]
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 0x49f470
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x26c271c
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x26c2714]
sub esp, 4
test ebx, ebx
je 0x49f4c5
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 0x49f4be
test esi, esi
je 0x49f4be
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x49f4a0
mov dword [esp], 0x26c271c
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x49f7f0
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [0x400000], 0x5a4d
jne 0x49f815
mov ecx, dword [0x40003c]
cmp dword [ecx + 0x400000], 0x4550
lea edx, [ecx + 0x400000]
je 0x49f820
ret
cmp word [ecx + 0x400018], 0x10b
jne 0x49f815
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 0x49f868
xor ecx, ecx
nop
mov edx, dword [eax + 0xc]
cmp ebx, edx
jb 0x49f85e
add edx, dword [eax + 8]
cmp ebx, edx
jb 0x49f86a
add ecx, 1
add eax, 0x28
cmp ecx, esi
jne 0x49f850
xor eax, eax
pop ebx
pop esi
ret

Function at 0x4a01b0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x12c
mov ebx, dword [esp + 0x140]
call sym.__errno
mov dword [eax], 0
test ebx, ebx
je 0x4a0320
cmp byte [ebx], 0
je 0x4a0300
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
sub esp, 4
cmp eax, 0xffffffff
je 0x4a0330
test al, 0x10
je 0x4a0300
lea esi, [esp + 0x1c]
mov dword [esp + 4], ebx
mov dword [esp + 8], 0x104
mov dword [esp], esi
call sym.__fullpath
mov dword [esp], esi
call sym._strlen
mov ebp, eax
lea eax, [eax + 0x233]
mov dword [esp], eax
call sym._malloc
mov ebx, eax
test eax, eax
je 0x4a0342
lea edx, [ebp + 1]
lea eax, [eax + 0x22c]
cmp edx, 4
jb 0x4a02b0
mov ecx, dword [esi + edx - 4]
mov edi, eax
mov dword [eax + edx - 4], ecx
mov ecx, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
cmp byte [ebx + 0x22c], 0
jne 0x4a02d0
add ebp, eax
mov eax, 0x2a
lea edx, [ebx + 0x120]
mov ecx, 0x41
mov word [ebp], ax
mov edi, edx
xor eax, eax
mov dword [ebx + 0x224], 0xffffffff
mov dword [ebx + 0x228], 0
mov dword [ebx + 0x118], 0
mov dword [ebx + 0x11c], 0
rep stosd dword es:[edi], eax
add esp, 0x12c
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
test edx, edx
je 0x4a0253
movzx ecx, byte [esi]
mov byte [eax], cl
test dl, 2
je 0x4a0253
movzx ecx, word [esi + edx - 2]
mov word [eax + edx - 2], cx
jmp 0x4a0253
movzx ecx, byte [ebx + ebp + 0x22b]
add ebp, eax
cmp cl, 0x5c
je 0x4a025e
cmp cl, 0x2f
je 0x4a025e
mov ecx, 0x5c
mov word [ebp], cx
lea ebp, [eax + edx]
jmp 0x4a025e
call sym.__errno
xor ebx, ebx
mov dword [eax], 0x14
add esp, 0x12c
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
call sym.__errno
mov dword [eax], 0xe
jmp 0x4a02a0
call sym.__errno
xor ebx, ebx
mov dword [eax], 2
jmp 0x4a02a0
call sym.__errno
mov dword [eax], 0xc
jmp 0x4a02a0
Function at 0x408958
Capabilities:
Encode data using xor

Disassembly:
sub esp, 4
mov dword [esp], 0x4085d8
pop edi
call fcn.00408982
add edx, 0xdba69656
add edx, 1
xor dword [esi], edi
inc esi
or ebx, ebx
mov edx, ebx
cmp esi, ecx
jne fcn.00408958
or ebx, ebx
ret
Function at 0x401230
Capabilities:
Check if process is running under wine

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x18
mov ebx, dword [sym.imp.advapi32.dll_RegCloseKey]
mov dword [esp], eax
call ebx
lea eax, [ebp - 8]
sub esp, 4
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0xf003f
mov dword [esp + 8], 0
mov dword [esp + 4], str.SoftwareWine
mov dword [esp], 0x80000001
call dword [sym.imp.advapi32.dll_RegOpenKeyExA]
sub esp, 0x14
test eax, eax
jne 0x40129a
mov dword [esp + 4], str.Test
mov eax, dword [ebp - 8]
mov dword [esp], eax
call dword [0x41c260]
mov eax, dword [ebp - 8]
sub esp, 8
mov dword [esp], eax
call ebx
sub esp, 4
mov ebx, dword [ebp - 4]
leave
ret
Function at 0x401890
Capabilities:
Check if process is running under wine
Query environment variable
Set environment variable
Set registry value

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x1c
mov ebx, dword [sym.imp.kernel32.dll_SetEnvironmentVariableA]
mov dword [esp + 4], 0x40911a
mov dword [esp], str.LONGSYSTEMVAR
call ebx
sub esp, 8
mov dword [esp + 4], str.ImARatherLongButIndeedNeededString
mov dword [esp], 0x40914f
call ebx
lea eax, [ebp - 8]
sub esp, 8
mov dword [esp + 8], eax
mov dword [esp + 4], str.SoftwareWineTest
mov dword [esp], 0x80000001
call dword [sym.imp.advapi32.dll_RegCreateKeyA]
sub esp, 0xc
mov ebx, eax
call fcn.00404eb0
mov dword [eax], 0x40917b
mov dword [eax + 4], 0x17c
xor eax, eax
test ebx, ebx
sete al
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], str.Unexpected_retval__lu._n
call fcn.00401870
mov eax, dword [ebp - 8]
test eax, eax
je 0x401a3b
call fcn.00404eb0
mov ebx, dword [sym.imp.advapi32.dll_RegSetValueExA]
mov dword [eax], 0x40917b
mov dword [eax + 4], 0x180
mov dword [esp + 0x14], 0x18
mov dword [esp + 0x10], str._LONGSYSTEMVAR__subdir1
mov dword [esp + 0xc], 2
mov dword [esp + 8], 0
mov dword [esp + 4], str.Test1
mov eax, dword [ebp - 8]
mov dword [esp], eax
call ebx
sub esp, 0x18
test eax, eax
sete al
mov dword [esp + 4], str.RegSetValueExA_failed_n
movzx eax, al
mov dword [esp], eax
call fcn.00401870
call fcn.00404eb0
mov dword [eax], 0x40917b
mov dword [eax + 4], 0x181
mov dword [esp + 0x14], 0x18
mov dword [esp + 0x10], str._LONGSYSTEMVAR__subdir1
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0
mov dword [esp + 4], str.Test2
mov eax, dword [ebp - 8]
mov dword [esp], eax
call ebx
sub esp, 0x18
test eax, eax
sete al
mov dword [esp + 4], str.RegSetValueExA_failed_n
movzx eax, al
mov dword [esp], eax
call fcn.00401870
call fcn.00404eb0
mov dword [eax], 0x40917b
mov dword [eax + 4], 0x182
mov dword [esp + 0x14], 0xe
mov dword [esp + 0x10], str._FOO__subdir1
mov dword [esp + 0xc], 2
mov dword [esp + 8], 0
mov dword [esp + 4], str.Test3
mov eax, dword [ebp - 8]
mov dword [esp], eax
call ebx
sub esp, 0x18
test eax, eax
sete al
mov dword [esp + 4], str.RegSetValueExA_failed_n
movzx eax, al
mov dword [esp], eax
call fcn.00401870
mov ebx, dword [sym.imp.kernel32.dll_ExpandEnvironmentStringsA]
mov dword [esp + 8], 0x104
mov dword [esp + 4], 0x41c140
mov dword [esp], str._LONGSYSTEMVAR__subdir1
call ebx
sub esp, 0xc
mov dword [esp + 8], 0x104
mov dword [esp + 4], 0x41c020
mov dword [esp], str._FOO__subdir1
call ebx
mov eax, dword [ebp - 8]
mov dword [0x41c000], 0x2b
mov ebx, dword [ebp - 4]
sub esp, 0xc
leave
ret
Function at 0x401a90
Capabilities:
Check if process is running under wine
Contain obfuscated stackstrings

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
lea esi, [ebp - 0x114]
push ebx
lea ebx, [ebp - 0x110]
sub esp, 0x128
call fcn.00401890
lea ecx, [ebp - 0x118]
mov dword [ebp - 0x10c], 0x37363534
mov dword [ebp - 0x11c], eax
mov dword [ebp - 0x110], 0x33323130
mov dword [ebp - 0x109], 0x393837
mov dword [ebp - 0x118], 0x104
mov dword [ebp - 0x114], 0xffffffff
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], esi
mov dword [esp + 8], str.Test1
mov dword [esp + 4], str.SoftwareWineTest
mov dword [esp], 0x80000001
call dword [0x41c25c]
sub esp, 0x18
mov edi, eax
call fcn.00404eb0
mov dword [eax], 0x40917b
mov dword [eax + 4], 0x1b2
xor eax, eax
test edi, edi
sete al
mov dword [esp + 8], edi
mov dword [esp], eax
mov dword [esp + 4], str.Failed_to_get_value__ret__lu._n
call fcn.00401870
call fcn.00404eb0
mov edi, dword [sym.imp.msvcrt.dll_strcmp]
mov dword [eax], 0x40917b
mov dword [eax + 4], 0x1b4
mov dword [esp + 4], ebx
mov dword [esp], 0x41c140
call edi
mov dword [esp + 8], ebx
test eax, eax
mov dword [esp + 4], str.Unexpected_value__s._n
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401870
call fcn.00404eb0
mov dword [eax], 0x40917b
mov dword [eax + 4], 0x1b5
mov eax, dword [ebp - 0x114]
mov dword [esp + 4], str.Unexpected_type__ld._n
cmp eax, 1
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401870
lea ecx, [ebp - 0x118]
mov dword [ebp - 0x10c], 0x37363534
mov dword [ebp - 0x110], 0x33323130
mov dword [ebp - 0x109], 0x393837
mov dword [ebp - 0x118], 0x104
mov dword [ebp - 0x114], 0xffffffff
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], esi
mov dword [esp + 8], str.Test2
mov dword [esp + 4], str.SoftwareWineTest
mov dword [esp], 0x80000001
call dword [0x41c25c]
sub esp, 0x18
mov esi, eax
call fcn.00404eb0
mov dword [eax], 0x40917b
mov dword [eax + 4], 0x1bb
xor eax, eax
test esi, esi
sete al
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 4], str.Failed_to_get_value__ret__lu._n
call fcn.00401870
call fcn.00404eb0
mov dword [eax], 0x40917b
mov dword [eax + 4], 0x1bc
mov dword [esp + 4], ebx
mov dword [esp], str._LONGSYSTEMVAR__subdir1
call edi
mov dword [esp + 8], ebx
test eax, eax
mov dword [esp + 4], str.Unexpected_value__s._n
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401870
call fcn.00404eb0
mov dword [eax], 0x40917b
mov dword [eax + 4], 0x1bd
mov eax, dword [ebp - 0x114]
mov dword [esp + 4], str.Unexpected_type__ld._n
cmp eax, 1
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401870
mov eax, dword [ebp - 0x11c]
call fcn.00401230
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret