joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4e9a70
Capabilities:
Hash data using fnv

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push ecx
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
mov ebx, ecx
movzx eax, byte [edi]
xor eax, 0x811c9dc5
mov esi, dword [ebx + 4]
imul edx, eax, 0x1000193
movzx eax, byte [edi + 1]
xor edx, eax
movzx eax, byte [edi + 2]
imul edx, edx, 0x1000193
xor edx, eax
movzx eax, byte [edi + 3]
imul ecx, edx, 0x1000193
xor ecx, eax
imul eax, ecx, 0x1000193
mov ecx, dword [ebx + 0x18]
and ecx, eax
lea edx, [ecx*8]
mov ecx, dword [ebx + 0xc]
mov dword [esp + 0xc], edx
mov eax, dword [ecx + edx]
cmp esi, eax
je 0x4e9aec
mov esi, dword [ecx + edx + 4]
mov esi, dword [esi]
cmp esi, eax
je 0x4e9aec
mov ecx, dword [edi]
nop word [eax + eax]
mov esi, dword [esi + 4]
cmp ecx, dword [esi + 8]
je 0x4e9b34
cmp esi, eax
jne 0x4e9ae0
mov edi, dword [ebp + 0x10]
mov eax, dword [edi]
cmp esi, eax
je 0x4e9b1a
mov ecx, dword [edi + 4]
mov dword [ecx], eax
mov ecx, dword [eax + 4]
mov dword [ecx], esi
mov ecx, dword [esi + 4]
mov dword [ecx], edi
mov edx, dword [esi + 4]
mov ecx, dword [eax + 4]
mov dword [esi + 4], ecx
mov ecx, dword [edi + 4]
mov dword [eax + 4], ecx
mov dword [edi + 4], edx
mov edx, dword [esp + 0xc]
mov ecx, dword [ebx + 0xc]
add ecx, edx
mov eax, dword [ecx]
cmp eax, dword [ebx + 4]
jne 0x4e9b95
mov dword [ecx], edi
mov eax, dword [ebx + 0xc]
mov dword [edx + eax + 4], edi
jmp 0x4e9bb7
mov edx, dword [ebp + 0x10]
lea edi, [edx + 0xc]
mov dword [esp + 0xc], edx
mov ecx, dword [edx + 4]
mov eax, dword [edx]
mov dword [ecx], eax
mov ecx, dword [edx]
mov eax, dword [edx + 4]
mov dword [ecx + 4], eax
dec dword [ebx + 8]
mov eax, dword [edi + 0x14]
cmp eax, 8
jb 0x4e9b67
inc eax
mov ecx, edi
push eax
push dword [edi]
call fcn.004e2c50
mov edx, dword [esp + 0xc]
xor eax, eax
mov dword [edi + 0x14], 7
mov dword [edi + 0x10], 0
push edx
mov word [edi], ax
call fcn.00539d80
mov eax, dword [ebp + 8]
add esp, 4
mov dword [eax], esi
mov byte [eax + 4], 0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp eax, esi
jne 0x4e9b9d
mov dword [ecx], edi
jmp 0x4e9bb7
mov eax, dword [ecx + 4]
mov eax, dword [eax]
mov dword [ecx + 4], eax
cmp eax, edi
je 0x4e9bb7
mov ecx, dword [ebx + 0xc]
mov eax, dword [ecx + edx + 4]
mov eax, dword [eax + 4]
mov dword [ecx + edx + 4], eax
mov ecx, ebx
call fcn.004e9bd0
mov eax, dword [ebp + 8]
mov dword [eax], edi
pop edi
pop esi
mov byte [eax + 4], 1
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x4e9f40
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xb8
push ebx
push esi
mov esi, ecx
mov dword [esp + 0xc], 0
cmp byte [esi], 0
je 0x4e9f65
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
jmp 0x4e9f68
mov eax, dword [esi + 4]
push dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
test eax, eax
setne bl
test bl, bl
je 0x4e9ff2
cmp byte [ebp + 0xc], 0
je 0x4ea044
cmp byte [esi], 0
je 0x4e9f92
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
jmp 0x4e9f95
mov eax, dword [esi + 4]
push 0xea60
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x4ea044
cmp dword [0x5c1b2c], 2
jg 0x4e9feb
push 2
push 0x86
push str.d:webapps_b_build_slave_repo_build_src_baseprocessprocess_win.cc
lea ecx, [esp + 0x1c]
mov dword [esp + 0x18], 2
call fcn.004ebdd0
mov ecx, dword [ebp + 8]
add eax, 8
push ecx
push str.Error_waiting_for_process_exit__exit_code:
push eax
call fcn.004e3770
add esp, 8
mov ecx, eax
call fcn.004e7210
test byte [esp + 0xc], 2
jmp 0x4ea039
cmp dword [0x5c1b2c], 2
jg 0x4ea034
push 2
push 0x8d
push str.d:webapps_b_build_slave_repo_build_src_baseprocessprocess_win.cc
lea ecx, [esp + 0x1c]
mov dword [esp + 0x18], 4
call fcn.004ebdd0
mov ecx, dword [ebp + 8]
add eax, 8
push ecx
push str.Unable_to_terminate_process__exit_code:
push eax
call fcn.004e3770
add esp, 8
mov ecx, eax
call fcn.004e7210
test byte [esp + 0xc], 4
je 0x4ea044
lea ecx, [esp + 0x10]
call fcn.004ebe90
pop esi
mov al, bl
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x4ebe90
Capabilities:
Print debug messages
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x43c
mov eax, dword [0x5b46a4]
xor eax, esp
mov dword [esp + 0x438], eax
push ebx
mov ebx, ecx
push esi
push edi
lea edi, [ebx + 8]
push edi
call fcn.004eaa40
add esp, 4
lea eax, [esp + 0x10]
lea esi, [ebx + 0xc]
mov ecx, esi
push eax
call fcn.004e47b0
mov eax, dword [0x5c1b34]
test eax, eax
je 0x4ebef9
lea ecx, [esp + 0x10]
push ecx
push dword [ebx + 0xa0]
push dword [ebx + 0xa8]
push dword [ebx + 0xa4]
push dword [ebx]
call eax
add esp, 0x14
test al, al
jne 0x4ec021
test byte [0x5bd7a8], 2
je 0x4ebf19
cmp dword [esp + 0x24], 0x10
lea eax, [esp + 0x10]
cmovae eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
jmp 0x4ebf1e
cmp dword [ebx], 2
jl 0x4ebf5d
cmp dword [esp + 0x24], 0x10
lea edi, [esp + 0x10]
mov esi, dword [esp + 0x20]
cmovae edi, dword [esp + 0x10]
push 2
call fcn.0053ff15
add esp, 4
push eax
push 1
push esi
push edi
call fcn.00545c0c
push 2
call fcn.0053ff15
add esp, 0x14
push eax
call fcn.005450f4
lea edi, [ebx + 8]
add esp, 4
lea esi, [ebx + 0xc]
test byte [0x5bd7a8], 1
je 0x4ebf95
call fcn.004eb8c0
test al, al
je 0x4ebf95
cmp dword [esp + 0x24], 0x10
lea ecx, [esp + 0xc]
push 0
push ecx
push dword [esp + 0x28]
lea eax, [esp + 0x1c]
cmovae eax, dword [esp + 0x1c]
push eax
push dword [0x5c1b38]
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [ebx], 3
jne 0x4ec021
mov ecx, 0x400
lea eax, [esp + 0x10]
cmp dword [esp + 0x20], ecx
cmovb ecx, dword [esp + 0x20]
cmp dword [esp + 0x24], 0x10
cmovae eax, dword [esp + 0x10]
test ecx, ecx
je 0x4ebfcd
push ecx
push eax
lea eax, [esp + 0x48]
push eax
call fcn.0053b750
add esp, 0xc
lea eax, [esp + 0x40]
push eax
call fcn.00504490
add esp, 4
cmp dword [0x5c1b44], 0
je 0x4ec017
lea eax, [esp + 0x28]
mov ecx, esi
push eax
call fcn.004e47b0
lea eax, [esp + 0x28]
push eax
call dword [0x5c1b44]
mov eax, dword [esp + 0x40]
add esp, 4
cmp eax, 0x10
jb 0x4ec021
inc eax
lea ecx, [esp + 0x28]
push eax
push dword [esp + 0x2c]
call fcn.004e2910
jmp 0x4ec021
cmp byte [0x5c2bfc], 0
jne 0x4ec073
int3
mov eax, dword [esp + 0x24]
cmp eax, 0x10
jb 0x4ec039
inc eax
lea ecx, [esp + 0x10]
push eax
push dword [esp + 0x14]
call fcn.004e2910
push dword [ebx + 0xac]
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea esi, [edi + 0x50]
mov ecx, esi
call fcn.004e0c50
push esi
mov dword [esi], 0x5accc4
call fcn.005394a8
mov ecx, dword [esp + 0x448]
add esp, 4
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0053a230
mov esp, ebp
pop ebp
ret
push 1
call fcn.00549dc3
int3
Function at 0x4ee550
Capabilities:
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xbc
push ebx
push esi
push edi
mov edi, ecx
xor ebx, ebx
mov dword [esp + 0x14], edi
lea ecx, [esp + 0xc]
mov dword [esp + 0x10], ebx
cmp dword [edi + 0x70], ebx
je 0x4ee59e
push dword [edi + 0x70]
mov eax, dword [edi + 0x74]
push ecx
call eax
add esp, 8
mov esi, dword [eax]
mov dword [eax], ebx
mov ecx, dword [esp + 0xc]
mov dword [esp + 0xc], ebx
test ecx, ecx
je 0x4ee596
mov eax, dword [ecx]
push 1
call dword [eax]
mov ecx, dword [edi + 4]
mov dword [edi + 4], esi
jmp 0x4ee5c2
mov edx, dword [edi + 8]
call fcn.004ee0d0
mov edx, dword [eax]
mov dword [eax], ebx
mov ecx, dword [edi + 4]
mov dword [edi + 4], edx
test ecx, ecx
je 0x4ee5ba
mov eax, dword [ecx]
push 1
call dword [eax]
mov ecx, dword [esp + 0xc]
mov dword [esp + 0xc], ebx
test ecx, ecx
je 0x4ee5cc
mov eax, dword [ecx]
push 1
call dword [eax]
call fcn.004efa70
push edi
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x4ee61e
cmp dword [0x5c1b2c], 3
jg 0x4ee60d
push 3
push 0x23
push str.d:webapps_b_build_slave_repo_build_src_base_threading_thread_local_win.cc
lea ecx, [esp + 0x24]
lea ebx, [eax + 4]
call fcn.004ebdd0
add eax, 8
push str.Failed_to_TlsSetValue__.
push eax
call fcn.004e3770
add esp, 8
test bl, 4
je 0x4ee61e
lea ecx, [esp + 0x18]
and ebx, 0xfffffffb
call fcn.004ebe90
mov eax, dword [edi + 0xcc]
mov dword [esp + 0xc], eax
lea esi, [eax + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
test bl, 8
je 0x4ee643
lea ecx, [esp + 0x18]
and ebx, 0xfffffff7
call fcn.004ebe90
test bl, 0x10
je 0x4ee654
lea ecx, [esp + 0x18]
and ebx, 0xffffffef
call fcn.004ebe90
mov eax, dword [esp + 0xc]
cmp dword [eax + 0x34], 0
mov byte [eax + 0x42], 1
je 0x4ee6a2
test bl, 0x20
je 0x4ee677
lea ecx, [esp + 0x18]
and ebx, 0xffffffdf
call fcn.004ebe90
mov eax, dword [esp + 0xc]
mov eax, dword [eax + 0x38]
add eax, 4
mov dword [esp + 0x10], eax
test bl, 0x40
je 0x4ee693
lea ecx, [esp + 0x18]
call fcn.004ebe90
mov eax, dword [esp + 0x10]
mov ecx, dword [eax]
mov eax, dword [ecx]
call dword [eax + 0xc]
mov eax, dword [esp + 0xc]
mov byte [eax + 0x40], 1
mov ebx, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push esi
call ebx
mov edi, dword [edi + 0xd0]
lea esi, [edi + 0x10]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push esi
mov dword [edi + 0xc], eax
call ebx
mov esi, dword [esp + 0x14]
mov ecx, dword [esi + 0xd0]
mov dword [esi + 0xd0], 0
test ecx, ecx
je 0x4ee71d
add ecx, 4
or eax, 0xffffffff
lock xadd dword [ecx], eax
sub eax, 1
setne al
test al, al
jne 0x4ee71d
test ecx, ecx
je 0x4ee6fc
add ecx, 0xfffffffc
jmp 0x4ee6fe
xor ecx, ecx
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, 0x5ad9ec
jne 0x4ee72b
push 1
call dword [eax + 8]
mov ecx, esi
call fcn.004ee730
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, esi
call fcn.004ee730
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call edx
jmp 0x4ee71d
Function at 0x4efae0
Capabilities:
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xb4
push ebx
push dword [ebp + 8]
xor ebx, ebx
push dword [ecx]
mov dword [esp + 0xc], ebx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x4efb3f
cmp dword [0x5c1b2c], 3
jg 0x4efb31
push 3
push 0x23
push str.d:webapps_b_build_slave_repo_build_src_base_threading_thread_local_win.cc
lea ecx, [esp + 0x14]
lea ebx, [eax + 1]
call fcn.004ebdd0
add eax, 8
push str.Failed_to_TlsSetValue__.
push eax
call fcn.004e3770
add esp, 8
test bl, 1
je 0x4efb3f
lea ecx, [esp + 8]
call fcn.004ebe90
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x4f2720
Capabilities:
Check for time delay via queryperformancecounter
Execute anti-debugging instructions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
movsd xmm0, qword [0x5c1ba8]
xorps xmm1, xmm1
ucomisd xmm0, xmm1
push ebx
push esi
push edi
mov dword [ebp - 4], 0
lahf
test ah, 0x44
jp 0x4f285f
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentThread]
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GetThreadPriority]
push 2
mov dword [ebp - 4], eax
call esi
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov ecx, dword [0x5c2c48]
test cl, 1
jne 0x4f2787
rdtsc
or ecx, 1
mov dword [0x5c2c40], eax
mov dword [0x5c2c48], ecx
mov dword [0x5c2c44], edx
test cl, 2
jne 0x4f27b7
lea eax, [ebp - 0x10]
or ecx, 2
xorps xmm0, xmm0
mov dword [0x5c2c48], ecx
push eax
movq qword [ebp - 0x10], xmm0
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov eax, dword [ebp - 0x10]
mov dword [0x5c2c50], eax
mov eax, dword [ebp - 0xc]
mov dword [0x5c2c54], eax
rdtsc
mov edi, eax
xorps xmm0, xmm0
lea eax, [ebp - 0x10]
movq qword [ebp - 0x10], xmm0
push eax
mov ebx, edx
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
push dword [ebp - 4]
call esi
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
lea eax, [ebp - 0x18]
xorps xmm0, xmm0
push eax
movq qword [ebp - 0x18], xmm0
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
mov ecx, dword [ebp - 0x10]
sub ecx, dword [0x5c2c50]
mov edx, dword [ebp - 0xc]
sbb edx, dword [0x5c2c54]
call fcn.00560530
mov edx, dword [ebp - 0x14]
movaps xmm1, xmm0
mov ecx, dword [ebp - 0x18]
movsd qword [ebp - 0x10], xmm1
call fcn.00560570
movsd xmm2, qword [ebp - 0x10]
divsd xmm2, xmm0
movsd xmm1, qword [0x5af198]
comisd xmm1, xmm2
movsd qword [ebp - 0x10], xmm2
jbe 0x4f283d
xorps xmm0, xmm0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
sub edi, dword [0x5c2c40]
mov ecx, edi
sbb ebx, dword [0x5c2c44]
mov edx, ebx
call fcn.00560530
divsd xmm0, qword [ebp - 0x10]
movsd qword [0x5c1ba8], xmm0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4f2ab0
Capabilities:
Query environment variable
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x1010
call fcn.0053a250
mov eax, dword [0x5b46a4]
xor eax, esp
mov dword [esp + 0x100c], eax
mov eax, dword [ebp + 8]
lea edx, [esp]
push esi
push edi
mov edi, dword [ebp + 0xc]
push edx
lea edx, [esp + 0x14]
mov dword [esp + 0xc], 0
push edx
lea edx, [esp + 0x14]
mov dword [esp + 0x14], 1
push edx
push 0
push eax
push dword [ecx]
mov dword [esp + 0x20], 0x800
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov esi, eax
test esi, esi
jne 0x4f2bf7
mov ecx, dword [esp + 0xc]
cmp ecx, 1
jne 0x4f2b84
cmp word [esp + 0x10], ax
jne 0x4f2b48
xor ecx, ecx
lea eax, [esp + 0x10]
push ecx
push eax
mov ecx, edi
call fcn.004e1f10
mov eax, esi
pop edi
pop esi
mov ecx, dword [esp + 0x100c]
xor ecx, esp
call fcn.0053a230
mov esp, ebp
pop ebp
ret 8
lea ecx, [esp + 0x10]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4f2b50
sub ecx, edx
lea eax, [esp + 0x10]
sar ecx, 1
push ecx
push eax
mov ecx, edi
call fcn.004e1f10
mov eax, esi
pop edi
pop esi
mov ecx, dword [esp + 0x100c]
xor ecx, esp
call fcn.0053a230
mov esp, ebp
pop ebp
ret 8
cmp ecx, 2
jne 0x4f2bf2
push 0x400
lea eax, [esp + 0x814]
push eax
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov dword [esp + 8], eax
test eax, eax
je 0x4f2bd7
cmp eax, 0x400
ja 0x4f2bd7
lea eax, [esp + 0x810]
mov ecx, edi
push eax
call fcn.004e6070
mov eax, esi
pop edi
pop esi
mov ecx, dword [esp + 0x100c]
xor ecx, esp
call fcn.0053a230
mov esp, ebp
pop ebp
ret 8
mov eax, 0xea
pop edi
pop esi
mov ecx, dword [esp + 0x100c]
xor ecx, esp
call fcn.0053a230
mov esp, ebp
pop ebp
ret 8
mov eax, 0x3f4
mov ecx, dword [esp + 0x1014]
pop edi
pop esi
xor ecx, esp
call fcn.0053a230
mov esp, ebp
pop ebp
ret 8

Function at 0x4f2e00
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc
push ebx
push esi
mov dword [esp + 0xc], 0
mov esi, edx
cmp dword [ecx + 0x14], 8
push edi
jb 0x4f2e1e
mov ecx, dword [ecx]
lea eax, [esp + 0x14]
mov dword [esp + 0x10], 0
push eax
lea eax, [esp + 0x14]
push eax
push 0
push 0x20006
push 0
push 0
push 0
push ecx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x4f2ea9
mov edi, dword [esp + 0x10]
test edi, edi
je 0x4f2ea9
mov edx, dword [ebp + 8]
cmp dword [edx + 0x14], 8
jb 0x4f2e60
mov edx, dword [edx]
cmp dword [esi + 0x14], 8
jb 0x4f2e68
mov esi, dword [esi]
mov ecx, edx
lea ebx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4f2e70
sub ecx, ebx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push edx
push 1
push 0
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
push edi
sete bl
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, bl
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4f2ec0
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc
push ebx
push esi
mov dword [esp + 0xc], 0
mov esi, edx
cmp dword [ecx + 0x14], 8
push edi
jb 0x4f2ede
mov ecx, dword [ecx]
lea eax, [esp + 0x14]
mov dword [esp + 0x10], 0
push eax
lea eax, [esp + 0x14]
push eax
push 0
push 0x20006
push 0
push 0
push 0
push ecx
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x4f2f69
mov edi, dword [esp + 0x10]
test edi, edi
je 0x4f2f69
mov edx, dword [ebp + 8]
cmp dword [edx + 0x14], 8
jb 0x4f2f20
mov edx, dword [edx]
cmp dword [esi + 0x14], 8
jb 0x4f2f28
mov esi, dword [esi]
mov ecx, edx
lea ebx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4f2f30
sub ecx, ebx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push edx
push 1
push 0
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
push edi
sete bl
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, bl
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x4f3da0
Capabilities:
Get thread local storage value

Disassembly:
push esi
mov esi, ecx
call fcn.004efa70
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [esi], eax
mov eax, esi
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], esi
pop esi
ret

Function at 0x4f3f00
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
mov ebx, edx
mov esi, ecx
push edi
test ebx, ebx
je 0x4f3f27
mov dword [ebx + 0x10], 0
cmp dword [ebx + 0x14], 0x10
jb 0x4f3f22
mov eax, dword [ebx]
jmp 0x4f3f24
mov eax, ebx
mov byte [eax], 0
call fcn.004e5d00
test al, al
je 0x4f3f39
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, esi
call fcn.004e6d80
mov edi, eax
mov dword [ebp - 0xc], edi
test edi, edi
je 0x4f3f30
push 0x10000
call fcn.0053a5a4
add esp, 4
mov dword [ebp - 8], 0
mov esi, eax
push edi
push 0x10000
push 1
push esi
call fcn.005468fe
mov edi, eax
add esp, 0x10
test edi, edi
je 0x4f3fc6
mov eax, dword [ebp + 8]
nop dword [eax]
test ebx, ebx
je 0x4f3f9c
mov ecx, eax
mov eax, edi
sub ecx, dword [ebp - 8]
cmp ecx, edi
cmovb eax, ecx
mov ecx, ebx
push eax
push esi
call fcn.004e2550
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 8]
sub eax, ecx
cmp eax, edi
jb 0x4f3fdc
push dword [ebp - 0xc]
add ecx, edi
push 0x10000
push 1
push esi
mov dword [ebp - 8], ecx
call fcn.005468fe
mov edi, eax
add esp, 0x10
mov eax, dword [ebp + 8]
test edi, edi
jne 0x4f3f80
mov ebx, dword [ebp - 0xc]
push ebx
call fcn.0054642b
add esp, 4
test eax, eax
jne 0x4f3fdf
mov byte [ebp - 1], 1
jmp 0x4f3fe3
mov ebx, dword [ebp - 0xc]
mov byte [ebp - 1], 0
push ebx
call fcn.005464cc
add esp, 4
test esi, esi
je 0x4f3ff9
push esi
call fcn.0053a22b
add esp, 4
mov al, byte [ebp - 1]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x4f4030
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
xor edx, edx
mov ecx, dword [ebp + 8]
pop ebp
jmp fcn.004e6b20
Function at 0x4f6c60
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
mov ebx, dword [ebp + 8]
mov edx, ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 4], 0
push 0xffffffffffffffff
lea esi, [edi + 4]
mov ecx, esi
call fcn.004f3f00
add esp, 4
test al, al
jne 0x4f6ce2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
je 0x4f6cd4
cmp eax, 0x21
je 0x4f6cd4
cmp eax, 5
jne 0x4f6cad
mov eax, 0x3e8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x14], 8
jb 0x4f6cb5
mov esi, dword [esi]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xor ecx, ecx
cmp eax, 0xffffffff
sete cl
lea eax, [ecx*2 + 0x3e9]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, 0x3ea
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebx + 0x10]
mov dword [edi + 0x20], eax
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x4f79f0
Capabilities:
Get geographical location
Identify system language via api

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x5b46a4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov esi, edx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x20], 0
call dword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
movzx edi, ax
mov eax, 0x1400
cmp ax, di
je 0x4f7a9f
push 9
lea eax, [ebp - 0x18]
mov ebx, edi
push eax
push 0x59
push ebx
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
cmp eax, 1
jle 0x4f7a9f
mov ecx, dword [ebp - 0x1c]
dec eax
push eax
lea eax, [ebp - 0x18]
push eax
call fcn.004e1f10
mov dword [esi + 0x10], 0
cmp dword [esi + 0x14], 8
jb 0x4f7a57
mov eax, dword [esi]
jmp 0x4f7a59
mov eax, esi
xor ecx, ecx
and edi, 0xfc00
mov word [eax], cx
xor eax, eax
cmp ax, di
je 0x4f7a8c
push 9
lea eax, [ebp - 0x18]
push eax
push 0x5a
push ebx
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
cmp eax, 1
jle 0x4f7a8c
dec eax
mov ecx, esi
push eax
lea eax, [ebp - 0x18]
push eax
call fcn.004e1f10
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0053a230
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor al, al
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0053a230
mov esp, ebp
pop ebp
ret
Function at 0x4f7f20
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov ebx, ecx
mov dword [ebp - 4], 0
push edi
mov edi, edx
test ebx, ebx
je 0x4f7f82
cmp dword [0x5c2c30], 0
jne 0x4f7f6f
push 0x4c
call fcn.00539d85
add esp, 4
mov ecx, eax
call fcn.004eb4a0
mov edx, eax
mov esi, 0x5c2c30
mov ecx, edx
xor eax, eax
lock cmpxchg dword [esi], ecx
test eax, eax
je 0x4f7f6f
test edx, edx
je 0x4f7f6f
push ecx
mov ecx, edx
call fcn.004eb460
mov eax, dword [0x5c2c30]
cmp dword [eax], 1
jl 0x4f7f82
mov dword [ebp - 4], 0x10000
jmp 0x4f7f84
xor ebx, ebx
push 0xc
call fcn.00539d85
add esp, 4
mov esi, eax
push 0
push dword [ebp - 4]
mov dword [esi], edi
mov edi, dword [ebp + 8]
test edi, edi
push esi
push 0x4f7e10
setne cl
push ebx
mov byte [esi + 4], cl
mov ecx, dword [ebp + 0xc]
push 0
mov dword [esi + 8], ecx
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
jne 0x4f7fcd
push esi
call fcn.00539d80
add esp, 4
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test edi, edi
je 0x4f7fdc
mov dword [edi], eax
mov al, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x4f8340
Capabilities:
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xb8
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push eax
mov dword [esp + 0x10], ebx
mov dword [esi], eax
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x4f83a5
cmp dword [0x5c1b2c], 3
jg 0x4f8397
push 3
push 0x23
push str.d:webapps_b_build_slave_repo_build_src_base_threading_thread_local_win.cc
lea ecx, [esp + 0x1c]
lea ebx, [eax + 2]
call fcn.004ebdd0
add eax, 8
push str.Failed_to_TlsSetValue__.
push eax
call fcn.004e3770
add esp, 8
test bl, 2
je 0x4f83a5
lea ecx, [esp + 0x10]
call fcn.004ebe90
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x4f83b0
Capabilities:
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xb4
mov eax, dword [ecx]
push ebx
xor ebx, ebx
push ebx
push dword [eax]
mov dword [esp + 0xc], ebx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x4f840f
cmp dword [0x5c1b2c], 3
jg 0x4f8401
push 3
push 0x23
push str.d:webapps_b_build_slave_repo_build_src_base_threading_thread_local_win.cc
lea ecx, [esp + 0x14]
lea ebx, [eax + 1]
call fcn.004ebdd0
add eax, 8
push str.Failed_to_TlsSetValue__.
push eax
call fcn.004e3770
add esp, 8
test bl, 1
je 0x4f840f
lea ecx, [esp + 8]
call fcn.004ebe90
pop ebx
mov esp, ebp
pop ebp
ret