joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402920
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x57e80
call fcn.00413820
mov eax, dword [0x427004]
xor eax, ebp
mov dword [ebp - 4], eax
xor eax, eax
mov dword [ebp - 0x57e60], 0
push eax
push eax
push eax
mov word [ebp - 0x57e4c], ax
lea eax, [ebp - 0x57e5c]
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0x57e60]
mov dword [ebp - 0x57e5c], 0x10001
push eax
mov dword [ebp - 0x57e58], 0x2ee0
mov dword [ebp - 0x57e54], 0x2ee0
mov dword [ebp - 0x57e50], 0x80001
call dword [sym.imp.WINMM.dll_waveOutOpen]
push 0x57e40
lea eax, [ebp - 0x57e48]
push 0
push eax
call fcn.00408770
add esp, 0xc
xor eax, eax
mov edx, eax
shr edx, 7
xor dl, al
mov cl, dl
shl dl, 2
add cl, dl
mov byte [ebp + eax - 0x57e48], cl
inc eax
cmp eax, 0x57e40
jb 0x4029a3
lea eax, [ebp - 0x57e48]
mov dword [ebp - 0x57e7c], 0x57e40
mov dword [ebp - 0x57e80], eax
lea eax, [ebp - 0x57e80]
push 0x20
push eax
push dword [ebp - 0x57e60]
mov dword [ebp - 0x57e78], 0
mov dword [ebp - 0x57e74], 0
mov dword [ebp - 0x57e70], 0
mov dword [ebp - 0x57e6c], 0
mov dword [ebp - 0x57e68], 0
mov dword [ebp - 0x57e64], 0
call dword [sym.imp.WINMM.dll_waveOutPrepareHeader]
push 0x20
lea eax, [ebp - 0x57e80]
push eax
push dword [ebp - 0x57e60]
call dword [sym.imp.WINMM.dll_waveOutWrite]
push 0x20
lea eax, [ebp - 0x57e80]
push eax
push dword [ebp - 0x57e60]
call dword [sym.imp.WINMM.dll_waveOutUnprepareHeader]
push dword [ebp - 0x57e60]
call dword [sym.imp.WINMM.dll_waveOutClose]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004078a7
mov esp, ebp
pop ebp
ret

Function at 0x402bf0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, 0xafcc0
call fcn.00413820
mov eax, dword [0x427004]
xor eax, ebp
mov dword [ebp - 4], eax
xor eax, eax
mov dword [ebp - 0xafca0], 0
push eax
push eax
push eax
mov word [ebp - 0xafc8c], ax
lea eax, [ebp - 0xafc9c]
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0xafca0]
mov dword [ebp - 0xafc9c], 0x10001
push eax
mov dword [ebp - 0xafc98], 0x5dc0
mov dword [ebp - 0xafc94], 0x5dc0
mov dword [ebp - 0xafc90], 0x80001
call dword [sym.imp.WINMM.dll_waveOutOpen]
push 0xafc80
lea eax, [ebp - 0xafc88]
push 0
push eax
call fcn.00408770
add esp, 0xc
xor ecx, ecx
mov edx, ecx
mov eax, 0xcccccccd
xor edx, 0x29a
imul edx, ecx
shr edx, 9
mul edx
shr edx, 2
mov byte [ebp + ecx - 0xafc88], dl
inc ecx
cmp ecx, 0xafc80
jb 0x402c73
lea eax, [ebp - 0xafc88]
mov dword [ebp - 0xafcbc], 0xafc80
mov dword [ebp - 0xafcc0], eax
lea eax, [ebp - 0xafcc0]
push 0x20
push eax
push dword [ebp - 0xafca0]
mov dword [ebp - 0xafcb8], 0
mov dword [ebp - 0xafcb4], 0
mov dword [ebp - 0xafcb0], 0
mov dword [ebp - 0xafcac], 0
mov dword [ebp - 0xafca8], 0
mov dword [ebp - 0xafca4], 0
call dword [sym.imp.WINMM.dll_waveOutPrepareHeader]
push 0x20
lea eax, [ebp - 0xafcc0]
push eax
push dword [ebp - 0xafca0]
call dword [sym.imp.WINMM.dll_waveOutWrite]
push 0x20
lea eax, [ebp - 0xafcc0]
push eax
push dword [ebp - 0xafca0]
call dword [sym.imp.WINMM.dll_waveOutUnprepareHeader]
push dword [ebp - 0xafca0]
call dword [sym.imp.WINMM.dll_waveOutClose]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004078a7
mov esp, ebp
pop ebp
ret
Function at 0x40d67c
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.0040d33c
Function at 0x9338b0
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0x406000]
mov dword [edi + 0x514978], 0xacb49022
push edi
or ebp, 0xffffffff
jmp 0x9338da
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x9338e1
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x9338d0
mov eax, 1
add ebx, ebx
jne 0x9338f3
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x933904
jne 0x933923
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x933923
dec eax
add ebx, ebx
jne 0x933910
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
jmp 0x9338e8
add ebx, ebx
jne 0x93391f
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jmp 0x933975
xor ecx, ecx
sub eax, 3
jb 0x93393b
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x9339aa
sar eax, 1
mov ebp, eax
jmp 0x933946
add ebx, ebx
jne 0x933946
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x933914
inc ecx
add ebx, ebx
jne 0x933954
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x933914
add ebx, ebx
jne 0x933961
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x933956
jne 0x933972
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x933956
add ecx, 2
cmp ebp, 0xfffffb00
adc ecx, 2
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x933994
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x933986
jmp 0x9338d6
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x933994
add edi, ecx
jmp 0x9338d6
pop esi
mov edi, esi
mov ecx, 0x2d13
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x9339b2
cmp byte [edi], 0x16
jne 0x9339b2
mov eax, dword [edi]
mov bl, byte [edi + 4]
shr ax, 8
rol eax, 0x10
xchg ah, al
sub eax, edi
sub bl, 0xe8
add eax, esi
mov dword [edi], eax
add edi, 5
mov al, bl
loop 0x9339b7
lea edi, [esi + 0x523000]
mov eax, dword [edi]
or eax, eax
je 0x933a2f
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x5333e8]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x533698]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x9339e4
mov ecx, edi
jns 0x933a13
movzx eax, word [edi]
inc edi
push eax
inc edi
mov ecx, 0xaef24857
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x5336a0]
or eax, eax
je 0x933a29
mov dword [ebx], eax
add ebx, 4
jmp 0x933a01
call dword [esi + 0x53369c]
add edi, 4
lea ebx, [esi - 4]
xor eax, eax
mov al, byte [edi]
inc edi
or eax, eax
je 0x933a69
cmp al, 0xef
ja 0x933a53
add ebx, eax
mov eax, dword [ebx]
xchg ah, al
rol eax, 0x10
xchg ah, al
add eax, esi
mov dword [ebx], eax
jmp 0x933a35
and al, 0xf
shl eax, 0x10
mov ax, word [edi]
add edi, 2
or eax, eax
jne 0x933a42
mov eax, dword [edi]
add edi, 4
jmp 0x933a42
mov ebp, dword [esi + 0x5336a4]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x237]
and byte [eax], 0x7f
and byte [eax + 0x28], 0x7f
pop eax
push eax
push esp
push eax
push ebx
push edi
call ebp
pop eax
popal
lea eax, [esp - 0x80]
push 0
cmp esp, eax
jne 0x933a9d
sub esp, 0xffffff80
jmp 0x499714
Function at 0x403250
Capabilities:
Get thread local storage value

Disassembly:
cmp dword [0x40648c], 0
jne 0x40325e
call fcn.004031f0
mov eax, dword [0x406488]
push ebx
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.DLL_TlsGetValue]
push edi
push eax
call esi
test eax, eax
jne 0x403282
call fcn.004031f0
mov ecx, dword [0x406488]
push ecx
call esi
mov ecx, dword [eax]
mov edi, dword [eax + 4]
mov edx, dword [eax + ecx*4 + 0x4c]
mov ebp, dword [esp + 0x14]
mov esi, dword [eax + ecx*4 + 8]
mov ebx, dword [eax + edi*4 + 8]
inc ebp
ror edx, 0xd
add edx, dword [eax + edi*4 + 0x4c]
ror esi, 5
add esi, ebx
mov dword [eax + ecx*4 + 8], edx
mov dword [eax + ecx*4 + 0x4c], esi
dec edi
dec ecx
jns 0x4032b5
mov ecx, 0x10
test edi, edi
jns 0x4032be
mov edi, 0x10
mov dword [eax], ecx
mov dword [eax + 4], edi
mov eax, edx
test ebp, ebp
je 0x4032cd
mul ebp
mov eax, edx
pop edi
pop esi
pop ebp
pop ebx
ret 4

Function at 0x403300
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 8
cmp dword [0x40648c], 0
jne 0x403311
call fcn.004031f0
mov eax, dword [0x406488]
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.DLL_TlsGetValue]
push edi
push eax
call esi
test eax, eax
jne 0x403334
call fcn.004031f0
mov ecx, dword [0x406488]
push ecx
call esi
mov ecx, dword [esp + 0x1c]
mov ebx, dword [esp + 0x18]
cmp ecx, 8
jl 0x40339c
push ebp
mov ebp, ecx
shr ebp, 3
mov edx, ebp
neg edx
lea ecx, [ecx + edx*8]
mov dword [esp + 0x20], ecx
mov ecx, dword [eax]
mov edi, dword [eax + 4]
mov edx, dword [eax + ecx*4 + 0x4c]
mov esi, dword [eax + ecx*4 + 8]
ror edx, 0xd
add edx, dword [eax + edi*4 + 0x4c]
ror esi, 5
add esi, dword [eax + edi*4 + 8]
mov dword [eax + ecx*4 + 8], edx
mov dword [eax + ecx*4 + 0x4c], esi
dec edi
dec ecx
jns 0x40337e
mov ecx, 0x10
test edi, edi
jns 0x403387
mov edi, 0x10
mov dword [eax], ecx
mov dword [eax + 4], edi
mov dword [ebx], esi
mov dword [ebx + 4], edx
add ebx, 8
dec ebp
jne 0x403352
mov ecx, dword [esp + 0x20]
pop ebp
test ecx, ecx
jle 0x4033f5
mov ecx, dword [eax]
mov edi, dword [eax + 4]
mov edx, dword [eax + ecx*4 + 0x4c]
mov esi, dword [eax + ecx*4 + 8]
ror edx, 0xd
add edx, dword [eax + edi*4 + 0x4c]
ror esi, 5
add esi, dword [eax + edi*4 + 8]
mov dword [eax + ecx*4 + 8], edx
mov dword [eax + ecx*4 + 0x4c], esi
dec edi
dec ecx
jns 0x4033cc
mov ecx, 0x10
test edi, edi
jns 0x4033d5
mov edi, 0x10
mov dword [esp + 0x10], edx
mov edx, dword [esp + 0x1c]
mov dword [eax], ecx
mov dword [eax + 4], edi
push edx
lea eax, [esp + 0x10]
push eax
push ebx
mov dword [esp + 0x18], esi
call sub.MSVCRT.dll_memcpy
add esp, 0xc
pop edi
pop esi
pop ebx
add esp, 8
ret 8
Function at 0x403400
Capabilities:
Get thread local storage value

Disassembly:
cmp dword [0x40648c], 0
jne 0x40340e
call fcn.004031f0
mov eax, dword [0x406488]
push ebx
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.DLL_TlsGetValue]
push edi
push eax
call esi
test eax, eax
jne 0x403432
call fcn.004031f0
mov ecx, dword [0x406488]
push ecx
call esi
mov ecx, dword [esp + 0x14]
lea edx, [eax + 8]
mov esi, 0x11
mov edi, edi
mov edi, ecx
imul edi, edi, 0x53a9b4fb
mov ecx, 1
sub ecx, edi
mov dword [edx + 0x44], ecx
imul ecx, ecx, 0x53a9b4fb
mov edi, 1
sub edi, ecx
mov ecx, edi
mov dword [edx], ecx
add edx, 4
dec esi
jne 0x403440
mov dword [eax], esi
mov dword [eax + 4], 0xa
lea ebp, [esi + 0x1f]
mov ecx, dword [eax]
mov esi, dword [eax + 4]
mov edx, dword [eax + ecx*4 + 0x4c]
mov edi, dword [eax + ecx*4 + 8]
mov ebx, dword [eax + esi*4 + 8]
ror edx, 0xd
add edx, dword [eax + esi*4 + 0x4c]
ror edi, 5
add edi, ebx
mov dword [eax + ecx*4 + 8], edx
mov dword [eax + ecx*4 + 0x4c], edi
dec esi
dec ecx
jns 0x4034a3
mov ecx, 0x10
test esi, esi
jns 0x4034ac
mov esi, 0x10
dec ebp
mov dword [eax], ecx
mov dword [eax + 4], esi
jne 0x403475
pop edi
pop esi
pop ebp
pop ebx
ret 4

Function at 0x403539
Capabilities:
Copy file

Disassembly:
xor eax, eax
cmp dword [esp + 4], eax
je 0x403558
cmp dword [esp + 8], eax
je 0x403558
push eax
push dword [esp + 0xc]
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.DLL_CopyFileA]
jmp 0x40355a
xor eax, eax
ret 8

Function at 0x403570
Capabilities:
Write file on windows

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
xor eax, eax
mov dword [esp + 4], eax
cmp dword [esi + 0x14], eax
jne 0x4035a5
mov ecx, dword [esi + 8]
sub ecx, dword [esi + 0xc]
mov edx, dword [esi + 4]
push eax
lea eax, [esp + 8]
push eax
mov eax, dword [esi]
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.DLL_WriteFile]
mov ecx, dword [esi + 8]
mov eax, dword [esp + 4]
mov dword [esi + 0xc], ecx
pop esi
pop ecx
ret 4

Function at 0x4038e0
Capabilities:
Read file on windows

Disassembly:
push ecx
mov eax, dword [esp + 8]
mov ecx, dword [0x4064e4]
push eax
push ecx
mov dword [esp + 8], 0
call fcn.00403cb6
test eax, eax
je 0x403932
cmp dword [eax + 4], 0
je 0x403918
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0xc]
push edx
push ecx
push eax
call fcn.00403a00
pop ecx
ret 0xc
mov ecx, dword [esp + 0x10]
mov eax, dword [eax]
push 0
lea edx, [esp + 4]
push edx
mov edx, dword [esp + 0x14]
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.DLL_ReadFile]
mov eax, dword [esp]
pop ecx
ret 0xc
Function at 0x4039a0
Capabilities:
Write file on windows

Disassembly:
push ecx
push edi
mov edi, dword [esp + 0x10]
xor eax, eax
mov dword [esp + 4], eax
test edi, edi
je 0x4039f9
push esi
mov esi, dword [esp + 0x18]
test esi, esi
je 0x4039f8
mov eax, dword [esp + 0x10]
mov ecx, dword [0x4064e4]
push eax
push ecx
call fcn.00403cb6
test eax, eax
je 0x4039f4
cmp dword [eax + 4], 0
je 0x4039e2
push esi
push edi
push eax
call fcn.00403b20
pop esi
pop edi
pop ecx
ret 0xc
mov eax, dword [eax]
push 0
lea edx, [esp + 0xc]
push edx
push esi
push edi
push eax
call dword [sym.imp.KERNEL32.DLL_WriteFile]
mov eax, dword [esp + 8]
pop esi
pop edi
pop ecx
ret 0xc

Function at 0x403a00
Capabilities:
Read file on windows

Disassembly:
push ebx
push esi
mov esi, dword [esp + 0xc]
cmp dword [esi + 0x14], 0
push edi
jne 0x403a21
push esi
call fcn.00403570
mov dword [esi + 0x14], 1
mov dword [esi + 0xc], 0
mov ebx, dword [esi + 0xc]
mov edi, dword [esp + 0x18]
cmp ebx, edi
jl 0x403a96
mov eax, dword [esi + 0x10]
add eax, dword [esi + 4]
mov ecx, edi
sub eax, ebx
dec ecx
je 0x403a83
dec ecx
je 0x403a6e
sub ecx, 2
je 0x403a5b
push edi
push eax
mov eax, dword [esp + 0x1c]
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ebx
ret 0xc
mov ecx, dword [eax]
mov edx, dword [esp + 0x14]
mov dword [edx], ecx
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ebx
ret 0xc
mov ax, word [eax]
mov ecx, dword [esp + 0x14]
mov word [ecx], ax
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ebx
ret 0xc
mov dl, byte [eax]
mov eax, dword [esp + 0x14]
mov byte [eax], dl
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ebx
ret 0xc
mov ecx, dword [esi + 0x10]
push ebp
mov ebp, dword [esp + 0x18]
sub ecx, ebx
add ecx, dword [esi + 4]
push ebx
push ecx
push ebp
call sub.MSVCRT.dll_memcpy
mov eax, dword [esi + 8]
add esp, 0xc
sub edi, ebx
add ebp, ebx
push 0
cmp edi, eax
jl 0x403adf
mov eax, dword [esi]
lea edx, [esp + 0x18]
push edx
push edi
push ebp
push eax
call dword [sym.imp.KERNEL32.DLL_ReadFile]
mov eax, dword [esp + 0x14]
pop ebp
pop edi
mov dword [esi + 0xc], 0
pop esi
add eax, ebx
pop ebx
ret 0xc
mov edx, dword [esi + 4]
lea ecx, [esp + 0x18]
push ecx
push eax
mov eax, dword [esi]
push edx
push eax
call dword [sym.imp.KERNEL32.DLL_ReadFile]
mov eax, dword [esp + 0x14]
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
cmp edi, eax
jle 0x403b02
mov edi, eax
mov ecx, dword [esi + 4]
push edi
push ecx
push ebp
call sub.MSVCRT.dll_memcpy
sub dword [esi + 0xc], edi
add esp, 0xc
pop ebp
lea eax, [ebx + edi]
pop edi
pop esi
pop ebx
ret 0xc
Function at 0x403b20
Capabilities:
Write file on windows

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
cmp dword [esi + 0x14], 1
push edi
mov dword [esp + 8], 0
jne 0x403b55
mov eax, dword [esi + 0xc]
mov ecx, dword [esi]
push 1
push 0
neg eax
push eax
push ecx
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
mov edx, dword [esi + 8]
mov dword [esi + 0x14], 0
mov dword [esi + 0xc], edx
mov ecx, dword [esi + 0xc]
mov edi, dword [esp + 0x18]
cmp ecx, edi
jle 0x403bca
mov eax, dword [esi + 8]
add eax, dword [esi + 4]
sub eax, ecx
mov ecx, edi
dec ecx
je 0x403bb7
dec ecx
je 0x403ba2
sub ecx, 2
je 0x403b8f
mov ecx, dword [esp + 0x14]
push edi
push ecx
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ecx
ret 0xc
mov edx, dword [esp + 0x14]
mov ecx, dword [edx]
mov dword [eax], ecx
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ecx
ret 0xc
mov edx, dword [esp + 0x14]
mov cx, word [edx]
mov word [eax], cx
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ecx
ret 0xc
mov edx, dword [esp + 0x14]
mov cl, byte [edx]
mov byte [eax], cl
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ecx
ret 0xc
push esi
call fcn.00403570
mov eax, dword [esi + 8]
cmp edi, eax
jl 0x403bf7
mov eax, dword [esp + 0x14]
mov ecx, dword [esi]
push 0
lea edx, [esp + 0xc]
push edx
push edi
push eax
push ecx
call dword [sym.imp.KERNEL32.DLL_WriteFile]
mov eax, dword [esp + 8]
pop edi
pop esi
pop ecx
ret 0xc
mov ecx, dword [esi + 4]
sub ecx, dword [esi + 0xc]
mov edx, dword [esp + 0x14]
push edi
push edx
add ecx, eax
push ecx
call sub.MSVCRT.dll_memcpy
add esp, 0xc
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ecx
ret 0xc

Function at 0x403dd4
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
push ebx
mov ebx, dword [esp + 8]
mov eax, ebx
and eax, 3
push esi
push edi
je 0x403de9
push 4
pop ecx
sub ecx, eax
add ebx, ecx
cmp dword [0x40649c], 0
mov esi, dword [sym.imp.KERNEL32.DLL_TlsSetValue]
jne 0x403e1b
call dword [sym.imp.KERNEL32.DLL_TlsAlloc]
push ebx
push 8
push dword [0x406464]
mov dword [0x406494], eax
call dword [sym.imp.KERNEL32.DLL_HeapAlloc]
push eax
push dword [0x406494]
call esi
mov edi, dword [0x40649c]
add dword [0x40649c], ebx
push dword [0x40649c]
push dword [0x406494]
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
push eax
push 8
push dword [0x406464]
call dword [sym.imp.KERNEL32.DLL_HeapReAlloc]
mov ebx, eax
push ebx
push dword [0x406494]
call esi
mov esi, dword [esp + 0x14]
test esi, esi
jne 0x403e61
cmp dword [esp + 0x18], esi
je 0x403e85
push 0x14
push 0x406498
call fcn.00403f4b
pop ecx
pop ecx
mov ecx, dword [esp + 0x18]
mov dword [eax], edi
mov dword [eax + 4], esi
mov dword [eax + 8], ecx
test esi, esi
je 0x403e85
add ebx, edi
push ebx
call esi
pop ecx
mov eax, edi
pop edi
pop esi
pop ebx
ret 0xc
Function at 0x404050
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [0x40605c]
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 8]
sub edx, dword [ebp + 0xc]
mov dword [ebp - 4], edx
mov eax, dword [ebp + 8]
cmp dword [eax], 0
jne 0x404096
mov ecx, dword [ebp - 4]
add ecx, 5
push ecx
push 0
mov edx, dword [0x4064e8]
push edx
call dword [sym.imp.KERNEL32.DLL_HeapAlloc]
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
jmp 0x4040b7
mov edx, dword [ebp - 4]
add edx, 5
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
push ecx
push 0
mov edx, dword [0x4064e8]
push edx
call dword [sym.imp.KERNEL32.DLL_HeapReAlloc]
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
mov edx, dword [ebp - 4]
push edx
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
add ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx]
push eax
call fcn.00404620
mov ecx, dword [ebp - 8]
mov edx, dword [ebp + 0xc]
mov dword [ecx + 8], edx
mov esp, ebp
pop ebp
ret 8

Function at 0x404260
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [0x40605c]
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
mov eax, dword [ecx]
mov edx, dword [ebp - 4]
add eax, dword [edx + 8]
mov esp, ebp
pop ebp
ret

Function at 0x404430
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x40605c]
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov dword [ebp - 0xc], eax
cmp dword [ebp + 0xc], 0xffffffff
jne 0x404454
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 8]
mov dword [ebp + 0xc], edx
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 8]
add ecx, dword [ebp + 8]
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 4]
sub eax, 4
cmp dword [ebp - 8], eax
jl 0x4044a1
mov ecx, dword [ebp - 8]
add ecx, 0x4000
mov edx, dword [ebp - 0xc]
mov dword [edx + 4], ecx
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 4]
add ecx, 5
push ecx
mov edx, dword [ebp - 0xc]
mov eax, dword [edx]
push eax
push 0
mov ecx, dword [0x4064e8]
push ecx
call dword [sym.imp.KERNEL32.DLL_HeapReAlloc]
mov edx, dword [ebp - 0xc]
mov dword [edx], eax
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax]
add ecx, dword [ebp + 0xc]
mov dword [ebp - 4], ecx
mov edx, dword [ebp + 0xc]
add edx, dword [ebp + 8]
mov eax, dword [ebp - 0xc]
mov dword [eax + 8], edx
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret 8

Function at 0x404500
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [0x40605c]
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 8]
cmp edx, dword [ecx]
jb 0x40453e
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
mov edx, dword [ebp - 4]
add ecx, dword [edx + 8]
cmp dword [ebp + 8], ecx
ja 0x40453e
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 8]
sub ecx, dword [eax]
add ecx, 1
mov eax, ecx
jmp 0x404540
xor eax, eax
mov esp, ebp
pop ebp
ret 4
Function at 0x404811
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
xor ebx, ebx
push edi
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.DLL_GetCurrentThreadId]
mov esi, eax
mov dword [ebp - 0xc], esi
cmp dword [0x4064bc], ebx
jne 0x404847
push 0x4064a0
call dword [sym.imp.KERNEL32.DLL_InitializeCriticalSection]
mov dword [0x4064bc], 1
push 0x4064a0
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
mov eax, dword [0x4064b8]
mov edi, eax
cmp eax, ebx
je 0x4048ab
cmp dword [ebp - 4], ebx
jne 0x4049eb
xor eax, eax
inc eax
lea ecx, [edi + 0x114]
cmp esi, dword [ecx]
je 0x40487e
inc eax
add ecx, 4
cmp eax, 0x40
jl 0x40486f
jmp 0x40489c
push dword [ebp + 0xc]
lea esi, [edi + eax*4 + 0x210]
push dword [ebp + 8]
call fcn.00404666
mov esi, dword [ebp - 0xc]
pop ecx
pop ecx
mov dword [ebp - 4], 1
mov edi, dword [edi]
cmp edi, ebx
jne 0x40485d
cmp dword [ebp - 4], ebx
jne 0x4049eb
mov edi, dword [sym.imp.KERNEL32.DLL_GetCurrentProcess]
push ebx
push ebx
push 0x100000
lea eax, [ebp - 8]
push eax
call edi
push eax
call dword [sym.imp.KERNEL32.DLL_GetCurrentThread]
push eax
call edi
push eax
call dword [sym.imp.KERNEL32.DLL_DuplicateHandle]
test eax, eax
je 0x4049eb
mov edi, dword [0x4064b8]
jmp 0x4048eb
cmp dword [edi + 0xc], 0x3f
jl 0x404985
mov edi, dword [edi]
cmp edi, ebx
jne 0x4048df
push 0x310
push 8
push dword [0x406464]
call dword [sym.imp.KERNEL32.DLL_HeapAlloc]
mov edi, eax
cmp edi, ebx
je 0x4049e2
push ebx
push 1
push ebx
push ebx
call dword [sym.imp.KERNEL32.DLL_CreateSemaphoreA]
mov dword [edi + 8], eax
cmp eax, ebx
je 0x4049d4
push ebx
push ebx
push edi
push 0x4046b7
mov dword [edi + 0x10], eax
mov eax, dword [ebp - 8]
mov dword [edi + 0x114], esi
push 0x1000
lea esi, [edi + 0x214]
push ebx
mov dword [edi + 0x14], eax
mov dword [esi], ebx
mov dword [edi + 0xc], 2
call dword [sym.imp.KERNEL32.DLL_CreateThread]
cmp eax, ebx
je 0x4049cb
push eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00404666
mov eax, dword [0x4064b8]
pop ecx
pop ecx
mov dword [edi + 4], ebx
mov dword [edi], eax
cmp eax, ebx
je 0x40497d
mov dword [eax + 4], edi
mov dword [0x4064b8], edi
jmp 0x4049eb
mov eax, dword [edi + 0xc]
mov ecx, dword [ebp - 8]
push dword [ebp + 0xc]
mov dword [edi + eax*4 + 0x10], ecx
mov eax, dword [edi + 0xc]
push dword [ebp + 8]
mov dword [edi + eax*4 + 0x110], esi
mov eax, dword [edi + 0xc]
mov dword [edi + eax*4 + 0x210], ebx
mov eax, dword [edi + 0xc]
lea esi, [edi + eax*4 + 0x210]
call fcn.00404666
inc dword [edi + 0xc]
pop ecx
pop ecx
push ebx
push 1
push dword [edi + 8]
call dword [sym.imp.KERNEL32.DLL_ReleaseSemaphore]
jmp 0x4049eb
push dword [edi + 8]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push edi
push ebx
push dword [0x406464]
call dword [sym.imp.KERNEL32.DLL_HeapFree]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push 0x4064a0
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
pop edi
pop esi
pop ebx
leave
ret 8