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

Disassembly:
push 0xc
mov eax, 0x1006cfd0
call fcn.1003f081
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 0x10033316
push dword [ebp - 0x14]
call fcn.1003ea8b
push dword [ebp - 0x14]
mov ebx, eax
push 0
push ebx
call fcn.10041970
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 0x10033327
push ebx
call fcn.1003ea94
pop ecx
mov ecx, edi
call fcn.10032ff7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x10033348
mov ecx, dword [ebp - 0x18]
push edi
push dword [ebp - 0x14]
push ebx
call fcn.100333eb
mov esi, eax
test esi, esi
je 0x10033341
mov ecx, edi
call fcn.10032ff7
push ebx
call fcn.1003ea94
pop ecx
mov ecx, dword [ebp + 8]
add ecx, 0xfffffff0
call fcn.100372ea
mov eax, esi
call fcn.1003f02b
ret 8

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

Disassembly:
push 0xc
mov eax, 0x1006cfd0
call fcn.1003f081
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 0x100333d8
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 0x1003339a
mov eax, dword [esi]
mov dword [esi + 4], eax
jmp 0x100333d0
push dword [ebp - 0x14]
mov ecx, esi
call fcn.1003db68
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.1003c884
push eax
push 1
push esi
push edi
call dword [sym.imp.CRYPT32.dll_CryptStringToBinaryA]
test eax, eax
jne 0x100333d8
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.100372ea
mov eax, ebx
call fcn.1003f02b
ret
Function at 0x100333eb
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
push 0x114
mov eax, 0x1006d000
call fcn.1003f081
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.1003ea8b
push dword [ebp - 0x14]
mov dword [ebp - 0x1c], eax
push 0
push eax
call fcn.10041970
push edi
push esi
push dword [ebp - 0x14]
mov esi, dword [ebp - 0x1c]
push esi
call fcn.1003e053
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 0x10033465
push esi
call fcn.1003ea94
pop ecx
mov ecx, dword [ebp - 0x18]
call fcn.10032ff7
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x100334cb
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.10035831
push dword [ebp - 0x120]
and dword [ebp - 4], 0
call fcn.100391cb
pop ecx
mov ecx, dword [ebp - 0x18]
push eax
push dword [ebp - 0x120]
call fcn.10039102
lea eax, [ebp - 0x11c]
cmp dword [ebp - 0x120], eax
je 0x100334c2
push dword [ebp - 0x120]
call fcn.10048685
pop ecx
push esi
call fcn.1003ea94
pop ecx
xor eax, eax
call fcn.1003f02b
ret 0xc
Function at 0x100359f9
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [0x100c572c]
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 0x10035a2d
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x10035b32
push edi
mov edi, 0x94
push edi
call fcn.1003ea8b
push edi
push ebx
push eax
mov dword [esi + 0x10], eax
call fcn.10041970
mov eax, dword [esi + 0x10]
push 0x80
push 0x10082470
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.1003e053
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 0x10035b15
lea edi, [esi + 8]
push edi
push 0x800001
push 0x6602
push dword [esi]
call dword [sym.imp.ADVAPI32.dll_CryptGenKey]
test eax, eax
je 0x10035b15
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 0x10035b15
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 0x10035b15
push dword [ebp - 8]
call fcn.1003ea8b
push dword [ebp - 8]
mov dword [esi + 0x14], eax
push 0
push eax
call fcn.10041970
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 0x10035b1d
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x10035b31
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.1003e94d
mov esp, ebp
pop ebp
ret
Function at 0x1003a389
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
push 0x9c
mov eax, 0x1006d68c
call fcn.1003f081
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.100358f6
push dword [ebp - 0xa8]
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 1
call fcn.100306f4
lea eax, [ebp - 0xa4]
mov byte [ebp - 4], 3
cmp dword [ebp - 0xa8], eax
je 0x1003a3fd
push dword [ebp - 0xa8]
call fcn.10048685
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 0x1003a484
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x20]
add eax, dword [ebx + 0x1c]
push eax
mov dword [ecx], eax
call fcn.1003ea8b
mov ecx, dword [ebp - 0x20]
mov dword [esi], eax
push dword [ecx]
push edi
push eax
call fcn.10041970
push dword [ebx + 0x1c]
push dword [ebx + 0x18]
push dword [ebx + 0x1c]
push dword [esi]
call fcn.1003e053
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.1003e053
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 0x1003a48c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov ecx, dword [ebp - 0x1c]
add ecx, 0xfffffff0
call fcn.100372ea
mov ecx, dword [ebp + 8]
add ecx, 0xfffffff0
call fcn.100372ea
mov eax, edi
call fcn.1003f02b
ret 0xc
Function at 0x1003b2d8
Capabilities:
Contain obfuscated stackstrings

Disassembly:
push 0x7c
mov eax, 0x1006d7d2
call fcn.1003f081
mov eax, dword [ebp + 8]
mov esi, dword [ebp + 0x10]
mov dword [ebp - 0x7c], eax
xor eax, eax
mov dword [ebp - 0x74], 0x38344449
push eax
push eax
sub esp, 0xc
mov dword [ebp - 0x70], 0x366b334e
mov ecx, esp
mov dword [ebp - 0x6c], 0x35735748
mov dword [ebp - 0x68], 0x6259694c
mov dword [ebp - 0x64], 0x374d534d
mov dword [ebp - 0x60], 0x39497941
mov dword [ebp - 0x5c], 0x69397841
mov dword [ebp - 0x58], 0x69415342
mov dword [ebp - 0x54], 0x37556a43
mov dword [ebp - 0x50], 0x45345342
mov dword [ebp - 0x4c], 0x396f444a
mov dword [ebp - 0x48], 0x31737747
mov dword [ebp - 0x44], 0x346f5763
mov dword [ebp - 0x40], 0x59457865
mov dword [ebp - 0x3c], 0x7752784e
mov dword [ebp - 0x38], 0x5377674d
mov dword [ebp - 0x34], 0x6a494366
mov dword [ebp - 0x30], 0x43386850
mov dword [ebp - 0x2c], 0x6363794b
mov dword [ebp - 0x28], 0x6b304449
mov dword [ebp - 0x24], 0x41416743
mov word [ebp - 0x20], 0x4441
mov byte [ebp - 0x1e], 0x6b
mov byte [ebp - 0x78], al
push dword [ebp - 0x78]
mov dword [ebp - 4], eax
mov dword [ecx], eax
mov dword [ecx + 4], eax
mov dword [ecx + 8], eax
lea eax, [ebp - 0x1d]
push eax
lea eax, [ebp - 0x74]
push eax
call fcn.1002fda3
lea eax, [ebp - 0x88]
push eax
call fcn.10032e01
add esp, 0x10
mov ecx, eax
mov byte [ebp - 4], 1
call fcn.1003c8cd
push eax
lea ecx, [ebp + 0x14]
call fcn.10033063
cmp eax, 0xffffffff
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x88]
setne bl
call fcn.1003c74d
xor eax, eax
lea edi, [ebp - 0x1c]
stosd dword es:[edi], eax
lea ecx, [ebp - 0x1c]
push ecx
mov ecx, esi
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov eax, dword [esi]
call dword [eax + 4]
push 0
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 2
call fcn.1003c884
mov ecx, dword [ebp - 0x18]
sub ecx, dword [ebp - 0x1c]
test bl, bl
push 0x18
pop esi
push 0
pop edx
push ecx
mov ecx, dword [ebp - 0x7c]
cmovne edx, esi
push eax
add ecx, edx
push ecx
call fcn.10043610
add esp, 0xc
lea ecx, [ebp - 0x1c]
call fcn.1003c6ca
mov ecx, dword [ebp + 0x14]
add ecx, 0xfffffff0
call fcn.100372ea
mov al, 1
call fcn.1003f02b
ret
Function at 0x1003e271
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7c
mov eax, dword [0x100c572c]
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.1003e234
push esi
call fcn.1003e599
mov esi, eax
push edi
mov dword [ebp - 0x14], esi
call fcn.1003e599
push 0x58
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x7c]
push ebx
push eax
call fcn.10041970
lea eax, [ebp - 0x7c]
push eax
push 5
push esi
call fcn.1003e11e
mov edi, eax
add esp, 0x20
cmp edi, 5
jb 0x1003e40f
push edi
push esi
call fcn.1003e67d
push dword [ebp - 0x70]
push dword [ebp - 0x74]
push dword [ebp - 0x78]
push dword [ebp - 0x7c]
push esi
call fcn.1003e809
mov ebx, eax
add esp, 0x1c
test ebx, ebx
je 0x1003e40a
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 0x1003e3ef
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 0x1003e3d2
xor edx, edx
lea ecx, [ebx + 0x2c]
test edi, edi
je 0x1003e358
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 0x1003e343
mov esi, dword [ebp - 0x14]
lea ecx, [ebx + 0x2c]
lea eax, [edi + esi]
push eax
lea eax, [ecx + edi]
push eax
call fcn.1003e1eb
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 0x1003e39e
lea esi, [ebx + 0xc]
push esi
call fcn.1003e1eb
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.1003e1eb
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 0x1003e3fe
mov ecx, dword [ebp - 0x24]
lea eax, [ebx + 0x2c]
mov dword [ecx], eax
jmp 0x1003e40a
push 1
push ebx
call fcn.1003e910
pop ecx
pop ecx
xor ebx, ebx
call fcn.1003e51b
push 0x100c7990
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.1003e94d
mov esp, ebp
pop ebp
ret
Function at 0x1003e432
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x100c572c]
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.1003e234
xor esi, esi
mov eax, dword [esi*4 + 0x100c79a8]
test eax, eax
je 0x1003e46a
add eax, 0x2c
cmp eax, dword [ebx]
je 0x1003e50f
inc esi
cmp esi, 0x40
jb 0x1003e454
xor esi, esi
test esi, esi
je 0x1003e4f1
push dword [esi + 4]
push dword [esi]
call fcn.1003e67d
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 0x1003e4ec
mov edx, dword [esi]
xor ecx, ecx
cmp dword [esi + 4], ecx
jbe 0x1003e4b9
mov al, byte [esi + ecx + 0x4c]
mov byte [ecx + edx], al
inc ecx
cmp ecx, dword [esi + 4]
jb 0x1003e4ac
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.1003e910
pop ecx
pop ecx
call fcn.1003e51b
push 0x100c7990
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.1003e94d
mov esp, ebp
pop ebp
ret
mov esi, dword [esi*4 + 0x100c79a8]
jmp 0x1003e472

Function at 0x1003e51b
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 [0x100c7ab0], esi
jbe 0x1003e56d
mov eax, dword [0x100c7aac]
push dword [eax + esi*4]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov eax, dword [0x100c7aac]
push dword [eax + esi*4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc esi
cmp esi, dword [0x100c7ab0]
jb 0x1003e548
push dword [0x100c7aac]
call fcn.10048685
and dword [0x100c7aac], 0
and dword [0x100c7ab0], 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 0x1003e5d1
Capabilities:
Resume thread
Suspend thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2d0
mov eax, dword [0x100c572c]
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 0x1003e66b
test esi, esi
je 0x1003e66b
push esi
call dword [sym.imp.KERNEL32.dll_SuspendThread]
cmp eax, 0xffffffff
je 0x1003e662
mov dword [ebp - 0x2d0], 0x10001
xor ebx, ebx
jmp 0x1003e64e
mov eax, dword [ebp + 0xc]
cmp dword [ebp - 0x218], eax
jb 0x1003e66b
add eax, dword [ebp + 0x10]
cmp dword [ebp - 0x218], eax
jae 0x1003e66b
push esi
call dword [sym.imp.KERNEL32.dll_ResumeThread]
cmp ebx, 3
jge 0x1003e662
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 0x1003e61c
jmp 0x1003e66b
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.1003e94d
mov esp, ebp
pop ebp
ret

Function at 0x1003e809
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
mov eax, dword [0x100c572c]
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 [0x100c7aa8], 0x40
jae 0x1003e8ff
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 0x1003e8fd
push 0x1c
lea eax, [ebp - 0x20]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x1003e8d8
cmp dword [ebp - 0x10], 0x10000
jne 0x1003e8cc
mov eax, dword [ebp - 0x14]
cmp eax, 0x6c
jb 0x1003e8cf
mov ecx, dword [ebp - 0x28]
cmp eax, ecx
jb 0x1003e8cf
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 0x1003e8dc
mov eax, dword [ebp - 0x14]
mov edi, dword [ebp - 0x20]
add edi, eax
cmp edi, esi
jb 0x1003e881
test ebx, ebx
je 0x1003e8fd
xor eax, eax
cmp dword [eax*4 + 0x100c79a8], 0
je 0x1003e8f0
inc eax
cmp eax, 0x40
jb 0x1003e8de
jmp 0x1003e8fd
inc dword [0x100c7aa8]
mov dword [eax*4 + 0x100c79a8], ebx
pop edi
pop esi
mov ecx, dword [ebp - 4]
mov eax, ebx
xor ecx, ebp
pop ebx
call fcn.1003e94d
mov esp, ebp
pop ebp
ret

Function at 0x1004ba75
Capabilities:
Create thread
Print debug messages

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.1004b97a
Function at 0x100565c8
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 0x402bac
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
push ebx
xor ebx, ebx
imul edx, dword [ebx + 0x458008], 0x8088405
inc edx
mov dword [ebx + 0x458008], edx
mul edx
mov eax, edx
pop ebx
ret

Function at 0x403004
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [0x458024]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x40309c
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x40307c
xor eax, eax
push ebp
push 0x403075
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0xc], 4
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
push 0
push 0
push 0x4030b8
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegQueryValueExA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40307c
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey
ret
mov ax, word [0x458024]
and ax, 0xffc0
mov dx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [0x458024], ax
mov esp, ebp
pop ebp
ret

Function at 0x403d60
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x45a048], 0
je 0x403dc1
cmp word [0x45a21c], 0xd7b2
jne 0x403d89
cmp dword [0x45a224], 0
jbe 0x403d89
mov eax, 0x45a218
call dword [0x45a234]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x458070
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
push 0
lea eax, [esp + 4]
push eax
push 2
push 0x403de8
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x458034], 0
jne 0x403ddd
push 0
push 0x458068
push 0x458070
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret
Function at 0x405198
Capabilities:
Get geographical location
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffee0
push ebx
push esi
mov dword [ebp - 4], eax
push 0x105
lea eax, [ebp - 0x11d]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameA
mov byte [ebp - 0x12], 0
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x4053c8
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
je 0x40521b
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x4053c8
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
je 0x40521b
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x4053e4
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x4052a4
xor eax, eax
push ebp
push 0x40529d
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0x18], 5
lea eax, [ebp - 0x11d]
mov edx, 0x105
call fcn.00404fe0
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x12]
push eax
push 0
push 0
lea eax, [ebp - 0x11d]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
je 0x405282
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x12]
push eax
push 0
push 0
push 0x405404
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
je 0x405282
mov byte [ebp - 0x12], 0
mov byte [ebp - 0xe], 0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4052a4
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegCloseKey
ret
push 0x105
mov eax, dword [ebp - 4]
push eax
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_lstrcpynA
push 5
lea eax, [ebp - 0xd]
push eax
push 3
call sub.kernel32.dll_GetThreadLocale
push eax
call sub.kernel32.dll_GetLocaleInfoA
xor esi, esi
cmp byte [ebp - 0x11d], 0
je 0x4053be
cmp byte [ebp - 0xd], 0
jne 0x4052eb
cmp byte [ebp - 0x12], 0
je 0x4053be
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_lstrlenA
mov ebx, eax
lea eax, [ebp - 0x11d]
add ebx, eax
jmp 0x405304
dec ebx
cmp byte [ebx], 0x2e
je 0x405313
lea eax, [ebp - 0x11d]
cmp ebx, eax
jne 0x405303
lea eax, [ebp - 0x11d]
cmp ebx, eax
je 0x4053be
inc ebx
cmp byte [ebp - 0x12], 0
je 0x405350
mov edx, ebx
sub edx, eax
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0x12]
push eax
push ebx
call sub.kernel32.dll_lstrcpynA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_LoadLibraryExA
mov esi, eax
test esi, esi
jne 0x4053be
cmp byte [ebp - 0xd], 0
je 0x4053be
lea eax, [ebp - 0x11d]
mov edx, ebx
sub edx, eax
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0xd]
push eax
push ebx
call sub.kernel32.dll_lstrcpynA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_LoadLibraryExA
mov esi, eax
test esi, esi
jne 0x4053be
mov byte [ebp - 0xb], 0
lea eax, [ebp - 0x11d]
mov edx, ebx
sub edx, eax
mov eax, 0x105
sub eax, edx
push eax
lea eax, [ebp - 0xd]
push eax
push ebx
call sub.kernel32.dll_lstrcpynA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_LoadLibraryExA
mov esi, eax
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret