joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4014f0
Capabilities:
Extract resource via kernel32 functions
Get common file path
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov dword [esp + 8], 0xa
mov dword [esp + 4], 2
mov dword [esp], 0
mov eax, dword [sym.imp.KERNEL32.dll_FindResourceA]
call eax
sub esp, 0xc
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
mov dword [esp + 4], eax
mov dword [esp], 0
mov eax, dword [sym.imp.KERNEL32.dll_LoadResource]
call eax
sub esp, 8
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0xc]
mov dword [esp + 4], eax
mov dword [esp], 0
mov eax, dword [sym.imp.KERNEL32.dll_SizeofResource]
call eax
sub esp, 8
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_LockResource]
call eax
sub esp, 4
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov dword [esp + 4], eax
mov dword [esp], 0x104
mov eax, dword [sym.imp.KERNEL32.dll_GetTempPathW]
call eax
sub esp, 8
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov dword [esp + 8], str.video.wmv
mov dword [esp + 4], 0x104
mov dword [esp], eax
call fcn.004125a0
sub esp, 0xc
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], pe_nt_image_headers32
mov dword [esp + 0x10], 2
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x40000000
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CreateFileW]
call eax
sub esp, 0x1c
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], 0
mov dword [esp + 0x10], 0
lea eax, [ebp - 0x20]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x14]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x18]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_WriteFile]
call eax
sub esp, 0x14
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_FreeResource]
call eax
sub esp, 4
nop
leave
ret
Function at 0x4017c2
Capabilities:
Hide graphical window

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push ecx
sub esp, 0x24
call fcn.0040b0d0
mov dword [esp], 0x208
call fcn.00421020
mov dword [ebp - 0x10], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetConsoleWindow]
call eax
mov dword [esp + 4], 0
mov dword [esp], eax
mov eax, dword [sym.imp.USER32.dll_ShowWindow]
call eax
sub esp, 8
lea eax, [ebp - 0x10]
mov dword [esp], eax
call fcn.004014f0
lea eax, [ebp - 0x10]
mov dword [esp], eax
call fcn.00401649
mov edx, dword [0x435040]
mov eax, dword [0x435040]
mov eax, dword [eax]
add eax, 0x1c
mov eax, dword [eax]
mov dword [esp], edx
call eax
sub esp, 4
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
js 0x401865
mov edx, dword [0x435044]
mov eax, dword [0x435044]
mov eax, dword [eax]
add eax, 0x24
mov eax, dword [eax]
lea ecx, [ebp - 0x14]
mov dword [esp + 8], ecx
mov dword [esp + 4], 0xffffffff
mov dword [esp], edx
call eax
sub esp, 0xc
call fcn.0040175b
mov eax, 1
mov ecx, dword [ebp - 4]
leave
lea esp, [ecx - 4]
ret

Function at 0x40b290
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov dword [esp], 2
lea ebx, [esp + 0x24]
call fcn.00419a30
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 sub.msvcrt.dll_fwrite
mov dword [esp], 2
call fcn.00419a30
mov edx, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], edx
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
lea esi, [esi]
Function at 0x40b2f0
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x30
mov esi, dword [0x435078]
test esi, esi
jle 0x40b410
mov eax, dword [0x43507c]
xor ecx, ecx
add eax, 0xc
mov edx, dword [eax]
cmp ebx, edx
jb 0x40b324
mov edi, dword [eax + 4]
add edx, dword [edi + 8]
cmp ebx, edx
jb 0x40b3a7
add ecx, 1
add eax, 0x14
cmp ecx, esi
jne 0x40b310
mov dword [esp], ebx
call fcn.0040bce0
mov edi, eax
test eax, eax
je 0x40b437
mov eax, dword [0x43507c]
lea ebx, [esi + esi*4]
shl ebx, 2
add eax, ebx
mov dword [eax + 0x10], edi
mov dword [eax], 0
call fcn.0040be20
mov edx, dword [0x43507c]
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 0x40b417
mov eax, dword [esp + 0x28]
lea edx, [eax - 0x40]
and edx, 0xffffffbf
je 0x40b3a0
lea edx, [eax - 4]
and edx, 0xfffffffb
jne 0x40b3b0
add dword [0x435078], 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 [0x43507c]
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 0x40b3a0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call fcn.0040b290
lea esi, [esi]
lea esi, [esi]
xor esi, esi
jmp 0x40b32e
mov eax, dword [0x43507c]
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 fcn.0040b290
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call fcn.0040b290
lea esi, [esi]
nop

Function at 0x40b950
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x435094
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x43508c]
sub esp, 4
test ebx, ebx
je 0x40b9a5
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 0x40b99e
test esi, esi
je 0x40b99e
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x40b980
mov dword [esp], 0x435094
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x40bce0
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [0x400000], 0x5a4d
jne 0x40bd05
mov ecx, dword [0x40003c]
cmp dword [ecx + 0x400000], 0x4550
lea edx, [ecx + 0x400000]
je 0x40bd10
ret
cmp word [ecx + 0x400018], 0x10b
jne 0x40bd05
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 0x40bd58
xor ecx, ecx
mov edx, dword [eax + 0xc]
cmp ebx, edx
jb 0x40bd4e
add edx, dword [eax + 8]
cmp ebx, edx
jb 0x40bd5a
add ecx, 1
add eax, 0x28
cmp ecx, esi
jne 0x40bd40
xor eax, eax
pop ebx
pop esi
ret
Function at 0x41ad70
Capabilities:
Print debug messages

Disassembly:
push ebx
sub esp, 0x58
lea ebx, [esp + 0x1b]
mov dword [esp + 0x1b], 0
mov dword [esp + 0x1f], 0
mov dword [esp + 0x23], 0
mov dword [esp + 0x27], 0
mov dword [esp + 0x2b], 0
mov dword [esp + 0x2f], 0
mov dword [esp + 0x33], 0
mov dword [esp + 0x37], 0
mov dword [esp + 0x3b], 0
mov dword [esp + 0x3f], 0
mov dword [esp + 0x43], 0
mov dword [esp + 0x47], 0
mov dword [esp + 0x4b], 0
mov byte [esp + 0x4f], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [esp + 8], str.Error_cleaning_up_spin_keys_for_thread__lu._n
mov dword [esp + 0xc], eax
mov dword [esp + 4], 0x35
mov dword [esp], ebx
call fcn.0041ad40
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
sub esp, 4
call sub.msvcrt.dll_abort
lea esi, [esi]
nop

Function at 0x41afe0
Capabilities:
Allocate thread local storage

Disassembly:
cmp dword [0x435af0], 1
je 0x41b098
push edi
mov eax, 0x435af0
push esi
push ebx
sub esp, 0x10
call fcn.0041a970
lea esi, [eax + 4]
mov ebx, eax
mov dword [esp], esi
call fcn.0041a280
mov edi, dword [0x435af0]
test edi, edi
jne 0x41b050
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x423058], eax
cmp eax, 0xffffffff
je 0x421f4d
mov dword [0x435af0], 1
mov dword [esp], esi
call fcn.0041a5b0
test ebx, ebx
je 0x41b08a
add esp, 0x10
mov eax, ebx
pop ebx
pop esi
pop edi
jmp fcn.0041ab90
cmp edi, 1
je 0x41b032
mov dword [esp], 2
call dword [0x423040]
mov dword [esp + 0xc], edi
mov dword [esp + 8], 0x435af0
mov dword [esp + 4], str._once__p_is__ld_n
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [esp], esi
call fcn.0041a5b0
test ebx, ebx
jne 0x41b03e
add esp, 0x10
pop ebx
pop esi
pop edi
ret
ret
call sub.msvcrt.dll_abort
call sub.msvcrt.dll_abort
mov eax, dword [0x14]
ud2

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

Disassembly:
sub esp, 0x1c
call fcn.0041afe0
mov eax, dword [0x423058]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
test eax, eax
je 0x41b1f8
add esp, 0x1c
ret
add esp, 0x1c
jmp fcn.0041b0a0
Function at 0x41b960
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x2c
mov ebx, dword [esp + 0x40]
mov edx, dword [esp + 0x44]
mov eax, dword [ebx]
test edx, edx
je 0x41ba80
cmp eax, 1
je 0x41b9b4
mov eax, ebx
call fcn.0041a970
lea edi, [eax + 4]
mov esi, eax
mov dword [esp], edi
call fcn.0041a280
mov ebp, dword [ebx]
test ebp, ebp
je 0x41b9c0
cmp ebp, 1
jne 0x41ba50
mov dword [esp], edi
call fcn.0041a5b0
test esi, esi
je 0x41b9b4
mov eax, esi
call fcn.0041ab90
add esp, 0x2c
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0x14], 0x41ac50
mov dword [esp + 0x18], esi
call fcn.0041afe0
mov eax, dword [0x423058]
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [esp], eax
call ebp
sub esp, 4
test eax, eax
je 0x41bab8
mov eax, dword [eax + 0xc]
mov dword [esp + 0x1c], eax
lock or dword [esp], 0
call fcn.0041afe0
mov eax, dword [0x423058]
mov dword [esp], eax
call ebp
sub esp, 4
test eax, eax
je 0x41baa0
lea edx, [esp + 0x14]
mov dword [eax + 0xc], edx
lock or dword [esp], 0
call dword [esp + 0x44]
call fcn.0041afe0
mov eax, dword [0x423058]
mov dword [esp], eax
call ebp
sub esp, 4
test eax, eax
je 0x41ba90
mov edx, dword [esp + 0x1c]
mov dword [eax + 0xc], edx
mov dword [ebx], 1
jmp 0x41b9a1
mov dword [esp], 2
call dword [0x423040]
mov dword [esp + 0xc], ebp
mov dword [esp + 8], ebx
mov dword [esp + 4], str._once__p_is__ld_n
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
jmp 0x41b9a1
add esp, 0x2c
mov eax, 0x16
pop ebx
pop esi
pop edi
pop ebp
ret
call fcn.0041b0a0
test eax, eax
jne 0x41ba38
jmp 0x421f65
call fcn.0041b0a0
test eax, eax
jne 0x41ba12
jmp 0x421f77
call fcn.0041b0a0
test eax, eax
jne 0x41b9ec
jmp 0x421f70
mov eax, dword [esp + 0x1c]
mov dword [0], eax
ud2
mov eax, dword [pe_dos_header]
ud2
lea eax, [esp + 0x14]
mov dword [0], eax
ud2

Function at 0x41bd10
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
call fcn.0041afe0
mov eax, dword [0x423058]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov ebx, eax
test eax, eax
je 0x41bd88
lea ebp, [ebx + 0x38]
xor edi, edi
mov dword [esp], ebp
call fcn.0041e620
mov eax, dword [ebx + 0x28]
cmp dword [esp + 0x30], eax
jae 0x41bd64
mov eax, dword [ebx + 0x30]
mov edx, dword [esp + 0x30]
cmp byte [eax + edx], 0
je 0x41bd64
mov eax, dword [ebx + 0x2c]
mov edi, dword [eax + edx*4]
mov dword [esp], ebp
call fcn.0041e670
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, edi
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret
call fcn.0041b0a0
mov ebx, eax
jmp 0x41bd3b
Function at 0x41bda0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x2c
mov esi, dword [esp + 0x40]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x14], eax
call fcn.0041afe0
mov eax, dword [0x423058]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov ebx, eax
test eax, eax
je 0x41bec0
lea edi, [ebx + 0x38]
mov dword [esp], edi
call fcn.0041e620
cmp esi, dword [ebx + 0x28]
jae 0x41be20
mov edx, dword [ebx + 0x2c]
mov eax, dword [esp + 0x44]
mov dword [edx + esi*4], eax
mov eax, dword [ebx + 0x30]
mov byte [eax + esi], 1
mov dword [esp], edi
call fcn.0041e670
mov eax, dword [esp + 0x14]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
sub esp, 4
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret
lea ebp, [esi + 1]
lea eax, [ebp*4]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x2c]
mov dword [esp], eax
call sub.msvcrt.dll_realloc
test eax, eax
je 0x41becc
mov dword [esp + 0x1c], eax
mov dword [esp + 4], ebp
mov eax, dword [ebx + 0x30]
mov dword [esp], eax
call sub.msvcrt.dll_realloc
mov edx, dword [esp + 0x1c]
test eax, eax
mov dword [esp + 0x18], eax
je 0x41becc
mov ecx, dword [ebx + 0x28]
mov eax, ebp
mov dword [esp + 4], 0
mov dword [esp + 0x1c], edx
sub eax, ecx
lea ecx, [edx + ecx*4]
shl eax, 2
mov dword [esp], ecx
mov dword [esp + 8], eax
call sub.msvcrt.dll_memset
mov eax, dword [ebx + 0x28]
mov edx, dword [esp + 0x18]
mov ecx, ebp
mov dword [esp + 4], 0
sub ecx, eax
add eax, edx
mov dword [esp + 8], ecx
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
mov dword [ebx + 0x28], ebp
mov dword [ebx + 0x2c], edx
mov dword [ebx + 0x30], eax
jmp 0x41bde8
call fcn.0041b0a0
mov ebx, eax
jmp 0x41bdd5
mov dword [esp], edi
call fcn.0041e670
mov eax, 0xc
jmp 0x41be10

Function at 0x41bf50
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 0x1c
call fcn.0041afe0
mov eax, dword [0x423058]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
test eax, eax
je 0x41bf78
mov eax, dword [eax + 0x18]
add esp, 0x1c
ret
call fcn.0041b0a0
test eax, eax
jne 0x41bf6d
add esp, 0x1c
ret

Function at 0x41bfe0
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 0x1c
call fcn.0041afe0
mov eax, dword [0x423058]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
test eax, eax
je 0x41c008
add eax, 0xc
add esp, 0x1c
ret
call fcn.0041b0a0
test eax, eax
jne 0x41bffd
jmp 0x41c000
Function at 0x41c040
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 fcn.0041b1d0
mov dword [eax + 4], esi
mov ebx, eax
mov eax, dword [eax + 0xb4]
test eax, eax
je 0x41c062
call fcn.0041b200
test byte [ebx + 0x20], 0x30
jne 0x41c07c
add ebx, 0x70
mov dword [esp + 4], 1
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll_longjmp]
mov eax, dword [0x423058]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, eax
push edx
test eax, eax
je 0x41c0bd
cmp dword [ebx + 0x14], 0
mov eax, dword [eax + 0x18]
je 0x41c0fd
mov dword [ebx + 0x68], 1
mov esi, dword [ebx + 4]
test eax, eax
je 0x41c0b2
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
xor eax, eax
mov dword [ebx + 0x18], eax
test byte [ebx + 0x24], 4
jne 0x41c0c6
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]
xor eax, eax
push ecx
mov dword [ebx + 0x14], eax
mov eax, ebx
call fcn.0041afc0
xor eax, eax
mov dword [esp + 4], eax
mov eax, dword [0x423058]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push edx
push edx
jmp 0x41c0bd
mov dword [ebx], 0xdeadbeef
test eax, eax
je 0x41c111
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
xor eax, eax
mov esi, dword [ebx + 4]
mov dword [ebx + 0x18], eax
jmp 0x41c0de

Function at 0x41c120
Capabilities:
Get thread local storage value

Disassembly:
mov eax, dword [0x435af8]
test eax, eax
jne 0x41c130
xor eax, eax
ret
sub esp, 0x1c
call fcn.0041afe0
mov eax, dword [0x423058]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
test eax, eax
je 0x41c170
mov edx, dword [eax + 0x10]
test edx, edx
jle 0x41c160
xor eax, eax
add esp, 0x1c
ret
test byte [eax + 0x20], 3
je 0x41c154
mov eax, dword [eax + 0x24]
and eax, 1
jmp 0x41c156
call fcn.0041b0a0
test eax, eax
jne 0x41c14d
jmp 0x41c154

Function at 0x41c180
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 0x1c
call fcn.0041afe0
mov eax, dword [0x423058]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
test eax, eax
je 0x41c1c0
mov edx, dword [esp + 0x20]
test edx, edx
jle 0x41c1b0
lock add dword [eax + 0x10], 1
add esp, 0x1c
ret
lock sub dword [eax + 0x10], 1
add esp, 0x1c
ret
call fcn.0041b0a0
test eax, eax
jne 0x41c19d
add esp, 0x1c
ret
Function at 0x41c2c0
Capabilities:
Get thread local storage value

Disassembly:
push esi
push ebx
sub esp, 0x14
call fcn.0041afe0
mov eax, dword [0x423058]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov ebx, eax
test eax, eax
je 0x41c330
test byte [ebx + 0x20], 0xc
jne 0x41c2f0
mov eax, dword [0x435af8]
test eax, eax
jne 0x41c300
add esp, 0x14
pop ebx
pop esi
ret
lea esi, [ebx + 0x1c]
mov dword [esp], esi
call fcn.0041a280
movzx eax, byte [ebx + 0x20]
test al, 3
je 0x41c322
mov edx, dword [ebx + 0x24]
test dl, 1
je 0x41c322
mov ecx, dword [ebx + 0x10]
test ecx, ecx
jle 0x41c341
mov dword [esp], esi
call fcn.0041a5b0
add esp, 0x14
pop ebx
pop esi
ret
call fcn.0041b0a0
mov ebx, eax
test eax, eax
jne 0x41c2e1
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 0x41c361
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push eax
mov dword [esp], esi
call fcn.0041a5b0
call fcn.0041c1d0
nop
push edi
push esi
push ebx
sub esp, 0x10
mov eax, dword [esp + 0x20]
test eax, eax
je 0x41c3f0
mov dword [esp], eax
call fcn.0041d6c0
mov edi, eax
mov eax, 0xfffffffe
cmp eax, edi
mov eax, 0
sbb eax, edx
jb 0x41c430
call fcn.0041afe0
mov eax, dword [0x423058]
mov esi, edi
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov ebx, eax
test eax, eax
je 0x41c490
test edi, edi
je 0x41c40a
call fcn.0041c2c0
mov eax, dword [ebx + 0x18]
test eax, eax
je 0x41c468
mov dword [esp + 4], esi
mov dword [esp], eax
call fcn.0041d7c0
call fcn.0041c2c0
add esp, 0x10
xor eax, eax
pop ebx
pop esi
pop edi
ret
call fcn.0041afe0
mov eax, dword [0x423058]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
test eax, eax
je 0x41c480
call fcn.0041c2c0
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_Sleep]
sub esp, 4
call fcn.0041c2c0
add esp, 0x10
xor eax, eax
pop ebx
pop esi
pop edi
ret
call fcn.0041afe0
mov eax, dword [0x423058]
mov esi, 0xffffffff
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov ebx, eax
test eax, eax
jne 0x41c3c2
call fcn.0041b0a0
mov ebx, eax
jmp 0x41c3c2
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_Sleep]
sub esp, 4
jmp 0x41c3de
call fcn.0041b0a0
jmp 0x41c40a
call fcn.0041b0a0
mov ebx, eax
jmp 0x41c3be
Function at 0x401000
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push esi
mov esi, dword [esp + 0xc]
test esi, esi
je 0x401090
push ebp
mov ebp, dword [esp + 0x14]
push edi
mov edi, dword [esp + 0x10]
push ebx
cmp byte [esi], 0
je 0x40108d
push 0x5c
push esi
call dword [sym.imp.MSVCR71.dll_strchr]
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x40108d
push edi
mov byte [esi], 0
call dword [sym.imp.kernel32.dll_GetFileAttributesA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x401066
push 0
push edi
call dword [sym.imp.kernel32.dll_CreateDirectoryA]
test eax, eax
jne 0x40105f
test ebp, ebp
je 0x40105f
push edi
push str.CreateDirectory___s_
push 5
call ebp
add esp, 0xc
jmp 0x401066
push edi
push 1
call ebp
pop ecx
pop ecx
test bl, 0x10
jne 0x401087
push 0xb7
call dword [sym.imp.kernel32.dll_SetLastError]
test ebp, ebp
je 0x401087
push edi
push str.CreateDirectory___s_
push 5
call ebp
add esp, 0xc
mov byte [esi], 0x5c
inc esi
jne 0x401018
pop ebx
pop edi
pop ebp
xor eax, eax
inc eax
pop esi
ret

Function at 0x402bf1
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
pushal
call 0x402c00
pop dword [ebp - 0x14]
mov eax, 0xf28f87b2
sub eax, 0xf24f5bb2
sub dword [ebp - 0x14], eax
mov dword [ebp - 0x24], 0xfa85c8da
sub dword [ebp - 0x24], 0xac33838f
mov dword [ebp - 0x20], 0x56ed88bf
sub dword [ebp - 0x20], 0x24ba3c7a
mov dword [ebp - 0x1c], 0x6d246973
sub dword [ebp - 0x1c], 0x20d82545
mov dword [ebp - 0x18], 0xafa9a0d7
add dword [ebp - 0x18], 0x50565f29
lea eax, [ebp - 0x24]
push eax
mov eax, sym.imp.kernel32.dll_GetModuleHandleA
add eax, dword [ebp - 0x14]
call dword [eax]
mov dword [ebp - 0x24], 0x4a76cadb
add dword [ebp - 0x24], 0x29fb9e7b
mov dword [ebp - 0x20], 0x647cf22a
sub dword [ebp - 0x20], 0x231090b5
mov dword [ebp - 0x1c], 0xde749221
add dword [ebp - 0x1c], 0x84fada4b
mov dword [ebp - 0x18], 0xdab0f3c6
add dword [ebp - 0x18], 0x254f0c3a
lea ebx, [ebp - 0x24]
push ebx
push eax
mov eax, 0xc1671d2c
sub eax, 0xc1269c58
add eax, dword [ebp - 0x14]
call dword [eax]
push 0x40
push 0x1000
push 0x3977e
push 0
call eax
mov ecx, 0xc3db4d14
sub ecx, 0xc3daf9f6
mov esi, eax
mov edi, 0x755c0780
sub edi, 0x751af780
add edi, dword [ebp - 0x14]
mov ebx, 0x110b2b59
sub dword [ebp - 8], eax
mov edx, dword [edi]
add dword [ebp - 4], edx
xor edx, ebx
add dword [ebp - 4], esi
mov dword [esi], edx
xor dword [ebp - 0x10], edx
add esi, 0x48598252
add esi, 0xb7a67db2
add edi, 4
loop 0x402d17
add eax, 0xc78a3d5e
sub eax, 0xc788fe13
mov ebx, eax
add eax, 5
mov ecx, 0x525e1a80
sub ecx, 0x521e1a80
add ecx, dword [ebp - 0x14]
call ebx
leave
ret
Function at 0x65801350
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x1c
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 0
call sym._CreateEventA_16
sub esp, 0x10
test eax, eax
mov dword [0x65a0e02c], eax
je 0x65801396
mov dword [esp], 0x65a0e030
call sym._InitializeCriticalSection_4
sub esp, 4
add esp, 0x1c
ret
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x3d
mov dword [esp + 4], 1
mov dword [esp], str.runtime:_failed_to_create_runtime_initialization_wait_event._n
add eax, 0x40
mov dword [esp + 0xc], eax
call sym._fwrite
call sym._abort
lea esi, [esi]
lea edi, [edi]

Function at 0x65801540
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x1c
call sym.__cgo_maybe_run_preinit
mov dword [esp], 0x65a0e030
call sym._EnterCriticalSection_4
sub esp, 4
mov dword [0x65a0e028], 1
mov dword [esp], 0x65a0e030
call sym._LeaveCriticalSection_4
mov eax, dword [0x65a0e02c]
sub esp, 4
mov dword [esp], eax
call sym._SetEvent_4
sub esp, 4
test eax, eax
je 0x65801588
add esp, 0x1c
ret
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x3b
mov dword [esp + 4], 1
mov dword [esp], str.runtime:_failed_to_signal_runtime_initialization_complete._n
add eax, 0x40
mov dword [esp + 0xc], eax
call sym._fwrite
call sym._abort
lea esi, [esi]
lea edi, [edi]