joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1021310c
Capabilities:
Decode data using base64 via winapi

Disassembly:
push 0xc
mov eax, 0x1024c880
call fcn.1021e939
mov dword [ebp - 0x18], ecx
mov edi, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x14]
mov esi, dword [sym.imp.CRYPT32.dll_CryptStringToBinaryA]
xor edx, edx
push edx
push edx
push ecx
push edx
push 1
push dword [eax - 0xc]
mov dword [ebp - 4], edx
push eax
call esi
test eax, eax
je 0x10213176
push dword [ebp - 0x14]
call fcn.1021e343
push dword [ebp - 0x14]
mov ebx, eax
push 0
push ebx
call fcn.10221230
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x14]
add esp, 0x10
push 0
push 0
push eax
push ebx
push 1
push dword [ecx - 0xc]
push ecx
call esi
test eax, eax
jne 0x10213187
push ebx
call fcn.1021e34c
pop ecx
mov ecx, edi
call fcn.10212e57
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x102131a8
mov ecx, dword [ebp - 0x18]
push edi
push dword [ebp - 0x14]
push ebx
call fcn.1021324b
mov esi, eax
test esi, esi
je 0x102131a1
mov ecx, edi
call fcn.10212e57
push ebx
call fcn.1021e34c
pop ecx
mov ecx, dword [ebp + 8]
add ecx, 0xfffffff0
call fcn.10216d2a
mov eax, esi
call fcn.1021e8e3
ret 8

Function at 0x102131bd
Capabilities:
Decode data using base64 via winapi

Disassembly:
push 0xc
mov eax, 0x1024c880
call fcn.1021e939
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x18], esi
mov eax, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 4], ebx
cmp dword [eax - 0xc], ebx
je 0x10213238
push ebx
push ebx
lea ecx, [ebp - 0x14]
push ecx
push ebx
push 1
push dword [eax - 0xc]
push eax
call dword [sym.imp.CRYPT32.dll_CryptStringToBinaryA]
test eax, eax
jne 0x102131fa
mov eax, dword [esi]
mov dword [esi + 4], eax
jmp 0x10213230
push dword [ebp - 0x14]
mov ecx, esi
call fcn.1021d51e
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x14]
mov ecx, dword [ebp - 0x18]
push ebx
push ebx
mov esi, dword [edi - 0xc]
push eax
push ebx
call fcn.1021c23a
push eax
push 1
push esi
push edi
call dword [sym.imp.CRYPT32.dll_CryptStringToBinaryA]
test eax, eax
jne 0x10213238
mov ecx, dword [ebp - 0x18]
mov eax, dword [ecx]
mov dword [ecx + 4], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov ecx, dword [ebp + 8]
add ecx, 0xfffffff0
call fcn.10216d2a
mov eax, ebx
call fcn.1021e8e3
ret
Function at 0x1021324b
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
push 0x114
mov eax, 0x1024c8b0
call fcn.1021e939
mov ebx, ecx
mov edi, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
mov esi, dword [ebp + 8]
mov dword [ebp - 0x18], eax
lea eax, [edi + 1]
mov dword [ebp - 0x14], edi
push eax
call fcn.1021e343
push dword [ebp - 0x14]
mov dword [ebp - 0x1c], eax
push 0
push eax
call fcn.10221230
push edi
push esi
push dword [ebp - 0x14]
mov esi, dword [ebp - 0x1c]
push esi
call fcn.1021d90b
add esp, 0x20
mov dword [ebp - 0x14], edi
lea eax, [ebp - 0x14]
push eax
push esi
push 0
push 1
push 0
push dword [ebx + 8]
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
test eax, eax
jne 0x102132c5
push esi
call fcn.1021e34c
pop ecx
mov ecx, dword [ebp - 0x18]
call fcn.10212e57
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x1021332b
mov eax, dword [ebp - 0x14]
lea ecx, [ebp - 0x120]
push 0xfde9
push esi
mov byte [esi + eax], 0
lea eax, [ebp - 0x11c]
mov dword [ebp - 0x120], eax
call fcn.10215270
push dword [ebp - 0x120]
and dword [ebp - 4], 0
call fcn.10218ce8
pop ecx
mov ecx, dword [ebp - 0x18]
push eax
push dword [ebp - 0x120]
call fcn.10218c1f
lea eax, [ebp - 0x11c]
cmp dword [ebp - 0x120], eax
je 0x10213322
push dword [ebp - 0x120]
call fcn.10227f45
pop ecx
push esi
call fcn.1021e34c
pop ecx
xor eax, eax
call fcn.1021e8e3
ret 0xc
Function at 0x10215438
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [0x1062572c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push 0xf0000040
push 0x18
xor ebx, ebx
mov esi, ecx
push ebx
push ebx
push esi
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x1021546c
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x10215571
push edi
mov edi, 0x94
push edi
call fcn.1021e343
push edi
push ebx
push eax
mov dword [esi + 0x10], eax
call fcn.10221230
mov eax, dword [esi + 0x10]
push 0x80
push 0x10402470
push edi
mov dword [eax], 0x206
mov dword [eax + 4], 0xa400
mov eax, dword [esi + 0x10]
mov dword [eax + 8], 0x31415352
mov dword [eax + 0xc], 0x400
mov dword [eax + 0x10], 0x10001
mov eax, dword [esi + 0x10]
add eax, 0x14
push eax
call fcn.1021d90b
add esp, 0x20
lea eax, [esi + 4]
push eax
push ebx
push ebx
push edi
push dword [esi + 0x10]
push dword [esi]
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
je 0x10215554
lea edi, [esi + 8]
push edi
push 0x800001
push 0x6602
push dword [esi]
call dword [sym.imp.ADVAPI32.dll_CryptGenKey]
test eax, eax
je 0x10215554
lea ebx, [esi + 0xc]
push ebx
push 0
push 0
push dword [esi + 4]
call dword [sym.imp.ADVAPI32.dll_CryptDuplicateKey]
test eax, eax
je 0x10215554
lea eax, [ebp - 8]
push eax
push 0
push 0
push 1
push dword [ebx]
push dword [edi]
call dword [sym.imp.ADVAPI32.dll_CryptExportKey]
test eax, eax
je 0x10215554
push dword [ebp - 8]
call fcn.1021e343
push dword [ebp - 8]
mov dword [esi + 0x14], eax
push 0
push eax
call fcn.10221230
add esp, 0x10
lea eax, [ebp - 8]
push eax
push dword [esi + 0x14]
push 0
push 1
push dword [ebx]
push dword [edi]
call dword [sym.imp.ADVAPI32.dll_CryptExportKey]
test eax, eax
jne 0x1021555c
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x10215570
mov eax, dword [esi + 0x14]
add eax, 0xc
mov dword [esi + 0x18], eax
mov eax, dword [ebp - 8]
add eax, 0xfffffff4
mov dword [esi + 0x1c], eax
xor eax, eax
pop edi
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.1021e205
mov esp, ebp
pop ebp
ret
Function at 0x10219d80
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
push 0x9c
mov eax, 0x1024cf3c
call fcn.1021e939
mov ebx, ecx
mov esi, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x20], eax
push 0xfde9
push dword [ebp + 8]
xor edi, edi
lea eax, [ebp - 0xa4]
lea ecx, [ebp - 0xa8]
mov dword [ebp - 4], edi
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0xa8], eax
call fcn.10215335
push dword [ebp - 0xa8]
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 1
call fcn.10210240
lea eax, [ebp - 0xa4]
mov byte [ebp - 4], 3
cmp dword [ebp - 0xa8], eax
je 0x10219df4
push dword [ebp - 0xa8]
call fcn.10227f45
pop ecx
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax - 0xc]
push eax
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
push edi
push edi
push 1
push edi
push dword [ebx + 8]
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
je 0x10219e7b
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x20]
add eax, dword [ebx + 0x1c]
push eax
mov dword [ecx], eax
call fcn.1021e343
mov ecx, dword [ebp - 0x20]
mov dword [esi], eax
push dword [ecx]
push edi
push eax
call fcn.10221230
push dword [ebx + 0x1c]
push dword [ebx + 0x18]
push dword [ebx + 0x1c]
push dword [esi]
call fcn.1021d90b
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x24]
mov esi, dword [ebx + 0x1c]
mov ecx, dword [eax - 0xc]
add esi, dword [edx]
push ecx
push eax
push dword [ebp - 0x14]
mov dword [ebp - 0x18], ecx
push esi
call fcn.1021d90b
add esp, 0x30
lea eax, [ebp - 0x18]
push dword [ebp - 0x14]
push eax
push esi
push edi
push 1
push edi
push dword [ebx + 8]
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
test eax, eax
jne 0x10219e83
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov ecx, dword [ebp - 0x1c]
add ecx, 0xfffffff0
call fcn.10216d2a
mov ecx, dword [ebp + 8]
add ecx, 0xfffffff0
call fcn.10216d2a
mov eax, edi
call fcn.1021e8e3
ret 0xc
Function at 0x10219f87
Capabilities:
Contain obfuscated stackstrings

Disassembly:
push 0x80
mov eax, 0x1024cf96
call fcn.1021e939
mov esi, ecx
mov edi, dword [ebp + 8]
xor eax, eax
mov dword [ebp - 0x78], eax
mov dword [ebp - 4], eax
mov dword [ebp - 0x88], edi
mov dword [edi], eax
call fcn.102134e2
push eax
mov ecx, edi
call fcn.10210155
push dword [esi + 0x14]
xor eax, eax
mov dword [ebp - 0x70], 0x73384362
push dword [esi + 0x10]
mov dword [ebp - 0x6c], 0x3870795a
xor ebx, ebx
push eax
sub esp, 0xc
mov dword [ebp - 0x68], 0x2f73474f
mov ecx, esp
mov dword [ebp - 0x64], 0x69745245
mov dword [ebp - 0x60], 0x6d515144
inc ebx
mov dword [ebp - 0x5c], 0x35394443
mov dword [ebp - 0x58], 0x366b5365
mov dword [ebp - 0x54], 0x3338534e
mov dword [ebp - 0x50], 0x50775147
mov dword [ebp - 0x4c], 0x546b5363
mov dword [ebp - 0x48], 0x57555450
mov dword [ebp - 0x44], 0x30426745
mov dword [ebp - 0x40], 0x33304142
mov dword [ebp - 0x3c], 0x5955684f
mov dword [ebp - 0x38], 0x436b7963
mov dword [ebp - 0x34], 0x49633242
mov dword [ebp - 0x30], 0x6d644850
mov dword [ebp - 0x2c], 0x75386765
mov dword [ebp - 0x28], 0x31465350
mov dword [ebp - 0x24], 0x336b4163
mov dword [ebp - 0x20], 0x6138334d
mov dword [ebp - 0x1c], 0x2f345150
mov dword [ebp - 0x18], 0x4163334d
mov dword [ebp - 0x14], 0x39414141
mov byte [ebp - 0x74], al
push dword [ebp - 0x74]
mov dword [ebp - 4], eax
mov dword [ecx], eax
mov dword [ecx + 4], eax
mov dword [ecx + 8], eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x70]
mov dword [ebp - 0x78], ebx
push eax
call fcn.1020f8ef
lea eax, [ebp - 0x84]
push eax
call fcn.10212c61
add esp, 0x10
mov ecx, eax
mov dword [ebp - 4], ebx
call fcn.1021c283
push eax
push edi
call fcn.1021260d
add esp, 0x10
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x84]
call fcn.1021c103
mov eax, dword [esi + 8]
xor ebx, ebx
sub eax, dword [esi + 4]
sar eax, 2
test eax, eax
je 0x1021a1c3
push ebx
lea ecx, [esi + 4]
mov dword [ebp - 0x54], 0x736f574e
mov dword [ebp - 0x50], 0x76556962
mov dword [ebp - 0x4c], 0x426b784a
mov dword [ebp - 0x48], 0x4434434c
mov dword [ebp - 0x44], 0x78514264
mov dword [ebp - 0x40], 0x55307750
mov dword [ebp - 0x3c], 0x39736865
mov dword [ebp - 0x38], 0x72307966
mov dword [ebp - 0x34], 0x305a6750
mov dword [ebp - 0x30], 0x474d3244
mov dword [ebp - 0x2c], 0x54636e65
mov dword [ebp - 0x28], 0x50635444
mov dword [ebp - 0x24], 0x39306950
mov dword [ebp - 0x20], 0x54734449
mov dword [ebp - 0x1c], 0x37466946
mov dword [ebp - 0x18], 0x41414141
mov word [ebp - 0x14], 0x414b
call fcn.1021c25d
push dword [eax]
xor eax, eax
push eax
sub esp, 0xc
mov byte [ebp - 0x74], al
mov ecx, esp
push dword [ebp - 0x74]
mov dword [ecx], eax
mov dword [ecx + 4], eax
mov dword [ecx + 8], eax
lea eax, [ebp - 0x12]
push eax
lea eax, [ebp - 0x54]
push eax
call fcn.1020f8ef
lea eax, [ebp - 0x84]
push eax
call fcn.10212c61
add esp, 0x10
mov ecx, eax
mov dword [ebp - 4], 2
call fcn.1021c283
push eax
push edi
call fcn.1021260d
add esp, 0xc
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x84]
call fcn.1021c103
mov ecx, dword [esi + 8]
inc ebx
sub ecx, dword [esi + 4]
sar ecx, 2
cmp ebx, ecx
jb 0x1021a0d7
mov eax, edi
call fcn.1021e8e3
ret 4
Function at 0x1021db29
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7c
mov eax, dword [0x1062572c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
xor ebx, ebx
mov esi, dword [eax]
mov dword [ebp - 0x24], eax
call fcn.1021daec
push esi
call fcn.1021de51
mov esi, eax
push edi
mov dword [ebp - 0x14], esi
call fcn.1021de51
push 0x58
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x7c]
push ebx
push eax
call fcn.10221230
lea eax, [ebp - 0x7c]
push eax
push 5
push esi
call fcn.1021d9d6
mov edi, eax
add esp, 0x20
cmp edi, 5
jb 0x1021dcc7
push edi
push esi
call fcn.1021df35
push dword [ebp - 0x70]
push dword [ebp - 0x74]
push dword [ebp - 0x78]
push dword [ebp - 0x7c]
push esi
call fcn.1021e0c1
mov ebx, eax
add esp, 0x1c
test ebx, ebx
je 0x1021dcc2
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
and dword [ebp - 0xc], 0
lea ecx, [ebp - 0xc]
and dword [ebp - 8], 0
push ecx
push 0x40
push edi
push esi
push eax
mov dword [ebp - 0x10], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x1021dca7
lea eax, [ebp - 8]
push eax
push 0x40
push 0x6c
push ebx
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x1021dc8a
xor edx, edx
lea ecx, [ebx + 0x2c]
test edi, edi
je 0x1021dc10
sub esi, ecx
mov al, byte [esi + ecx]
mov byte [ecx], al
mov byte [ebx + edx + 0x4c], al
inc edx
inc ecx
cmp edx, edi
jb 0x1021dbfb
mov esi, dword [ebp - 0x14]
lea ecx, [ebx + 0x2c]
lea eax, [edi + esi]
push eax
lea eax, [ecx + edi]
push eax
call fcn.1021daa3
mov edx, dword [ebp - 0x18]
mov eax, edx
pop ecx
pop ecx
mov ecx, esi
sub eax, esi
sub ecx, edx
cmp edx, esi
push edx
cmovb eax, ecx
cmp eax, 0x7fff0000
jbe 0x1021dc56
lea esi, [ebx + 0xc]
push esi
call fcn.1021daa3
pop ecx
pop ecx
sub eax, ebx
sub eax, 0xc
push eax
push esi
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
push esi
mov esi, dword [ebp - 0x14]
push esi
call fcn.1021daa3
mov eax, dword [ebp - 0x18]
pop ecx
pop ecx
mov dword [ebx + 8], eax
lea eax, [ebx + 0x2c]
push edi
push eax
push dword [ebp - 0x10]
mov dword [ebx + 4], edi
mov dword [ebx], esi
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
lea eax, [ebp - 8]
push eax
push dword [ebp - 8]
push 0x6c
push ebx
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
push edi
push esi
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 0xc]
push edi
push esi
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
cmp dword [ebx], 0
je 0x1021dcb6
mov ecx, dword [ebp - 0x24]
lea eax, [ebx + 0x2c]
mov dword [ecx], eax
jmp 0x1021dcc2
push 1
push ebx
call fcn.1021e1c8
pop ecx
pop ecx
xor ebx, ebx
call fcn.1021ddd3
push 0x10627990
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 4]
xor eax, eax
test ebx, ebx
pop edi
setne al
xor ecx, ebp
pop esi
pop ebx
call fcn.1021e205
mov esp, ebp
pop ebp
ret
Function at 0x1021dcea
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x1062572c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov dword [ebp - 0xc], ebx
xor edi, edi
call fcn.1021daec
xor esi, esi
mov eax, dword [esi*4 + 0x106279a8]
test eax, eax
je 0x1021dd22
add eax, 0x2c
cmp eax, dword [ebx]
je 0x1021ddc7
inc esi
cmp esi, 0x40
jb 0x1021dd0c
xor esi, esi
test esi, esi
je 0x1021dda9
push dword [esi + 4]
push dword [esi]
call fcn.1021df35
pop ecx
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
and dword [ebp - 8], edi
mov ebx, eax
lea eax, [ebp - 8]
push eax
push 0x40
push dword [esi + 4]
push dword [esi]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x1021dda4
mov edx, dword [esi]
xor ecx, ecx
cmp dword [esi + 4], ecx
jbe 0x1021dd71
mov al, byte [esi + ecx + 0x4c]
mov byte [ecx + edx], al
inc ecx
cmp ecx, dword [esi + 4]
jb 0x1021dd64
push dword [esi + 4]
push dword [esi]
push ebx
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
lea eax, [ebp - 8]
push eax
push dword [ebp - 8]
push dword [esi + 4]
push dword [esi]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
mov ecx, dword [ebp - 0xc]
xor edi, edi
mov eax, dword [esi]
inc edi
push 0
push esi
mov dword [ecx], eax
call fcn.1021e1c8
pop ecx
pop ecx
call fcn.1021ddd3
push 0x10627990
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1021e205
mov esp, ebp
pop ebp
ret
mov esi, dword [esi*4 + 0x106279a8]
jmp 0x1021dd2a

Function at 0x1021ddd3
Capabilities:
Resume thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetCurrentThread]
call edi
push eax
call dword [sym.imp.KERNEL32.dll_GetThreadPriority]
push 0xf
mov dword [ebp - 4], eax
call edi
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
xor esi, esi
cmp dword [0x10627ab0], esi
jbe 0x1021de25
mov eax, dword [0x10627aac]
push dword [eax + esi*4]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov eax, dword [0x10627aac]
push dword [eax + esi*4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc esi
cmp esi, dword [0x10627ab0]
jb 0x1021de00
push dword [0x10627aac]
call fcn.10227f45
and dword [0x10627aac], 0
and dword [0x10627ab0], 0
pop ecx
push dword [ebp - 4]
call edi
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x1021de89
Capabilities:
Resume thread
Suspend thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2d0
mov eax, dword [0x1062572c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push eax
push 0
push 0x1fffff
call dword [sym.imp.KERNEL32.dll_OpenThread]
mov esi, eax
cmp esi, 0xffffffff
je 0x1021df23
test esi, esi
je 0x1021df23
push esi
call dword [sym.imp.KERNEL32.dll_SuspendThread]
cmp eax, 0xffffffff
je 0x1021df1a
mov dword [ebp - 0x2d0], 0x10001
xor ebx, ebx
jmp 0x1021df06
mov eax, dword [ebp + 0xc]
cmp dword [ebp - 0x218], eax
jb 0x1021df23
add eax, dword [ebp + 0x10]
cmp dword [ebp - 0x218], eax
jae 0x1021df23
push esi
call dword [sym.imp.KERNEL32.dll_ResumeThread]
cmp ebx, 3
jge 0x1021df1a
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
push esi
call dword [sym.imp.KERNEL32.dll_SuspendThread]
inc ebx
lea eax, [ebp - 0x2d0]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
jne 0x1021ded4
jmp 0x1021df23
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
mov ecx, dword [ebp - 4]
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.1021e205
mov esp, ebp
pop ebp
ret

Function at 0x1021e0c1
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
mov eax, dword [0x1062572c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
push ebx
xor ebx, ebx
mov dword [ebp - 0x48], eax
cmp dword [0x10627aa8], 0x40
jae 0x1021e1b7
push esi
lea esi, [edx + ecx]
add ecx, dword [ebp + 0x14]
push edi
cmp ecx, 0x80000000
lea edi, [ebp - 0x44]
push 9
lea eax, [ecx + 0x7ff80000]
mov edx, 0xfff80000
cmovb edx, eax
xor eax, eax
pop ecx
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x44]
mov dword [ebp - 0x48], edx
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
xor eax, eax
lea edi, [esi - 0x7fff0000]
inc eax
cmp esi, 0x80000000
mov esi, dword [ebp - 0x48]
cmovb edi, eax
cmp edi, esi
jae 0x1021e1b5
push 0x1c
lea eax, [ebp - 0x20]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x1021e190
cmp dword [ebp - 0x10], 0x10000
jne 0x1021e184
mov eax, dword [ebp - 0x14]
cmp eax, 0x6c
jb 0x1021e187
mov ecx, dword [ebp - 0x28]
cmp eax, ecx
jb 0x1021e187
lea eax, [ecx - 1]
xor edx, edx
add eax, edi
div ecx
push 0x20
imul eax, ecx
push 0x3000
push 0x6c
push eax
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ebx, eax
test ebx, ebx
jne 0x1021e194
mov eax, dword [ebp - 0x14]
mov edi, dword [ebp - 0x20]
add edi, eax
cmp edi, esi
jb 0x1021e139
test ebx, ebx
je 0x1021e1b5
xor eax, eax
cmp dword [eax*4 + 0x106279a8], 0
je 0x1021e1a8
inc eax
cmp eax, 0x40
jb 0x1021e196
jmp 0x1021e1b5
inc dword [0x10627aa8]
mov dword [eax*4 + 0x106279a8], ebx
pop edi
pop esi
mov ecx, dword [ebp - 4]
mov eax, ebx
xor ecx, ebp
pop ebx
call fcn.1021e205
mov esp, ebp
pop ebp
ret

Function at 0x1022b335
Capabilities:
Create thread
Print debug messages

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.1022b23a
Function at 0x10235e85
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateThread]
pop ebp
ret
Function at 0x40bf40
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov dword [esp], 2
lea ebx, [esp + 0x24]
call dbg.__acrt_iob_func
mov dword [esp + 8], 0x1b
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], str.Mingw_w64_runtime_failure:_n
call sym._fwrite
mov dword [esp], 2
call dbg.__acrt_iob_func
mov edx, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], edx
call sym._vfprintf
call sym._abort
lea esi, [esi]

Function at 0x40bfa0
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x30
mov esi, dword [0x4da49c]
test esi, esi
jle 0x40c0a0
mov eax, dword [0x4da4a0]
xor ecx, ecx
add eax, 0xc
mov edx, dword [eax]
cmp edx, ebx
ja 0x40bfd0
mov edi, dword [eax + 4]
add edx, dword [edi + 8]
cmp ebx, edx
jb 0x40c04f
add ecx, 1
add eax, 0x14
cmp ecx, esi
jne 0x40bfc0
mov dword [esp], ebx
call dbg.__mingw_GetSectionForAddress
mov edi, eax
test eax, eax
je 0x40c0c7
mov eax, dword [0x4da4a0]
lea ebx, [esi + esi*4]
shl ebx, 2
add eax, ebx
mov dword [eax + 0x10], edi
mov dword [eax], 0
call dbg._GetPEImageBase
mov edx, dword [0x4da4a0]
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 0x40c0a7
mov eax, dword [esp + 0x28]
lea edx, [eax - 0x40]
and edx, 0xffffffbf
je 0x40c048
sub eax, 4
and eax, 0xfffffffb
jne 0x40c056
add dword [0x4da49c], 1
add esp, 0x30
pop ebx
pop esi
pop edi
ret
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x20]
add ebx, dword [0x4da4a0]
mov dword [ebx + 4], eax
mov dword [ebx + 8], edx
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0x40
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
test eax, eax
jne 0x40c048
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call dbg.__report_error
xor esi, esi
jmp 0x40bfda
mov eax, dword [0x4da4a0]
mov eax, dword [eax + ebx + 0xc]
mov dword [esp + 8], eax
mov eax, dword [edi + 8]
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov dword [esp + 4], eax
call dbg.__report_error
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call dbg.__report_error
lea esi, [esi]
nop
Function at 0x40c580
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x4da4b8
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x4da4b0]
sub esp, 4
test ebx, ebx
je 0x40c5d5
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 0x40c5ce
test esi, esi
je 0x40c5ce
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x40c5b0
mov dword [esp], 0x4da4b8
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret