joyce8/EMBER2024-capa huggingface dataset:
Function at 0x60e600
Capabilities:
Contain obfuscated stackstrings
Encode data using xor
Encrypt data using salsa20 or chacha

Disassembly:
mov eax, 0x98
call fcn.00425210
mov eax, dword [0x6ee06c]
xor eax, esp
mov dword [esp + 0x94], eax
mov ecx, dword [esp + 0xa8]
push edi
mov edi, dword [esp + 0xa0]
mov dword [esp + 4], edi
mov eax, dword [ecx]
mov dword [esp + 0x68], eax
mov eax, dword [ecx + 4]
mov dword [esp + 0x6c], eax
mov eax, dword [ecx + 8]
mov dword [esp + 0x70], eax
mov eax, dword [ecx + 0xc]
mov dword [esp + 0x74], eax
mov eax, dword [ecx + 0x10]
mov dword [esp + 0x78], eax
mov eax, dword [ecx + 0x14]
mov dword [esp + 0x7c], eax
mov eax, dword [ecx + 0x18]
mov dword [esp + 0x80], eax
mov eax, dword [ecx + 0x1c]
mov ecx, dword [esp + 0xb0]
mov dword [esp + 0x84], eax
mov dword [esp + 0x58], 0x61707865
mov dword [esp + 0x5c], 0x3320646e
mov eax, dword [ecx]
mov dword [esp + 0x88], eax
mov eax, dword [ecx + 4]
mov dword [esp + 0x8c], eax
mov eax, dword [ecx + 8]
mov dword [esp + 0x90], eax
mov eax, dword [ecx + 0xc]
mov dword [esp + 0x94], eax
mov eax, dword [esp + 0xa8]
mov dword [esp + 0x60], 0x79622d32
mov dword [esp + 0x64], 0x6b206574
test eax, eax
je 0x60e7fd
push ebx
mov ebx, dword [esp + 0xa8]
push ebp
push esi
nop
mov esi, 0x40
cmp eax, esi
cmovb esi, eax
lea eax, [esp + 0x64]
push eax
lea eax, [esp + 0x28]
mov dword [esp + 0x24], esi
push eax
call fcn.0060e820
add esp, 8
xor eax, eax
test esi, esi
je 0x60e7cc
cmp esi, 0x20
jb 0x60e7a4
lea edx, [edi - 1]
lea ecx, [esp + esi + 0x23]
add edx, esi
cmp edi, ecx
ja 0x60e71c
lea ecx, [esp + 0x24]
cmp edx, ecx
jae 0x60e7a4
lea ecx, [ebx - 1]
add ecx, esi
cmp edi, ecx
ja 0x60e729
cmp edx, ebx
jae 0x60e7a4
mov ebp, esi
lea edx, [edi + 0x10]
lea esi, [esp + 0x24]
mov ecx, ebx
sub ecx, esi
and ebp, 0xffffffe0
mov dword [esp + 0x14], ecx
mov ecx, edi
sub ecx, esi
mov dword [esp + 0x18], ecx
mov ecx, ebx
mov ebx, dword [esp + 0x14]
sub ecx, edi
mov esi, dword [esp + 0x18]
mov edi, ecx
mov dword [esp + 0x1c], ecx
nop word [eax + eax]
movups xmm0, xmmword [esp + eax + 0x24]
lea ecx, [ebx + eax]
movups xmm1, xmmword [esp + ecx + 0x24]
lea ecx, [esi + eax]
lea edx, [edx + 0x20]
pxor xmm1, xmm0
movups xmm0, xmmword [esp + eax + 0x34]
add eax, 0x20
movups xmmword [esp + ecx + 0x24], xmm1
movups xmm1, xmmword [edi + edx - 0x20]
pxor xmm1, xmm0
movups xmmword [edx - 0x20], xmm1
cmp eax, ebp
jb 0x60e760
mov esi, dword [esp + 0x20]
mov edi, dword [esp + 0x10]
mov ebx, dword [esp + 0xb0]
cmp eax, esi
jae 0x60e7cc
lea ecx, [esp + 0x24]
mov ebp, edi
sub ebx, ecx
sub ebp, ecx
lea edx, [esp + 0x24]
add edx, eax
inc eax
mov cl, byte [ebx + edx]
xor cl, byte [edx]
mov byte [edx + ebp], cl
cmp eax, esi
jb 0x60e7b2
mov ebx, dword [esp + 0xb0]
mov eax, dword [esp + 0xb4]
add edi, esi
inc dword [esp + 0x94]
sub eax, esi
add ebx, esi
mov dword [esp + 0x10], edi
mov dword [esp + 0xb0], ebx
mov dword [esp + 0xb4], eax
test eax, eax
jne 0x60e6d0
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x98]
pop edi
xor ecx, esp
call fcn.00423e75
add esp, 0x98
ret
Function at 0x611900
Capabilities:
Encode data using xor

Disassembly:
cmp dword [esp + 0x18], 0
je 0x611914
mov dword [esp + 0x18], fcn.006100e0
jmp fcn.00609da0
mov dword [esp + 0x18], fcn.0060f380
jmp fcn.00609ae0
Function at 0x64b490
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0xa8
call fcn.00425210
mov eax, dword [0x6ee06c]
xor eax, esp
mov dword [esp + 0xa4], eax
mov eax, dword [esp + 0xac]
push ebx
mov ebx, dword [esp + 0xb8]
push ebp
push esi
mov esi, dword [esp + 0xbc]
xor ebp, ebp
mov dword [esp + 0x2c], eax
push edi
mov eax, dword [esi + 8]
mov dword [esp + 0x10], eax
sub eax, ebx
mov dword [esp + 0x24], eax
cmp dword [esi + 0xc], ebx
jae 0x64b4f0
push 0x4d4
push 0x6d2fe4
push str.assertion_failed:_rec__orig_len___md_size
call fcn.0059bda0
add esp, 0xc
cmp ebx, 0x40
jbe 0x64b50c
push 0x4d5
push 0x6d2fe4
push str.assertion_failed:_md_size___EVP_MAX_MD_SIZE
call fcn.0059bda0
add esp, 0xc
mov ecx, dword [esi + 0xc]
lea eax, [esp + 0x34]
neg eax
mov dword [esp + 0x20], ecx
and eax, 0x3f
lea edi, [esp + 0x34]
add edi, eax
lea eax, [ebx + 0x100]
mov dword [esp + 0x2c], edi
cmp ecx, eax
jbe 0x64b53a
mov ebp, ecx
sub ebp, ebx
sub ebp, 0x100
push ebx
xor esi, esi
mov dword [esp + 0x18], 0
push esi
push edi
call fcn.004e7e30
add esp, 0xc
mov dword [esp + 0x18], esi
cmp ebp, dword [esp + 0x20]
jae 0x64b5ed
mov eax, dword [esp + 0xc0]
mov ecx, ebp
sub ecx, dword [esp + 0x10]
mov dword [esp + 0x1c], ecx
mov eax, dword [eax + 0x14]
mov dword [esp + 0x28], eax
mov eax, ebp
mov edx, ecx
xor eax, dword [esp + 0x24]
xor edx, dword [esp + 0x10]
lea edi, [eax - 1]
not eax
shr eax, 0x1f
shr edi, 0x1f
and edi, eax
mov eax, ebp
xor eax, dword [esp + 0x10]
neg edi
or edx, eax
mov eax, dword [esp + 0x28]
xor edx, ebp
shr edx, 0x1f
neg edx
mov cl, byte [eax + ebp]
mov eax, edi
or eax, dword [esp + 0x14]
inc ebp
and eax, edx
mov edx, dword [esp + 0x18]
and edi, edx
mov dword [esp + 0x14], eax
and al, cl
or esi, edi
mov edi, dword [esp + 0x2c]
or byte [edx + edi], al
inc edx
mov ecx, edx
mov eax, edx
sub ecx, ebx
xor eax, ebx
xor ecx, ebx
or ecx, eax
xor ecx, edx
shr ecx, 0x1f
neg ecx
and edx, ecx
mov ecx, dword [esp + 0x1c]
inc ecx
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], ecx
cmp ebp, dword [esp + 0x20]
jb 0x64b575
xor edx, edx
test ebx, ebx
je 0x64b621
mov ebp, dword [esp + 0x30]
mov eax, esi
xor eax, 0x20
mov al, byte [eax + edi]
movzx eax, byte [esi + edi]
inc esi
mov byte [edx + ebp], al
mov ecx, esi
sub ecx, ebx
mov eax, esi
xor ecx, ebx
xor eax, ebx
or ecx, eax
inc edx
xor ecx, esi
shr ecx, 0x1f
neg ecx
and esi, ecx
cmp edx, ebx
jb 0x64b5f7
mov ecx, dword [esp + 0xb4]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00423e75
add esp, 0xa8
ret
Function at 0x64c160
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0xc
call fcn.00425210
push ebx
mov ebx, dword [esp + 0x14]
push esi
mov esi, dword [esp + 0x1c]
push edi
mov eax, dword [ebx + 4]
mov edi, dword [esp + 0x28]
inc edi
mov eax, dword [eax + 0x64]
test byte [eax + 0x34], 1
je 0x64c1ad
mov ecx, dword [esp + 0x24]
mov edx, dword [esi + 8]
lea eax, [edi + ecx]
cmp eax, edx
jbe 0x64c19d
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0xc
ret
add dword [esi + 0x14], ecx
sub edx, ecx
add dword [esi + 0x18], ecx
sub dword [esi + 0xc], ecx
mov dword [esi + 8], edx
jmp 0x64c1b2
cmp edi, dword [esi + 8]
ja 0x64c194
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 8]
push ebp
push dword [ebx + 0xb0]
mov al, byte [ecx + eax - 1]
movzx ebp, al
mov byte [esp + 0x30], al
mov dword [esp + 0x24], ebp
call fcn.00589210
push eax
call fcn.00585740
add esp, 8
test eax, 0x200000
je 0x64c1f8
or eax, 0xffffffff
sub eax, ebp
add dword [esi + 8], eax
mov eax, 1
pop ebp
pop edi
pop esi
pop ebx
add esp, 0xc
ret
mov edx, dword [esi + 8]
lea ecx, [edi + ebp]
mov ebx, edx
mov dword [esp + 0x10], edx
sub ebx, ecx
mov eax, edx
xor ebx, ecx
xor eax, ecx
or ebx, eax
mov eax, 0x100
xor ebx, edx
shr ebx, 0x1f
dec ebx
cmp edx, eax
cmovb eax, edx
xor edi, edi
mov dword [esp + 0x14], eax
test eax, eax
je 0x64c284
mov eax, dword [esi + 0x14]
mov esi, dword [esp + 0x20]
mov edx, esi
mov ebp, dword [esp + 0x10]
shr edx, 0x1f
dec ebp
mov dword [esp + 0x18], edx
add ebp, eax
nop
mov ecx, esi
lea ebp, [ebp - 1]
sub ecx, edi
mov eax, edi
shr ecx, 0x1f
inc edi
shr eax, 0x1f
xor cl, al
xor al, dl
or cl, al
movzx eax, byte [esp + 0x2c]
xor cl, dl
dec cl
movzx edx, cl
movzx ecx, byte [ebp + 1]
xor ecx, eax
and edx, ecx
not edx
and ebx, edx
mov edx, dword [esp + 0x18]
cmp edi, dword [esp + 0x14]
jb 0x64c240
mov esi, dword [esp + 0x24]
mov ebp, dword [esp + 0x20]
mov edx, dword [esp + 0x10]
not ebx
movzx eax, bl
lea ecx, [eax - 1]
not eax
shr eax, 0x1f
shr ecx, 0x1f
and ecx, eax
lea eax, [ebp + 1]
neg ecx
and eax, ecx
sub edx, eax
mov eax, ecx
pop ebp
pop edi
mov dword [esi + 8], edx
and eax, 1
not ecx
pop esi
or eax, ecx
pop ebx
add esp, 0xc
ret
Function at 0x650bb0
Capabilities:
Send data
Send data on socket

Disassembly:
push esi
mov esi, dword [esp + 8]
mov eax, dword [esi + 0x20]
cmp dword [eax], 5
je 0x650bcb
push eax
push esi
call fcn.006511f0
add esp, 8
test eax, eax
jle 0x650c13
push edi
push 0
call dword [sym.imp.WS2_32.dll_WSASetLastError]
push 0
push dword [esp + 0x18]
push dword [esp + 0x18]
push dword [esi + 0x1c]
call dword [sym.imp.WS2_32.dll_send]
push 0xf
push esi
mov edi, eax
call fcn.005854f0
add esp, 8
test edi, edi
jg 0x650c10
push edi
call fcn.005cd710
add esp, 4
test eax, eax
je 0x650c10
push 0xa
push esi
call fcn.00585c50
add esp, 8
mov eax, edi
pop edi
pop esi
ret
Function at 0x402470
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x224
mov eax, dword [0x416048]
xor eax, ebp
mov dword [ebp - 8], eax
mov dword [ebp - 0x214], 0
cmp dword [ebp + 8], 0
je 0x402499
cmp dword [ebp + 0xc], 0
jne 0x4024a3
jmp 0x4025f0
cmp dword [ebp + 0x10], 0
je 0x4024f8
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x218], eax
mov ecx, dword [ebp - 0x218]
add ecx, 2
mov dword [ebp - 0x21c], ecx
mov edx, dword [ebp - 0x218]
mov ax, word [edx]
mov word [ebp - 0x21e], ax
add dword [ebp - 0x218], 2
cmp word [ebp - 0x21e], 0
jne 0x4024c1
mov ecx, dword [ebp - 0x218]
sub ecx, dword [ebp - 0x21c]
sar ecx, 1
mov dword [ebp - 0x224], ecx
jne 0x402502
jmp 0x4025f0
xor edx, edx
mov word [ebp - 0x210], dx
push 0x206
push 0
lea eax, [ebp - 0x20e]
push eax
call fcn.004091a0
add esp, 0xc
cmp dword [ebp + 0x14], 0
je 0x40253b
lea ecx, [ebp - 0x210]
push ecx
push 0x104
call dword [0x412088]
jmp 0x402583
cmp dword [0x416f10], 3
jne 0x402571
push 0x104
lea edx, [ebp - 0x210]
push edx
call dword [0x412020]
push 0x41427c
push 0x104
lea eax, [ebp - 0x210]
push eax
call fcn.00405857
add esp, 0xc
jmp 0x402583
lea ecx, [ebp - 0x210]
push ecx
push 0x104
call dword [0x412088]
mov edx, dword [ebp + 0x10]
push edx
push 0x104
lea eax, [ebp - 0x210]
push eax
call fcn.00405857
add esp, 0xc
mov dword [ebp - 4], 0
push 0x414280
lea ecx, [ebp - 0x210]
push ecx
lea edx, [ebp - 4]
push edx
call fcn.00405b79
add esp, 0xc
cmp dword [ebp - 4], 0
jne 0x4025c4
jmp 0x4025f0
mov eax, dword [ebp - 4]
push eax
push 1
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.00405e0a
add esp, 0x10
mov eax, dword [ebp - 4]
push eax
call fcn.00405e94
add esp, 4
mov dword [ebp - 0x214], 1
mov eax, dword [ebp - 0x214]
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00405848
mov esp, ebp
pop ebp
ret

Function at 0x4027c0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x214
mov eax, dword [0x416048]
xor eax, ebp
mov dword [ebp - 8], eax
mov dword [ebp - 0x214], 0
xor eax, eax
mov word [ebp - 0x210], ax
push 0x206
push 0
lea ecx, [ebp - 0x20e]
push ecx
call fcn.004091a0
add esp, 0xc
mov dword [ebp - 4], 0
cmp dword [ebp + 8], 0
je 0x40280f
cmp dword [ebp + 0xc], 0
jne 0x402813
jmp 0x402888
lea edx, [ebp - 0x210]
push edx
push 0x104
call dword [0x412088]
push str.golfinfo.ini
push 0x104
lea eax, [ebp - 0x210]
push eax
call fcn.00405857
add esp, 0xc
push 0x4142bc
lea ecx, [ebp - 0x210]
push ecx
lea edx, [ebp - 4]
push edx
call fcn.00405b79
add esp, 0xc
cmp dword [ebp - 4], 0
je 0x40287e
mov eax, dword [ebp - 4]
push eax
push 1
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.0040605f
add esp, 0x10
mov eax, dword [ebp - 4]
push eax
call fcn.00405e94
add esp, 4
mov dword [ebp - 0x214], 1
mov eax, dword [ebp - 0x214]
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00405848
mov esp, ebp
pop ebp
ret
Function at 0x404040
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push edi
push 0x414978
mov edi, ecx
push eax
lea ecx, [ebp - 4]
push ecx
mov dword [ebp - 4], 0
call fcn.00405b79
add esp, 0xc
test eax, eax
je 0x40406d
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 4]
push ebx
push esi
push 2
push 0
push edx
call fcn.004064e5
mov eax, dword [ebp - 4]
push eax
call fcn.004066f5
mov ecx, dword [ebp - 4]
push 0
push 0
push ecx
mov esi, eax
call fcn.004064e5
lea eax, [esi + edi]
push eax
mov dword [ebp - 0xc], eax
call fcn.0040638d
mov edx, dword [ebp - 4]
push edx
push 1
mov ebx, eax
push esi
push ebx
call fcn.00405e0a
mov eax, dword [ebp - 4]
push eax
call fcn.00405e94
push edi
add esi, ebx
push 0
push esi
mov dword [ebp - 8], esi
call fcn.004091a0
mov eax, edi
cdq
and edx, 3
lea esi, [edx + eax]
add esp, 0x40
sar esi, 2
call dword [0x41202c]
push eax
call fcn.0040675a
add esp, 4
xor edi, edi
test esi, esi
jle 0x404100
lea ebx, [ebx]
call fcn.0040676c
mov ecx, dword [ebp - 8]
mov dword [ecx + edi*4], eax
inc edi
cmp edi, esi
jl 0x4040f0
mov edx, dword [ebp + 8]
push 0x414980
push edx
lea eax, [ebp - 4]
push eax
call fcn.00405b79
add esp, 0xc
test eax, eax
je 0x404122
pop esi
pop ebx
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0xc]
push ecx
push 1
push edx
push ebx
call fcn.0040605f
mov eax, dword [ebp - 4]
push eax
call fcn.00405e94
add esp, 0x14
test ebx, ebx
je 0x40414b
push ebx
call fcn.00406421
add esp, 4
pop esi
pop ebx
mov eax, 1
pop edi
mov esp, ebp
pop ebp
ret
Function at 0x404160
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x324
mov eax, dword [0x416048]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x103
lea eax, [ebp - 0x20b]
push 0
push eax
mov byte [ebp - 0x20c], 0
call fcn.004091a0
push 0x103
lea ecx, [ebp - 0x107]
push 0
push ecx
mov byte [ebp - 0x108], 0
call fcn.004091a0
push 0x103
lea edx, [ebp - 0x30f]
push 0
push edx
mov byte [ebp - 0x310], 0
call fcn.004091a0
mov eax, dword [str.sanfdr.bat]
mov ecx, dword [0x41498c]
mov dx, word [0x414990]
mov dword [ebp - 0x324], eax
mov al, byte [0x414992]
add esp, 0x24
mov dword [ebp - 0x320], ecx
lea ecx, [ebp - 0x20c]
mov byte [ebp - 0x31a], al
xor eax, eax
push ecx
push 0x104
mov word [ebp - 0x31c], dx
mov dword [ebp - 0x319], eax
mov dword [ebp - 0x315], eax
mov byte [ebp - 0x311], al
call dword [0x412040]
lea eax, [ebp - 0x324]
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x404222
push esi
push edi
lea edi, [ebp - 0x20c]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x404236
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push 0x104
lea edx, [ebp - 0x108]
mov ecx, eax
push edx
and ecx, 3
push 0
rep movsb byte es:[edi], byte [esi]
call dword [0x412044]
lea eax, [ebp - 0x108]
push eax
lea ecx, [ebp - 0x310]
push 0x104
push ecx
call fcn.0040678d
lea edx, [ebp - 0x310]
push 0x5c
push edx
call fcn.00406360
add esp, 0x14
test eax, eax
je 0x404290
mov byte [eax], 0
lea eax, [ebp - 0x20c]
push 0x414994
push eax
call fcn.004068a8
mov esi, eax
add esp, 8
test esi, esi
je 0x4043f1
push esi
push 1
push 9
push str.:Repeat_r_n
call fcn.0040605f
push esi
push 1
push 5
push str.del__
call fcn.0040605f
lea eax, [ebp - 0x108]
add esp, 0x20
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4042d8
push esi
sub eax, edx
push 1
push eax
lea ecx, [ebp - 0x108]
push ecx
call fcn.0040605f
push esi
push 1
push 2
push 0x4149ac
call fcn.0040605f
push esi
push 1
push 0xa
push str.if_exist__
call fcn.0040605f
lea eax, [ebp - 0x108]
add esp, 0x30
lea edx, [eax + 1]
jmp 0x404320
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x404320
push esi
sub eax, edx
push 1
push eax
lea edx, [ebp - 0x108]
push edx
call fcn.0040605f
push esi
push 1
push 0xf
push str.__goto_Repeat_r_n
call fcn.0040605f
push esi
push 1
push 7
push str.rmdir__
call fcn.0040605f
lea eax, [ebp - 0x310]
add esp, 0x30
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x404363
push esi
sub eax, ecx
push 1
push eax
lea eax, [ebp - 0x310]
push eax
call fcn.0040605f
push esi
push 1
push 3
push 0x4149ac
call fcn.0040605f
push esi
push 1
push 5
push str.del__
call fcn.0040605f
lea eax, [ebp - 0x20c]
add esp, 0x30
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4043a6
push esi
sub eax, ecx
push 1
push eax
lea ecx, [ebp - 0x20c]
push ecx
call fcn.0040605f
push esi
push 1
push 1
push 0x4149d4
call fcn.0040605f
push esi
call fcn.00405e94
add esp, 0x24
push 0
push 0
push 0
lea edx, [ebp - 0x20c]
push edx
push str.open
push 0
call dword [0x41215c]
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.00405848
mov esp, ebp
pop ebp
ret
Function at 0x405720
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x100c
call fcn.0040ee10
mov eax, dword [0x416048]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [edi]
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
push ebx
push 4
lea ecx, [ebp - 0x1008]
push ecx
push edx
mov dword [ebp - 0x100c], eax
call dword [0x4121c8]
cmp eax, 4
je 0x40576c
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00405848
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x1008], ebx
jbe 0x4057b8
push esi
mov ecx, dword [edi]
push 0
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push ecx
call dword [0x4121c8]
mov esi, eax
test esi, esi
je 0x4057b7
mov edx, dword [ebp - 0x100c]
mov eax, dword [edx]
push eax
push esi
lea ecx, [ebp - 0x1004]
push 1
push ecx
call fcn.0040605f
add ebx, esi
add esp, 0x10
cmp ebx, dword [ebp - 0x1008]
jb 0x405775
pop esi
mov edx, dword [ebp - 0x100c]
mov eax, dword [edx]
push eax
call fcn.00405e94
mov ecx, dword [ebp - 4]
add esp, 4
cmp ebx, dword [ebp - 0x1008]
pop ebx
sbb eax, eax
xor ecx, ebp
inc eax
call fcn.00405848
mov esp, ebp
pop ebp
ret
Function at 0x402ae4
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.00404134
test esi, esi
jne 0x402b1a
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.00404224
jmp 0x402b38
call sub.kernel32.dll_GetCommandLineA
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.00402998
mov edi, eax
test esi, esi
je 0x402b38
cmp dword [ebx], 0
je 0x402b38
dec esi
jmp 0x402b21
add esp, 0x108
pop edi
pop esi
pop ebx
ret

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

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

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

Disassembly:
push ebx
xor ebx, ebx
imul edx, dword [ebx + 0x490008], 0x8088405
inc edx
mov dword [ebx + 0x490008], edx
fld qword [ebx + 0x490068]
push 0
push edx
fild qword [esp]
add esp, 8
fmulp st(1)
pop ebx
ret

Function at 0x403254
Capabilities:
Query or enumerate registry value

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

Function at 0x403fb8
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x49304c], 0
je 0x404019
cmp word [0x493220], 0xd7b2
jne 0x403fe1
cmp dword [0x493228], 0
jbe 0x403fe1
mov eax, 0x49321c
call dword [0x493238]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x490078
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 0x404040
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x490034], 0
jne 0x404035
push 0
push 0x490070
push 0x490078
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret
Function at 0x406024
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
xor edx, edx
mov dword [ebp - 0x10], edx
xor edx, edx
push ebp
push 0x40608a
push dword fs:[edx]
mov dword fs:[edx], esp
push 7
lea edx, [ebp - 0xb]
push edx
push 0x1004
push eax
call sub.kernel32.dll_GetLocaleInfoA
lea eax, [ebp - 0x10]
lea edx, [ebp - 0xb]
mov ecx, 7
call fcn.004043a4
mov eax, dword [ebp - 0x10]
lea edx, [ebp - 4]
call fcn.00402e18
mov ebx, eax
cmp dword [ebp - 4], 0
je 0x406074
xor ebx, ebx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x406091
lea eax, [ebp - 0x10]
call fcn.00404134
ret

Function at 0x40bab8
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff00
push ebx
push esi
mov esi, ecx
mov ebx, dword [ebp + 8]
push pe_nt_image_headers32
lea ecx, [ebp - 0x100]
push ecx
push edx
push eax
call sub.kernel32.dll_GetLocaleInfoA_1
test eax, eax
jle 0x40baf1
mov ecx, eax
dec ecx
lea edx, [ebp - 0x100]
mov eax, ebx
call fcn.00404224
jmp 0x40bafa
mov eax, ebx
mov edx, esi
call fcn.00404188
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x40bb04
Capabilities:
Get geographical location

Disassembly:
push ebx
push esi
push edi
push ecx
mov ebx, ecx
mov esi, edx
mov edi, eax
push 2
lea eax, [esp + 4]
push eax
push esi
push edi
call sub.kernel32.dll_GetLocaleInfoA_1
test eax, eax
jle 0x40bb25
mov al, byte [esp]
jmp 0x40bb27
mov eax, ebx
pop edx
pop edi
pop esi
pop ebx
ret

Function at 0x40c1ac
Capabilities:
Write file on windows

Disassembly:
add esp, 0xfffffbbc
push 0x400
lea ecx, [esp + 0x48]
call 0x40c024
mov eax, dword [0x492c30]
cmp byte [eax], 0
je 0x40c228
mov eax, dword [0x492a04]
call fcn.00402c40
call fcn.0040285c
lea eax, [esp + 0x44]
push eax
lea eax, [esp + 0x48]
push eax
call sub.user32.dll_CharToOemA
push 0
lea eax, [esp + 4]
push eax
lea eax, [esp + 0x4c]
call fcn.004092e4
push eax
lea eax, [esp + 0x50]
push eax
push 0xfffffffffffffff4
call sub.kernel32.dll_GetStdHandle_1
push eax
call sub.kernel32.dll_WriteFile_1
push 0
lea eax, [esp + 4]
push eax
push 2
push 0x40c270
push 0xfffffffffffffff4
call sub.kernel32.dll_GetStdHandle_1
push eax
call sub.kernel32.dll_WriteFile_1
jmp 0x40c25e
push 0x40
lea eax, [esp + 8]
push eax
mov eax, dword [0x4929a8]
mov eax, dword [eax + 4]
push eax
mov eax, dword [0x493668]
call fcn.00405538
push eax
call sub.user32.dll_LoadStringA_1
push 0x2010
lea eax, [esp + 8]
push eax
lea eax, [esp + 0x4c]
push eax
push 0
call sub.user32.dll_MessageBoxA_1
add esp, 0x444
ret