joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40c9f0
Capabilities:
Send data
Send data on socket

Disassembly:
sub esp, 0x84
mov edx, ecx
mov eax, dword [edx + 0xc]
push ebx
push ebp
push esi
test eax, eax
push edi
je 0x40cac6
mov eax, dword [edx + 0x70]
test eax, eax
jne 0x40ca58
mov ebx, dword [esp + 0x98]
or ecx, 0xffffffff
mov edi, ebx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea ebp, [esp + 0x14]
mov eax, ecx
mov esi, edi
mov edi, ebp
mov dword [esp + 0x10], 9
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push 0x10
and ecx, 3
xor eax, eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [edx + 0x4c]
mov edi, ebx
push ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
push 0
add ecx, 4
jmp 0x40cab6
mov eax, dword [edx + 0x74]
mov ecx, dword [edx + 0x78]
mov ebx, dword [esp + 0x98]
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], ecx
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea ebp, [esp + 0x20]
mov eax, ecx
mov esi, edi
mov edi, ebp
mov dword [esp + 0x10], 0x22
shr ecx, 2
mov dword [esp + 0x1c], 9
push 0x10
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [edx + 0x4c]
mov edi, ebx
push ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
push 0
add ecx, 0x10
push ecx
mov ecx, dword [edx + 0x48]
lea eax, [esp + 0x20]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_sendto]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x84
ret 4

Function at 0x40cae0
Capabilities:
Send data
Send data on socket

Disassembly:
sub esp, 0x84
mov edx, ecx
mov eax, dword [edx + 0xc]
push ebx
push ebp
push esi
test eax, eax
push edi
je 0x40cbbd
mov eax, dword [edx + 0x70]
mov dword [edx + 0x20], 1
test eax, eax
jne 0x40cb4f
mov ebx, dword [esp + 0x98]
or ecx, 0xffffffff
mov edi, ebx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea ebp, [esp + 0x14]
mov eax, ecx
mov esi, edi
mov edi, ebp
mov dword [esp + 0x10], 0xa
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push 0x10
and ecx, 3
xor eax, eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [edx + 0x4c]
mov edi, ebx
push ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
push 0
add ecx, 4
jmp 0x40cbad
mov eax, dword [edx + 0x74]
mov ecx, dword [edx + 0x78]
mov ebx, dword [esp + 0x98]
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], ecx
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea ebp, [esp + 0x20]
mov eax, ecx
mov esi, edi
mov edi, ebp
mov dword [esp + 0x10], 0x22
shr ecx, 2
mov dword [esp + 0x1c], 0xa
push 0x10
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [edx + 0x4c]
mov edi, ebx
push ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
push 0
add ecx, 0x10
push ecx
mov ecx, dword [edx + 0x48]
lea eax, [esp + 0x20]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_sendto]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x84
ret 4
Function at 0x401000
Capabilities:
Encode data using add xor sub operations
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
push esi
push ecx
push edx
mov esi, dword [ebp + 0xc]
xor edx, edx
or eax, 0xffffffff
mov ecx, dword [ebp + 8]
lea esp, [esp]
lea esp, [esp]
nop
mov dl, byte [esi]
xor dl, al
shr eax, 8
xor eax, dword [edx*4 + 0x401040]
add esi, 1
sub ecx, 1
jne 0x401020
not eax
pop edx
pop ecx
pop esi
leave
ret 8

Function at 0x40172b
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffffc
pushal
lea eax, [ebp - 4]
push eax
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
push 0
push 0
call sub.kernel32.dll_CreateThread
push eax
call sub.kernel32.dll_CloseHandle
popal
leave
ret 8
Function at 0x402113
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
push ecx
push edx
push esi
push edi
push dword [ebp + 8]
call fcn.00402930
cmp eax, 0xffffffff
je 0x402195
mov dword [ebp - 4], eax
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push dword [ebp + 8]
call sub.kernel32.dll_CreateFileA
cmp eax, 0xffffffff
je 0x402191
mov dword [ebp - 0xc], eax
push 4
push 0x1000
push dword [ebp - 4]
push 0
call sub.kernel32.dll_VirtualAlloc
mov esi, eax
push 0
lea eax, [ebp - 8]
push eax
push dword [ebp - 4]
push esi
push dword [ebp - 0xc]
call sub.kernel32.dll_ReadFile
add esi, dword [esi + 0x3c]
mov eax, dword [esi + 0x50]
push eax
push dword [ebp - 0xc]
call sub.kernel32.dll_CloseHandle
push 0x4000
push dword [ebp - 4]
push esi
call sub.kernel32.dll_VirtualFree
pop eax
jmp 0x402197
xor eax, eax
jmp 0x402197
xor eax, eax
pop edi
pop esi
pop edx
pop ecx
leave
ret 4
Function at 0x40274e
Capabilities:
Get file size
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
pushal
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push dword [ebp + 8]
call sub.kernel32.dll_CreateFileA
cmp eax, 0xffffffff
je 0x4027ce
mov dword [ebp - 4], eax
push 0
push 0
push 0
push 2
push 0
push eax
call sub.kernel32.dll_CreateFileMappingA
or eax, eax
je 0x4027c6
mov dword [ebp - 8], eax
push 0
push 0
push 0
push 4
push eax
call sub.kernel32.dll_MapViewOfFile
or eax, eax
je 0x4027be
mov dword [ebp - 0xc], eax
push 0
push dword [ebp - 4]
call sub.kernel32.dll_GetFileSize
push dword [ebp - 0xc]
push eax
call fcn.00401000
mov dword [ebp - 0x10], eax
push dword [ebp - 0xc]
call sub.kernel32.dll_UnmapViewOfFile
push dword [ebp - 8]
call sub.kernel32.dll_CloseHandle
push dword [ebp - 4]
call sub.kernel32.dll_CloseHandle
popal
mov eax, dword [ebp - 0x10]
leave
ret 4

Function at 0x402964
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push dword [ebp + 8]
call sub.kernel32.dll_CreateFileA
cmp eax, 0xffffffff
jne 0x40298f
xor eax, eax
leave
ret 0xc
mov dword [ebp - 4], eax
push 0
lea eax, [ebp - 8]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp - 4]
call sub.kernel32.dll_WriteFile
push dword [ebp - 4]
call sub.kernel32.dll_FlushFileBuffers
push dword [ebp - 4]
call sub.kernel32.dll_CloseHandle
mov eax, dword [ebp - 8]
leave
ret 0xc

Function at 0x402b00
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffe00
pushal
cmp dword [ebp + 8], 0
jne 0x402b40
push 0
call sub.kernel32.dll_GetModuleHandleA
lea esi, [ebp - 0x200]
push 0x200
push esi
push eax
call sub.kernel32.dll_GetModuleFileNameA
push esi
call sub.kernel32.dll_lstrlenA
push esi
add esi, eax
jmp 0x402b35
dec esi
cmp byte [esi], 0x5c
jne 0x402b34
mov byte [esi], 0
pop esi
jmp 0x402b43
mov esi, dword [ebp + 8]
push esi
call sub.kernel32.dll_SetCurrentDirectoryA
popal
leave
ret 4
Function at 0x489348
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0x14]
push edx
call fcn.00488ebf
mov eax, dword [ebp + 8]
mov cl, byte [eax]
mov byte [ebp - 8], cl
mov edx, dword [ebp + 8]
mov al, byte [edx + 1]
mov byte [ebp - 0xc], al
mov ecx, dword [ebp + 8]
add ecx, 2
mov dword [ebp - 4], ecx
mov word [ebp - 0x10], 0
jmp 0x48938f
mov dx, word [ebp - 0x10]
add dx, 1
mov word [ebp - 0x10], dx
movsx eax, word [ebp - 0x10]
cmp eax, dword [ebp + 0xc]
jge 0x489469
mov ecx, dword [ebp - 8]
and ecx, 0xff
add ecx, 1
and ecx, 0x800000ff
jns 0x4893b8
dec ecx
or ecx, 0xffffff00
inc ecx
mov byte [ebp - 8], cl
mov edx, dword [ebp - 8]
and edx, 0xff
mov eax, dword [ebp - 4]
xor ecx, ecx
mov cl, byte [eax + edx]
mov edx, dword [ebp - 0xc]
and edx, 0xff
add ecx, edx
and ecx, 0x800000ff
jns 0x4893e7
dec ecx
or ecx, 0xffffff00
inc ecx
mov byte [ebp - 0xc], cl
mov eax, dword [ebp - 0xc]
and eax, 0xff
mov ecx, dword [ebp - 4]
add ecx, eax
push ecx
mov edx, dword [ebp - 8]
and edx, 0xff
mov eax, dword [ebp - 4]
add eax, edx
push eax
call fcn.0048924f
mov ecx, dword [ebp - 8]
and ecx, 0xff
mov edx, dword [ebp - 4]
xor eax, eax
mov al, byte [edx + ecx]
mov ecx, dword [ebp - 0xc]
and ecx, 0xff
mov edx, dword [ebp - 4]
xor ebx, ebx
mov bl, byte [edx + ecx]
add eax, ebx
and eax, 0x800000ff
jns 0x48943e
dec eax
or eax, 0xffffff00
inc eax
mov byte [ebp - 0x14], al
movsx eax, word [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
and ecx, 0xff
mov edx, dword [ebp + 0x14]
mov esi, dword [ebp - 4]
mov al, byte [edx + eax]
xor al, byte [esi + ecx]
movsx ecx, word [ebp - 0x10]
mov edx, dword [ebp + 0x14]
mov byte [edx + ecx], al
jmp 0x489383
mov eax, dword [ebp + 8]
mov cl, byte [ebp - 8]
mov byte [eax], cl
mov edx, dword [ebp + 8]
mov al, byte [ebp - 0xc]
mov byte [edx + 1], al
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
Function at 0x405640
Capabilities:
Generate random numbers using a mersenne twister

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov dword [ebp - 8], ecx
mov eax, dword [ebp - 8]
cmp dword [eax], 0x270
jne 0x40565e
mov ecx, dword [ebp - 8]
call fcn.00406b10
jmp 0x405671
mov ecx, dword [ebp - 8]
cmp dword [ecx], 0x4e0
jb 0x405671
mov ecx, dword [ebp - 8]
call fcn.00406990
mov edx, dword [ebp - 8]
mov eax, dword [edx]
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + eax*4 + 4]
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
add ecx, 1
mov edx, dword [ebp - 8]
mov dword [edx], ecx
mov eax, dword [ebp - 0xc]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
shr ecx, 0xb
mov edx, dword [ebp - 8]
and ecx, dword [edx + 0x1384]
xor ecx, dword [ebp - 4]
mov dword [ebp - 4], ecx
mov eax, dword [ebp - 4]
shl eax, 7
and eax, 0x9d2c5680
xor eax, dword [ebp - 4]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
shl ecx, 0xf
and ecx, 0xefc60000
xor ecx, dword [ebp - 4]
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 4]
shr edx, 0x12
xor edx, dword [ebp - 4]
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
Function at 0x406990
Capabilities:
Generate random numbers using a mersenne twister

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov dword [ebp - 8], ecx
mov dword [ebp - 4], 0
jmp 0x4069ab
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xe3
jae 0x406a17
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
mov eax, dword [edx + ecx*4 + 0x9c4]
and eax, 0x80000000
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
mov ecx, dword [edx + ecx*4 + 0x9c8]
and ecx, 0x7fffffff
or eax, ecx
mov dword [ebp - 0xc], eax
mov edx, dword [ebp - 0xc]
and edx, 1
je 0x4069ef
mov dword [ebp - 0x10], 0x9908b0df
jmp 0x4069f6
mov dword [ebp - 0x10], 0
mov eax, dword [ebp - 0xc]
shr eax, 1
xor eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
xor eax, dword [edx + ecx*4 + 0xff8]
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
mov dword [edx + ecx*4 + 4], eax
jmp 0x4069a2
jmp 0x406a22
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0x26f
jae 0x406a8e
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
mov eax, dword [edx + ecx*4 + 0x9c4]
and eax, 0x80000000
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
mov ecx, dword [edx + ecx*4 + 0x9c8]
and ecx, 0x7fffffff
or eax, ecx
mov dword [ebp - 0x14], eax
mov edx, dword [ebp - 0x14]
and edx, 1
je 0x406a66
mov dword [ebp - 0x18], 0x9908b0df
jmp 0x406a6d
mov dword [ebp - 0x18], 0
mov eax, dword [ebp - 0x14]
shr eax, 1
xor eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
xor eax, dword [edx + ecx*4 - 0x388]
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
mov dword [edx + ecx*4 + 4], eax
jmp 0x406a19
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + eax*4 + 0x9c4]
and edx, 0x80000000
mov eax, 4
imul ecx, eax, 0
mov eax, dword [ebp - 8]
mov ecx, dword [eax + ecx + 4]
and ecx, 0x7fffffff
or edx, ecx
mov dword [ebp - 0x1c], edx
mov edx, dword [ebp - 0x1c]
and edx, 1
je 0x406acc
mov dword [ebp - 0x20], 0x9908b0df
jmp 0x406ad3
mov dword [ebp - 0x20], 0
mov eax, dword [ebp - 0x1c]
shr eax, 1
xor eax, dword [ebp - 0x20]
mov ecx, 4
imul edx, ecx, 0x18c
mov ecx, dword [ebp - 8]
xor eax, dword [ecx + edx + 4]
mov edx, dword [ebp - 4]
mov ecx, dword [ebp - 8]
mov dword [ecx + edx*4 + 4], eax
mov edx, dword [ebp - 8]
mov dword [edx], 0
mov esp, ebp
pop ebp
ret
Function at 0x406b10
Capabilities:
Generate random numbers using a mersenne twister

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov dword [ebp - 8], ecx
mov dword [ebp - 4], 0x270
jmp 0x406b2b
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0x4e0
jae 0x406b97
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
mov eax, dword [edx + ecx*4 - 0x9bc]
and eax, 0x80000000
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
mov ecx, dword [edx + ecx*4 - 0x9b8]
and ecx, 0x7fffffff
or eax, ecx
mov dword [ebp - 0xc], eax
mov edx, dword [ebp - 0xc]
and edx, 1
je 0x406b6f
mov dword [ebp - 0x10], 0x9908b0df
jmp 0x406b76
mov dword [ebp - 0x10], 0
mov eax, dword [ebp - 0xc]
shr eax, 1
xor eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
xor eax, dword [edx + ecx*4 - 0x388]
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
mov dword [edx + ecx*4 + 4], eax
jmp 0x406b22
mov esp, ebp
pop ebp
ret

Function at 0x406fd0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
mov eax, dword [ebp + 0x10]
mov cl, byte [eax + 0x100]
mov byte [ebp - 1], cl
mov edx, dword [ebp + 0x10]
mov al, byte [edx + 0x101]
mov byte [ebp - 2], al
mov ecx, 1
imul edx, ecx, 0
add edx, dword [ebp + 0x10]
mov dword [ebp - 8], edx
mov dword [ebp - 0xc], 0
jmp 0x40700f
mov eax, dword [ebp - 0xc]
add eax, 1
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0xc]
cmp ecx, dword [ebp + 0xc]
jae 0x4070b0
movzx edx, byte [ebp - 1]
add edx, 1
and edx, 0xff
mov byte [ebp - 1], dl
movzx eax, byte [ebp - 1]
mov ecx, dword [ebp - 8]
movzx edx, byte [ecx + eax]
movzx eax, byte [ebp - 2]
add edx, eax
and edx, 0xff
mov byte [ebp - 2], dl
movzx ecx, byte [ebp - 1]
mov edx, dword [ebp - 8]
mov al, byte [edx + ecx]
mov byte [ebp - 3], al
movzx ecx, byte [ebp - 2]
movzx edx, byte [ebp - 1]
mov eax, dword [ebp - 8]
mov esi, dword [ebp - 8]
mov cl, byte [esi + ecx]
mov byte [eax + edx], cl
movzx edx, byte [ebp - 2]
mov eax, dword [ebp - 8]
mov cl, byte [ebp - 3]
mov byte [eax + edx], cl
movzx edx, byte [ebp - 1]
mov eax, dword [ebp - 8]
movzx ecx, byte [eax + edx]
movzx edx, byte [ebp - 2]
mov eax, dword [ebp - 8]
movzx edx, byte [eax + edx]
add ecx, edx
and ecx, 0xff
mov eax, dword [ebp - 8]
movzx ecx, byte [eax + ecx]
mov edx, dword [ebp + 8]
add edx, dword [ebp - 0xc]
movzx eax, byte [edx]
xor eax, ecx
mov ecx, dword [ebp + 8]
add ecx, dword [ebp - 0xc]
mov byte [ecx], al
jmp 0x407006
mov edx, dword [ebp + 0x10]
mov al, byte [ebp - 1]
mov byte [edx + 0x100], al
mov ecx, dword [ebp + 0x10]
mov dl, byte [ebp - 2]
mov byte [ecx + 0x101], dl
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x40cbe0
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x328
mov eax, dword [0x415044]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push 0x17
call dword [sym.imp.KERNEL32.dll_IsProcessorFeaturePresent]
test eax, eax
je 0x40cc07
mov ecx, 5
int 0x29
push 2
call fcn.0040c854
push 0x50
lea eax, [ebp - 0x320]
push 0
push eax
call sub.msvcrt.dll_memset
push 0x2cc
lea eax, [ebp - 0x2d0]
push 0
push eax
call sub.msvcrt.dll_memset
lea eax, [ebp - 0x320]
add esp, 0x1c
mov dword [ebp - 0x328], eax
lea eax, [ebp - 0x2d0]
mov dword [ebp - 0x324], eax
mov dword [ebp - 0x220], eax
mov dword [ebp - 0x224], ecx
mov dword [ebp - 0x228], edx
mov dword [ebp - 0x22c], ebx
mov dword [ebp - 0x230], esi
mov dword [ebp - 0x234], edi
mov word [ebp - 0x208], ss
mov word [ebp - 0x214], cs
mov word [ebp - 0x238], ds
mov word [ebp - 0x23c], es
mov word [ebp - 0x240], fs
mov word [ebp - 0x244], gs
pushfd
pop dword [ebp - 0x210]
mov eax, dword [ebp + 4]
mov dword [ebp - 0x218], eax
lea eax, [ebp + 4]
mov dword [ebp - 0x20c], eax
mov dword [ebp - 0x2d0], 0x10001
mov eax, dword [eax - 4]
mov dword [ebp - 0x21c], eax
mov eax, dword [ebp + 4]
mov dword [ebp - 0x320], 0xc0000417
mov dword [ebp - 0x31c], 1
mov dword [ebp - 0x314], eax
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
push 0
mov esi, eax
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
lea eax, [ebp - 0x328]
push eax
call dword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
test eax, eax
jne 0x40cd12
test esi, esi
jne 0x40cd12
push 2
call fcn.0040c854
add esp, 4
push 0xc0000417
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.0040b8fe
mov esp, ebp
pop ebp
ret

Function at 0x40d1f0
Capabilities:
Get process heap force flags

Disassembly:
push ebp
mov ebp, esp
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov ecx, dword [eax + 0xa4]
shl ecx, 0x10
or ecx, dword [eax + 0xa8]
cmp ecx, 0x60000
jae 0x40d21a
mov eax, 2
pop ebp
ret
push esi
call fcn.0040ca30
mov esi, eax
mov eax, dword [ebp + 8]
mov edx, dword [esi + 0x70]
mov ecx, edx
and cl, 2
movzx ecx, cl
neg ecx
sbb ecx, ecx
inc eax
cmp eax, 3
ja case.default.0x40d23a
jmp dword [eax*4 + 0x40d270]
or edx, 2
lea eax, [ecx + 2]
mov dword [esi + 0x70], edx
pop esi
pop ebp
ret
and edx, 0xfffffffd
mov dword [esi + 0x70], edx
lea eax, [ecx + 2]
pop esi
pop ebp
ret
call sub.msvcrt.dll__errno
mov dword [eax], 0x16
call fcn.0040cb70
or eax, 0xffffffff
pop esi
pop ebp
ret
Function at 0x40d280
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x504
mov eax, dword [0x415044]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
test esi, esi
je 0x40d37b
push 0x2d
push esi
call sub.msvcrt.dll_strchr
add esp, 8
test eax, eax
je 0x40d37b
xor ecx, ecx
mov al, byte [ecx + esi]
lea edx, [ecx + ecx]
test al, al
je 0x40d2da
cbw
inc ecx
mov word [ebp + edx - 0x204], ax
cmp ecx, 0x100
jne 0x40d2b8
jmp 0x40d37b
cmp edx, 0x200
jae 0x40d3e1
xor eax, eax
mov word [ebp + edx - 0x204], ax
lea eax, [ebp - 0x204]
push 0x2d
push eax
call sub.msvcrt.dll_wcsrchr
add esp, 8
test eax, eax
je 0x40d37b
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetLocaleInfoEx]
lea eax, [ebp - 0x504]
push 0xff
push eax
push 0x1001
lea eax, [ebp - 0x204]
push eax
call edi
test eax, eax
je 0x40d37a
lea edx, [ebp - 0x504]
mov ecx, 0x5f
lea edx, [edx + eax*2]
mov word [edx - 2], cx
mov ecx, 0x100
sub ecx, eax
lea eax, [ebp - 0x204]
push ecx
push edx
push 0x1002
push eax
call edi
test eax, eax
je 0x40d37a
lea edi, [ebp - 0x504]
xor eax, eax
nop
movzx ecx, word [edi + eax*2]
lea edx, [ebp - 0x304]
test cx, cx
je 0x40d3c3
mov byte [edx + eax], cl
inc eax
cmp eax, 0x100
jne 0x40d360
pop edi
mov eax, dword [0x415dd8]
test eax, eax
jne 0x40d3a1
push str.setlocale
call fcn.0040e640
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x40d39c
or eax, 0xffffffff
mov dword [0x415dd8], eax
lea ecx, [eax + 1]
neg ecx
sbb ecx, ecx
and ecx, eax
je 0x40d3cf
push esi
push ebx
call ecx
add esp, 8
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040b8fe
mov esp, ebp
pop ebp
ret
mov byte [edx + eax], 0
lea esi, [ebp - 0x304]
jmp 0x40d37a
mov ecx, dword [ebp - 4]
xor eax, eax
pop esi
xor ecx, ebp
pop ebx
call fcn.0040b8fe
mov esp, ebp
pop ebp
ret
call fcn.0040c2ac
int3

Function at 0x40dc20
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
call fcn.0040dc50
mov esi, dword [ebp + 8]
test al, al
je 0x40dc3e
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push esi
call fcn.0040dc60
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x40dd90
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push 0
mov dword [ebp - 8], 0
mov dword [ebp - 0xc], 2
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x40ddec
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x40ddec
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40ddec
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x40ddec
cmp dword [ecx + 0x74], 0xe
jbe 0x40ddec
cmp dword [ecx + 0xe8], 0
je 0x40ddec
push dword [ebp + 8]
call fcn.0040dc60
add esp, 4
lea eax, [ebp - 0xc]
mov byte [ebp - 1], 0
mov dword [ebp - 0x18], eax
lea eax, [ebp - 8]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 1]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x18]
push eax
push 0x415e08
call fcn.0040da30
add esp, 8
cmp dword [ebp - 8], 0
jne 0x40de21
push dword [ebp + 8]
call fcn.0040dc20
mov esp, ebp
pop ebp
ret
Function at 0x40de60
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push 0
mov dword [ebp - 8], 0
mov dword [ebp - 0xc], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x40debc
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x40debc
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40debc
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x40debc
cmp dword [ecx + 0x74], 0xe
jbe 0x40debc
cmp dword [ecx + 0xe8], 0
je 0x40debc
push dword [ebp + 8]
call fcn.0040dc60
add esp, 4
lea eax, [ebp - 0xc]
mov byte [ebp - 1], 0
mov dword [ebp - 0x18], eax
lea eax, [ebp - 8]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 1]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x18]
push eax
push 0x415e08
call fcn.0040da30
add esp, 8
cmp dword [ebp - 8], 0
jne 0x40def1
push dword [ebp + 8]
call fcn.0040dc20
mov esp, ebp
pop ebp
ret
Function at 0x402ac4
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffef8
mov ebx, edx
mov esi, eax
mov eax, ebx
call fcn.004044d8
test esi, esi
jne 0x402afa
push 0x105
lea eax, [esp + 4]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameA
mov ecx, eax
mov edx, esp
mov eax, ebx
call fcn.004045c8
jmp 0x402b18
call sub.kernel32.dll_GetCommandLineA
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.004029d8
mov edi, eax
test esi, esi
je 0x402b18
cmp dword [ebx], 0
je 0x402b18
dec esi
jmp 0x402b01
add esp, 0x108
pop edi
pop esi
pop ebx
ret

Function at 0x40307c
Capabilities:
Generate random numbers using the delphi lcg

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

Function at 0x4035dc
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [0x46a010]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x403674
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x403654
xor eax, eax
push ebp
push 0x40364d
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 0x403690
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 0x403654
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey
ret
mov ax, word [0x46a010]
and ax, 0xffc0
mov dx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [0x46a010], ax
mov esp, ebp
pop ebp
ret

Function at 0x40435c
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x46c04c], 0
je 0x4043bd
cmp word [0x46c220], 0xd7b2
jne 0x404385
cmp dword [0x46c228], 0
jbe 0x404385
mov eax, 0x46c21c
call dword [0x46c238]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x46a058
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 0x4043e4
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x46a020], 0
jne 0x4043d9
push 0
push 0x46a078
push 0x46a058
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret