joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401970
Capabilities:
Read file on windows
Write file on windows

Disassembly:
sub esp, 0x14
xor eax, eax
mov dword [esp + 8], eax
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], eax
lea eax, [esp + 8]
push eax
lea ecx, [esp + 8]
push ecx
push esi
mov dword [esp + 0xc], 0
call dword [sym.imp.KERNEL32.dll_ClearCommError]
mov eax, dword [esp + 0xc]
test eax, eax
je 0x4019b6
push 0
lea edx, [esp + 8]
push edx
push eax
push 0x5f3e68
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [esp + 0x18]
push 0
lea eax, [esp + 4]
push eax
push edi
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4019dc
cmp dword [esp], edi
jne 0x4019dc
mov eax, 1
add esp, 0x14
ret
xor eax, eax
add esp, 0x14
ret

Function at 0x401af0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x34
push ebx
push ebp
mov ebp, dword [esp + 0x44]
push esi
push edi
push ebp
xor ebx, ebx
mov edi, eax
push ebx
push edi
call fcn.00407820
lea eax, [esp + 0x28]
push eax
call fcn.00403e9c
add esp, 0x10
mov edx, dword [esp + 0x48]
push 0
lea ecx, [esp + 0x14]
push ecx
push ebp
push edi
push edx
mov dword [esp + 0x24], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x401bd5
mov ecx, dword [esp + 0x10]
xor eax, eax
test ecx, ecx
jbe 0x401b51
cmp byte [eax + edi], 0xa
je 0x401b4f
inc eax
cmp eax, ecx
jb 0x401b42
jmp 0x401b51
add ebx, eax
lea eax, [esp + 0x14]
push eax
add ebx, ecx
add edi, ecx
call fcn.00403e9c
add esp, 4
cmp dword [esp + 0x10], 0
jne 0x401b9f
push 1
push 0
push 0
push 0
lea ecx, [esp + 0x38]
push ecx
call dword [sym.imp.USER32.dll_PeekMessageA]
test eax, eax
je 0x401b96
lea edx, [esp + 0x28]
push edx
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
cmp dword [0x5f3dfc], 0
jne 0x401bcb
cmp ebx, ebp
jae 0x401bcb
mov esi, dword [esp + 0x14]
sub esi, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
mov eax, dword [0x5f3108]
sbb ecx, dword [esp + 0x20]
cdq
cmp ecx, edx
jg 0x401bcb
jl 0x401b14
cmp esi, eax
jb 0x401b14
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x34
ret

Function at 0x402020
Capabilities:
Encode data using xor

Disassembly:
push ecx
mov edx, dword [0x412f44]
mov dword [esp], 0
mov eax, 0x30
test edx, edx
je 0x40203c
mov eax, 0x32
mov byte [esi], 2
mov byte [esi + 1], al
mov byte [esi + 2], 0x21
mov byte [esi + 3], 0x4e
mov eax, dword [str.S_4_1_]
mov dword [esi + 4], eax
movzx eax, word [0x410e70]
lea ecx, [esi + 4]
mov word [ecx + 4], ax
mov eax, dword [str.23KTR9182]
mov dword [esi + 0xa], eax
movzx eax, word [0x5f3065]
mov word [esi + 0xe], ax
mov byte [esi + 0x10], 0x3b
mov eax, 0x11
test edx, edx
je 0x40208f
mov eax, 0xd
call fcn.00401ee0
mov eax, 0x13
mov ecx, 1
cmp eax, ecx
jle 0x4020b3
mov dx, word [esp]
push edi
lea ecx, [ecx]
movzx di, byte [ecx + esi]
inc ecx
xor dx, di
cmp ecx, eax
jl 0x4020a0
mov word [esp + 4], dx
pop edi
mov ecx, dword [esp]
mov dl, byte [esp]
shr ecx, 4
or cl, 0x30
mov byte [eax + esi], cl
and dl, 0xf
inc eax
or dl, 0x30
mov byte [eax + esi], dl
inc eax
mov byte [eax + esi], 0xa
inc eax
pop ecx
ret
Function at 0x4024c0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x88
mov eax, dword [0x4120fc]
xor eax, esp
mov dword [esp + 0x84], eax
push esi
push 0
push 0
push 4
push 0
push 2
push 4
push str.sn_build.txt
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40250b
xor eax, eax
pop esi
mov ecx, dword [esp + 0x84]
xor ecx, esp
call fcn.00402b2d
add esp, 0x88
ret
lea eax, [esp + 8]
push 0x80
push eax
call fcn.00402bb9
lea eax, [esp + 0x10]
add esp, 8
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402524
sub eax, edx
lea eax, [esp + eax + 8]
mov byte [eax], 0x20
inc eax
push 0x40
push eax
call fcn.00403b1a
lea ecx, [esp + 0x10]
push ecx
push 0x5f3067
push 0x5f3d78
push str._s__s__s_r_n
push 0x5f3e68
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x1c
push 0x5f3e68
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push 0
lea edx, [esp + 8]
push edx
push eax
push 0x5f3e68
push esi
mov dword [esp + 0x18], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x88]
pop esi
xor ecx, esp
mov eax, 1
call fcn.00402b2d
add esp, 0x88
ret
Function at 0x402b2d
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x4120fc]
jne 0x402b37
repz ret
jmp fcn.0040416d

Function at 0x40c35c
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.00405f62
and dword [ebp - 4], 0
cmp dword [0x5f3b98], 0
mov ebx, eax
jne 0x40c40d
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x40c4be
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x410498
push edi
call esi
test eax, eax
je 0x40c4be
push eax
call fcn.00405ef0
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x5f3b98], eax
call esi
push eax
call fcn.00405ef0
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x5f3b9c], eax
call esi
push eax
call fcn.00405ef0
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x5f3ba0], eax
call esi
push eax
call fcn.00405ef0
pop ecx
mov dword [0x5f3ba8], eax
test eax, eax
je 0x40c40d
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.00405ef0
pop ecx
mov dword [0x5f3ba4], eax
mov eax, dword [0x5f3ba4]
cmp eax, ebx
je 0x40c465
cmp dword [0x5f3ba8], ebx
je 0x40c465
push eax
call fcn.00405f6b
push dword [0x5f3ba8]
mov esi, eax
call fcn.00405f6b
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x40c465
test edi, edi
je 0x40c465
call esi
test eax, eax
je 0x40c45c
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x40c45c
test byte [ebp - 0xc], 1
jne 0x40c465
or dword [ebp + 0x10], 0x200000
jmp 0x40c49e
mov eax, dword [0x5f3b9c]
cmp eax, ebx
je 0x40c49e
push eax
call fcn.00405f6b
pop ecx
test eax, eax
je 0x40c49e
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x40c49e
mov eax, dword [0x5f3ba0]
cmp eax, ebx
je 0x40c49e
push eax
call fcn.00405f6b
pop ecx
test eax, eax
je 0x40c49e
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x5f3b98]
call fcn.00405f6b
pop ecx
test eax, eax
je 0x40c4be
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x40c4c0
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40eb9c
Capabilities:
Encode data using xor

Disassembly:
add eax, dword [eax]
rcr byte [edi], 3
pop ebx
jne 0x40ebef
dec eax
mov eax, 0x5165030c
aas
mov ecx, dword [esi + 0xc]
pop eax
cld
jne 0x40ebb9
mov eax, 0x435f8c0a
sbb byte [ebx], ch
add al, 0x89
dec ebx
dec eax
add esi, eax
idiv byte [ebx]
mov cl, 0xc6
adc al, dl
add al, 0xe8
or dword [eax + 0x5056ba0b], 0xffffff89
adc ecx, dword [edi + edi*8 + 0x41]
ret
mov edx, eax
mov edx, dword [eax + 0x7e]
push 0x9cf8890c
or al, 0x89
clc
pushfd
push ss
call 0x30fb6d0b
rol byte [ebx], 0
pop ds
je 0x40ebf5
and al, 0xfd
ror byte [esi*2 - 0x3d27bcf9], 1
mov ecx, dword [esi + 0xc]
xchg esp, eax
cmp al, 0x89
dec ebx
push cs
cmp eax, dword [ecx]
lea edi, [ebx]
add dword [eax], ebx
add dword fs:[eax], 0xc568b00
rcr byte [edi], 0x8b
mov edx, eax
mov ecx, dword [esi + 0xc]
add ecx, eax
mov dword [eax], ecx
or al, ch
push edx
add ecx, eax
mov dword [ebx + 0x48], ecx
dec esi
or al, 3
enter 0x889, 8
call 0x8a08ef89
dec ebx
dec eax
mov dword [ebx + 0x4c], edx
call 0x652900a9
add dword [ecx - 0x3ded394f], 0x1c
adc al, 0xe8
add dword fs:[ecx - 0x3ded394f], 0x1c
xor dword [eax], 0x40
inc eax
xor eax, 0x84018001
and al, 0x89
push edi
call 0xf02a68c0
jl 0x40ec4a
or al, 3
enter 0xffffffffffff8bc2, 0x4e
or al, 0x8b
in al, dx
add esp, 0xffffff83
xor dword [ecx - 0x3d76073a], 0x74c74e8b
clc
mov dword [ebx - 0x7743d77], ecx
mov edi, eax
mov dword [ebp - 0x64fb4bf0], ecx
mov ebx, 0xe97c68e8
out dx, eax
jl 0x40ec75
or al, 3
enter 0xffffffffffff8bc2, 0x4e
or al, 0x8b
in al, dx
or eax, 0xffffff89
dec ebx
dec eax
mov edi, ebx
jo 0x40ec2b
or al, 0x89
clc
pushfd
push ss
call 0x30fb6daf
rol byte [ebx], 0
pop ds
je 0x40ec2e
sub byte [eax + edi*8 - 0x17e963bb], ch
or al, 0x81
mov edx, 0x3c030
pop ds
je 0x40ec3e
or dword [ebp + 0x169c8df8], 0xffffffe8
or al, 0x81
mov edx, 0x418c030
wait
mov ebx, 0xf88d68e8
lea ebx, [eax + eax - 0x7fae040]
mov dword [ebx - 0x7743d77], ecx
mov eax, ebx
adc byte [esp + eax + 0x68e8bb9b], dh
jl 0x40eccf
pushfd
add al, al
pop ds
add eax, 0x898b89f8
ret 0xf88b
sub esi, dword [ebp - 0x18]
lodsb al, byte [esi]
cmp dword [eax + ecx], eax
adc al, 0xe8
call 0xd297a5d
cmp ebx, 0xc00003c0
pop ds
mov ecx, dword [ebx]
push eax
xor byte [ebx], 0x68
jl 0x40eced
sub esi, dword [ebp - 0x18]
lodsb al, byte [esi]
cmp dword [eax + ecx], eax
adc ah, byte [edi - 0x7d]
and al, 0x3b
add al, 0xc0
sbb byte [ebx + ebx*4], al
mov ebx, 0x8d68e8c7
adc al, 0x61
lea eax, [ebx]
add al, al
mov byte [eax + 0x18d44433], 2
dec esp
lea eax, [ebx + 0x16]
add dh, byte [ebp + 0xa]
push ebp
mov eax, dword [eax]
rcr byte [edi], 0xc0
adc al, 0xe8
inc ebx
adc al, 0xe8
add dword fs:[eax], 0x1c00
call fcn.0040904c
lea esp, [ebp + ecx*4 - 0x64]
ret

Function at 0x410000
Capabilities:
Encode data using xor

Disassembly:
mov edi, 0x3a88c0e8
push ebx
mov bh, 0xcf
add eax, dword [ecx - 0x76800000]
call dword [ebp - 0x18]
call 0xc46335f
inc eax
mov esi, 0x88c00003
cmp cl, byte [ecx + 0x438d4c53]
invalid
inc ebx

Function at 0x41009c
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [0x23950514]
or edi, dword [edx + 0x3c030]
Function at 0x40686f
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
cmp dword [0x460114], 0
jne 0x4068ad
xor ecx, ecx
push esi
push 8
mov eax, ecx
pop esi
mov edx, eax
and dl, 1
movzx edx, dl
neg edx
sbb edx, edx
and edx, 0xedb88320
shr eax, 1
xor eax, edx
dec esi
jne 0x406883
mov dword [ecx*4 + 0x460110], eax
inc ecx
cmp ecx, 0x100
jl 0x40687e
pop esi
cmp dword [ebp + 0x10], 0
mov eax, dword [ebp + 8]
not eax
jbe 0x4068da
mov ecx, dword [ebp + 0xc]
movzx edx, byte [ecx]
dec dword [ebp + 0x10]
xor edx, eax
and edx, 0xff
shr eax, 8
xor eax, dword [edx*4 + 0x460110]
inc ecx
cmp dword [ebp + 0x10], 0
ja 0x4068bb
not eax
pop ebp
ret 0xc

Function at 0x2a14000
Capabilities:
Decompress data using aplib

Disassembly:
jmp 0x2a1400a
jmp 0x2a1600f
jmp fcn.027d1058
Function at 0x617ee5
Capabilities:
Execute anti-debugging instructions

Disassembly:
call 0x617eb9
mov dword [esp], eax
jmp 0x61805f
pushfd
jmp 0x6141cb
push word [esp + 3]
pop word [esp]
pop word [esp]
mov dword [esp + 0x1c], esi
mov dword [esp + 0x18], edi
lea esp, [esp + 0x18]
jmp 0x617fda
Function at 0x65db6b
Capabilities:
Encrypt data using rc4 prga
Execute anti-debugging instructions

Disassembly:
lea esp, [esp + 4]
jmp 0x65db71
mov dword [esp], ecx
pushfd
jmp 0x65db55
call fcn.006433e9
mov eax, edx
lea edx, [ecx + edx]
rdtsc
pop ecx
jmp 0x65dbbb
push ebx
jmp 0x65dc18
mov eax, 0x92f4a8f3
rdtsc
xor ecx, ecx
lea eax, [esi + 0x1a]
jmp 0x65dba5
Function at 0x6e41e2
Capabilities:
Execute anti-debugging instructions

Disassembly:
dec cl
rcl ecx, 8
mov ch, cl
ror cx, cl
mov ecx, 0x34d25260
jmp 0x6e42ad
xchg dword [esp], ebp
bsr cx, bx
btc cx, di
mov cx, 0xf5eb
sub esp, 0xf
call fcn.006e4227

Function at 0xabdd0e
Capabilities:
Parse pe header

Disassembly:
push dword [esp + 1]
jmp 0xabdd18
mov byte [esp + 5], ah
pop word [esp + 2]
mov word [esp + 1], sp
lea esp, [esp + 2]
jmp 0xabdd52
mov dword [esp], esp
call fcn.00abdd3c

Function at 0xabdd5a
Capabilities:
Check for peb beingdebugged flag
Parse pe header

Disassembly:
call fcn.00abc0bb
pushal
jmp 0xabdd61
push cx
mov dword [esp + 0x14], esi
pop dword [esp + 0x14]
push dword [esp + 0xf]
push ebp
jmp 0xabde4f
mov eax, dword [eax + 8]
jmp 0xabdda8
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0x1c]
mov eax, dword [eax]
jmp 0xabdd88
push eax
jmp 0xabc0b6
lea esp, [esp + 2]
mov dword [esp + 0x24], edi
lea esp, [esp + 0x24]
mov eax, dword fs:[0x30]
jmp 0xabdd9e
lea esp, [esp + 2]
mov dword [esp + 0x24], esi
push eax
mov byte [esp + 2], dh
mov byte [esp], al
push word [esp + 1]
jmp 0xabddcb
Function at 0x4063be
Capabilities:
Delete file
Enumerate files on windows
Enumerate files recursively

Disassembly:
sub esp, 0x150
push ebx
mov ebx, dword [esp + 0x15c]
push esi
mov esi, dword [esp + 0x15c]
push edi
mov edi, ebx
push esi
and edi, 4
call fcn.004062e2
mov dword [esp + 0x18], eax
test bl, 8
je 0x406400
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
neg eax
sbb eax, eax
inc eax
add dword [0x7a2908], eax
jmp 0x40659a
push ebp
mov ebp, ebx
and ebp, 1
mov dword [esp + 0x18], ebp
je 0x40641d
test eax, eax
je 0x406589
test bl, 2
je 0x406553
push esi
push 0x79fe88
call fcn.004067cb
test ebp, ebp
mov ebp, dword [sym.imp.KERNEL32.dll_lstrcatA]
je 0x406440
push 0x4086e8
push 0x79fe88
call ebp
jmp 0x406446
push esi
call fcn.00406983
cmp byte [esi], 0
jne 0x406454
cmp byte [0x79fe88], 0x5c
jne 0x40645c
push 0x408298
push esi
call ebp
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ebp, [esi + eax]
lea eax, [esp + 0x20]
mov dword [esp + 0x10], ebp
push eax
push 0x79fe88
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [esp + 0x14], eax
cmp eax, 0xffffffff
je 0x406541
lea ebp, [esp + 0x4c]
push 0x3f
mov eax, ebp
push eax
call fcn.004062a5
cmp byte [eax], 0
je 0x4064ae
cmp byte [esp + 0x150], 0
lea eax, [esp + 0x150]
cmove eax, ebp
mov ebp, eax
cmp byte [ebp], 0x2e
jne 0x4064c5
mov al, byte [ebp + 1]
test al, al
je 0x40651c
cmp al, 0x2e
jne 0x4064c5
cmp byte [ebp + 2], 0
je 0x40651c
push ebp
mov ebp, dword [esp + 0x14]
push ebp
call fcn.004067cb
test byte [esp + 0x20], 0x10
je 0x4064e9
mov eax, ebx
and eax, 3
cmp al, 3
jne 0x406520
push ebx
push esi
call fcn.004063be
jmp 0x406520
push edi
push esi
call fcn.00406234
test eax, eax
jne 0x406512
test edi, edi
je 0x40650a
push esi
push 0xfffffffffffffff1
call fcn.00405a65
push 0
push esi
call fcn.00405fa6
jmp 0x406520
inc dword [0x7a2908]
jmp 0x406520
push esi
push 0xfffffffffffffff2
call fcn.00405a65
jmp 0x406520
mov ebp, dword [esp + 0x10]
lea eax, [esp + 0x20]
push eax
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x406487
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [esp + 0x18], 0
je 0x406599
cmp dword [esp + 0x1c], 0
mov byte [ebp - 1], 0
je 0x406589
push esi
call fcn.0040627e
test eax, eax
je 0x406599
push esi
call fcn.00406207
mov eax, edi
or eax, 1
push eax
push esi
call fcn.00406234
test eax, eax
jne 0x406591
test edi, edi
je 0x406589
push esi
push 0xfffffffffffffff1
call fcn.00405a65
push 0
push esi
call fcn.00405fa6
jmp 0x406599
inc dword [0x7a2908]
jmp 0x406599
push esi
push 0xffffffffffffffe5
call fcn.00405a65
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x150
ret 8

Function at 0x4065db
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
xor ecx, ecx
cmp eax, 0xffffffff
push 0
cmove eax, ecx
push eax
push dword [esp + 0x14]
push ecx
push 1
push dword [esp + 0x1c]
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
ret 0xc
Function at 0x402a40
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebx
push esi
add esp, 0xfffffdf0
mov esi, edx
mov ebx, eax
test bl, bl
je 0x402a7d
xor eax, eax
mov al, bl
add eax, 0x41
dec eax
mov byte [esp], al
mov byte [esp + 1], 0x3a
mov byte [esp + 2], 0
lea eax, [esp + 0x109]
push eax
push 0x105
call sub.kernel32.dll_GetCurrentDirectoryA
push esp
call sub.kernel32.dll_SetCurrentDirectoryA
lea eax, [esp + 4]
push eax
push 0x105
call sub.kernel32.dll_GetCurrentDirectoryA
test bl, bl
je 0x402a9d
lea eax, [esp + 0x109]
push eax
call sub.kernel32.dll_SetCurrentDirectoryA
mov eax, esi
lea edx, [esp + 4]
mov ecx, 0x105
call fcn.0040475c
add esp, 0x210
pop esi
pop ebx
ret

Function at 0x402c6c
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.004044ec
test esi, esi
jne 0x402ca2
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.004045dc
jmp 0x402cc0
call sub.kernel32.dll_GetCommandLineA
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.00402b80
mov edi, eax
test esi, esi
je 0x402cc0
cmp dword [ebx], 0
je 0x402cc0
dec esi
jmp 0x402ca9
add esp, 0x108
pop edi
pop esi
pop ebx
ret

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

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

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

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

Function at 0x403548
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [0x63c024]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x4035e0
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x4035c0
xor eax, eax
push ebp
push 0x4035b9
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 0x4035fc
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 0x4035c0
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey
ret
mov ax, word [0x63c024]
and ax, 0xffc0
mov dx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [0x63c024], ax
mov esp, ebp
pop ebp
ret
Function at 0x4042ec
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x64504c], 0
je 0x40434d
cmp word [0x645220], 0xd7b2
jne 0x404315
cmp dword [0x645228], 0
jbe 0x404315
mov eax, 0x64521c
call dword [0x645238]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x63c078
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 0x404374
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x63c034], 0
jne 0x404369
push 0
push 0x63c070
push 0x63c078
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret

Function at 0x4044a0
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.004027f0
mov dword [eax], edi
mov edx, dword [ebp + 0x10]
mov dword [eax + 4], edx
mov byte [0x64504d], 1
mov edx, dword [ebp + 8]
push edx
mov edx, dword [ebp + 0xc]
push edx
push eax
mov eax, 0x404468
push eax
push esi
push ebx
call sub.kernel32.dll_CreateThread
pop edi
pop esi
pop ebx
pop ebp
ret 0xc
Function at 0x406944
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 0x4069aa
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.0040475c
mov eax, dword [ebp - 0x10]
lea edx, [ebp - 4]
call fcn.004030ec
mov ebx, eax
cmp dword [ebp - 4], 0
je 0x406994
xor ebx, ebx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4069b1
lea eax, [ebp - 0x10]
call fcn.004044ec
ret

Function at 0x40999c
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebx
mov ebx, eax
mov eax, ebx
call fcn.004049c8
push eax
call sub.kernel32.dll_GetFileAttributesA
cmp eax, 0xffffffff
je 0x4099b5
test al, 0x10
jne 0x4099b9
xor eax, eax
pop ebx
ret
mov al, 1
pop ebx
ret

Function at 0x40cf34
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 0x40cf6d
mov ecx, eax
dec ecx
lea edx, [ebp - 0x100]
mov eax, ebx
call fcn.004045dc
jmp 0x40cf76
mov eax, ebx
mov edx, esi
call fcn.00404540
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x40cf80
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 0x40cfa1
mov al, byte [esp]
jmp 0x40cfa3
mov eax, ebx
pop edx
pop edi
pop esi
pop ebx
ret

Function at 0x40dfb8
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe8
push ebx
xor edx, edx
mov dword [ebp - 8], edx
mov ebx, eax
xor eax, eax
push ebp
push 0x40e08e
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 4], 0xffffffff
lea eax, [ebp - 8]
mov edx, ebx
call fcn.00404584
lea eax, [ebp - 8]
call fcn.00404a18
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 8]
call fcn.004049c8
push eax
call sub.version.dll_GetFileVersionInfoSizeA
mov ebx, eax
test ebx, ebx
je 0x40e078
mov eax, ebx
call fcn.004027f0
mov dword [ebp - 0x10], eax
xor eax, eax
push ebp
push 0x40e071
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 0x10]
push eax
push ebx
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 8]
call fcn.004049c8
push eax
call sub.version.dll_GetFileVersionInfoA
test eax, eax
je 0x40e05b
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
push 0x40e0a0
mov eax, dword [ebp - 0x10]
push eax
call sub.version.dll_VerQueryValueA
test eax, eax
je 0x40e05b
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 8]
mov dword [ebp - 4], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40e078
mov eax, dword [ebp - 0x10]
call fcn.00402810
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40e095
lea eax, [ebp - 8]
call fcn.004044ec
ret