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

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, ecx
push esi
xor ecx, ecx
push edi
cmp eax, ecx
mov dword [ebp - 8], ecx
mov dword [ebp - 4], ecx
je 0x404b9c
cmp dword [ebx + 0x448], ecx
je 0x404baa
mov esi, dword [ebp + 0x10]
mov dword [esi], eax
mov edi, dword [ebx + 0x440]
cdq
mov ecx, dword [ebx + 0x430]
add eax, edi
mov edi, dword [ebx + 0x444]
adc edx, edi
xor edi, edi
cmp edx, edi
jb 0x404a5f
ja 0x404a42
cmp eax, ecx
jbe 0x404a5f
sub ecx, dword [ebx + 0x440]
mov dword [esi], ecx
mov eax, dword [ebx + 0x420]
or eax, dword [ebx + 0x424]
je 0x404a5f
mov dword [ebp - 8], 1
mov ecx, dword [esi]
xor edi, edi
cmp ecx, edi
je 0x404ab1
mov esi, dword [ebx + 0x41c]
mov edx, dword [ebx + 0x440]
mov edi, dword [ebp + 8]
add esi, edx
mov edx, ecx
mov eax, dword [ebp + 0x10]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [eax]
mov edx, dword [ebx + 0x440]
add edx, ecx
mov esi, eax
mov dword [ebx + 0x440], edx
mov ecx, dword [ebx + 0x444]
adc ecx, 0
xor edi, edi
mov dword [ebx + 0x444], ecx
mov edx, dword [eax]
mov dword [ebp - 4], edx
cmp dword [ebp - 8], 1
jne 0x404b9c
mov eax, dword [ebx + 0x41c]
mov dword [ebx + 0x438], edi
mov dword [ebx + 0x440], edi
push eax
mov dword [ebx + 0x43c], edi
mov dword [ebx + 0x444], edi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, dword [ebx + 0x424]
mov dword [ebx + 0x41c], edi
cmp eax, edi
ja 0x404af8
cmp dword [ebx + 0x420], edi
jbe 0x404b07
mov ecx, ebx
call fcn.00404be0
test eax, eax
je 0x404bc5
mov eax, dword [esi]
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebx + 0x430]
sub edx, eax
cmp edx, ecx
jbe 0x404b31
add eax, ecx
mov dword [esi], eax
mov eax, dword [ebx + 0x420]
or eax, dword [ebx + 0x424]
je 0x404b36
mov edx, 1
jmp 0x404b38
mov ecx, dword [ebp + 0xc]
mov dword [esi], ecx
xor edx, edx
mov ecx, dword [esi]
mov eax, dword [ebp - 4]
sub ecx, eax
je 0x404b93
mov esi, dword [ebx + 0x440]
mov edi, dword [ebx + 0x41c]
add esi, edi
mov edi, dword [ebp + 8]
add edi, eax
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [ebp + 0x10]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [eax]
mov edi, dword [ebp - 4]
mov esi, dword [ebx + 0x440]
sub ecx, edi
add esi, ecx
mov dword [ebx + 0x440], esi
mov ecx, dword [ebx + 0x444]
mov esi, dword [ebp + 0x10]
adc ecx, 0
xor edi, edi
mov dword [ebx + 0x444], ecx
mov eax, dword [eax]
mov dword [ebp - 4], eax
cmp edx, 1
je 0x404abb
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov edx, dword [ebp + 8]
push ecx
mov ecx, dword [ebp + 0x10]
push ecx
push eax
mov eax, dword [ebx + 0x208]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x404b9c
mov ecx, ebx
call fcn.00404990
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x404be0
Capabilities:
Read file via mapping

Disassembly:
push esi
mov esi, ecx
xor ecx, ecx
mov edx, dword [esi + 0x424]
mov eax, dword [esi + 0x434]
cmp edx, ecx
ja 0x404c3a
jb 0x404c01
mov ecx, dword [esi + 0x420]
cmp ecx, eax
ja 0x404c3a
mov edx, dword [esi + 0x428]
push 0
push edx
mov eax, edx
mov edx, dword [esi + 0x42c]
mov ecx, 0x20
call fcn.00412280
push eax
mov eax, dword [esi + 0x418]
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ecx, dword [esi + 0x420]
mov dword [esi + 0x41c], eax
jmp 0x404c70
mov edx, dword [esi + 0x428]
push eax
push edx
mov eax, edx
mov edx, dword [esi + 0x42c]
mov ecx, 0x20
call fcn.00412280
push eax
mov eax, dword [esi + 0x418]
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ecx, dword [esi + 0x434]
mov dword [esi + 0x41c], eax
mov eax, dword [esi + 0x41c]
mov dword [esi + 0x430], ecx
test eax, eax
je 0x404ccd
mov edx, dword [esi + 0x420]
mov eax, ecx
xor ecx, ecx
sub edx, eax
mov dword [esi + 0x420], edx
mov edx, dword [esi + 0x424]
sbb edx, ecx
mov dword [esi + 0x448], 1
mov dword [esi + 0x424], edx
mov edx, dword [esi + 0x428]
add edx, eax
mov dword [esi + 0x428], edx
mov eax, dword [esi + 0x42c]
adc eax, ecx
mov dword [esi + 0x42c], eax
mov eax, 1
pop esi
ret
xor eax, eax
pop esi
ret
Function at 0x40a270
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0x1c]
lea eax, [ebp + 0x1c]
push edi
push eax
push 0x20019
push 0
push ecx
push edx
mov dword [ebx], 0
mov dword [ebp - 4], 0x100
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40a2e2
mov edi, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0x1c]
lea eax, [ebp - 4]
push esi
push eax
push edi
push 0
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov esi, eax
mov eax, dword [ebp + 0x1c]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
pop esi
jne 0x40a2dd
mov dword [ebx], 1
pop edi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov cl, byte [ebp + 0x14]
mov byte [edi], cl
pop edi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40a8d0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
lea eax, [ebp + 8]
mov byte [esi], 0
mov byte [edi], 0
mov ecx, dword [str.HardwareDescriptionSystem]
push eax
push 0x20019
push 0
push ecx
push reloc.ODBC32.dll_SQLAllocEnv
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40a942
mov edx, dword [ebp + 0x10]
mov ecx, dword [str.Identifier]
push edx
mov edx, dword [ebp + 8]
lea eax, [ebp + 0xc]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push eax
push 0
push ecx
push edx
call esi
mov eax, dword [ebp + 0x14]
mov edx, dword [str.SystemBiosVersion]
push eax
mov eax, dword [ebp + 8]
lea ecx, [ebp + 0xc]
push edi
push ecx
push 0
push edx
push eax
call esi
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
ret
Function at 0x410680
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
push edi
push ebp
xor ecx, ecx
xor edx, edx
mov esi, dword [esp + 0x14]
mov ebp, dword [esp + 0x18]
mov edi, dword [esp + 0x1c]
mov cl, byte [esi + 0x100]
mov dl, byte [esi + 0x101]
test ebp, ebp
je 0x4106cf
inc ecx
mov ebx, 0xff
and ecx, ebx
xor eax, eax
mov al, byte [esi + ecx]
add edx, eax
and edx, ebx
xor ebx, ebx
mov bl, byte [esi + edx]
mov byte [esi + ecx], bl
mov byte [esi + edx], al
add al, bl
mov bl, byte [edi]
mov al, byte [esi + eax]
xor bl, al
mov byte [edi], bl
inc edi
dec ebp
jne 0x4106a4
pop ebp
pop edi
lea eax, [esi + 0x100]
pop esi
mov byte [eax], cl
pop ebx
mov byte [eax + 1], dl
ret 0xc

Function at 0x4106e1
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebx
mov eax, 0x3020100
push esi
mov ecx, 0x40
mov esi, dword [esp + 0xc]
push edi
mov edx, esi
push ebp
mov dword [edx], eax
add edx, 4
add eax, 0x4040404
dec ecx
jne 0x4106f5
xor ecx, ecx
xor edi, edi
mov ebp, dword [esp + 0x1c]
mov byte [esi + 0x100], cl
mov byte [esi + 0x101], cl
xor ebx, ebx
xor edx, edx
xor eax, eax
mov dl, byte [edi + esi]
mov al, byte [ebp + ecx]
add bl, al
inc ecx
add bl, dl
inc edi
mov al, byte [ebx + esi]
mov byte [edi + esi - 1], al
cmp dword [esp + 0x18], ecx
mov byte [ebx + esi], dl
jne 0x41073b
xor ecx, ecx
cmp edi, 0x100
jb 0x410718
pop ebp
pop edi
pop esi
pop ebx
ret 0xc
Function at 0x1001e85
Capabilities:
Get common file path

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xa2c
mov eax, dword [0x10080d8]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
xor eax, eax
push edi
mov word [0x1008c46], ax
mov word [ebp - 0x20e], ax
mov word [ebp - 6], ax
push 0xf9
lea eax, reloc.NETAPI32.dll_NetApiBufferFree
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
jne 0x1001f12
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x2716
push 0xfffffffffffffff4
call fcn.010044e9
add esp, 0xc
push dword [ebp + 8]
mov esi, 0x1008400
push dword [ebp + 8]
push 0x1001230
push 0x423
push 0x424
push esi
call fcn.01004b37
add esp, 0x18
mov ecx, dword [ebp - 4]
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.0100493c
leave
ret 4
push 2
push 0x10011fc
mov esi, 0x104
lea eax, reloc.NETAPI32.dll_NetApiBufferFree
push esi
push eax
call fcn.01004bcf
push 0xa
push 0x100121c
lea eax, reloc.NETAPI32.dll_NetApiBufferFree
push esi
push eax
call fcn.01004bcf
mov eax, dword [ebp + 8]
and eax, 0x1fff0000
add esp, 0x20
cmp eax, 0x70000
jne 0x1001f58
and dword [ebp + 8], reloc.NETAPI32.dll_NetApiBufferFree
xor ebx, ebx
cmp dword [0x1008c50], ebx
jne 0x1001f7c
lea eax, reloc.NETAPI32.dll_NetApiBufferFree
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [0x1008c50], eax
cmp eax, ebx
je 0x1001edc
mov esi, dword [sym.imp.KERNEL32.dll_FormatMessageW]
push ebx
mov edi, 0x40f
push edi
lea eax, reloc.NETAPI32.dll_NetApiBufferFree
push eax
push ebx
push dword [ebp + 8]
push ebx
push 0x1200
call esi
test eax, eax
jne 0x1001fd3
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x13d
jne 0x1001edc
push ebx
push edi
lea eax, reloc.NETAPI32.dll_NetApiBufferFree
push eax
push ebx
push dword [ebp + 8]
push dword [0x1008c50]
push 0xa00
call esi
test eax, eax
je 0x1001edc
lea eax, reloc.NETAPI32.dll_NetApiBufferFree
push eax
push dword [ebp + 8]
mov esi, 0x1008400
push dword [ebp + 8]
push 0x1001200
push 0x423
push 0x424
push esi
call fcn.01004b37
add esp, 0x1c
jmp 0x1001eff

Function at 0x1002e7e
Capabilities:
Terminate process

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push dword [ebp + 8]
push 0x2710
push 0xfffffffffffffff5
call fcn.010044e9
push 0x2711
push 0xfffffffffffffff5
call fcn.010044e9
add esp, 0x14
push 2
call dword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x10037d7
Capabilities:
Hash data using djb2

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x2f
push dword [ebp + 8]
mov esi, 0x1505
call dword [sym.imp.msvcrt.dll_wcschr]
pop ecx
pop ecx
jmp 0x1003814
cmp cx, 0x2e
je 0x100381e
mov cl, byte [eax]
test cl, cl
je 0x1003805
imul esi, esi, 0x21
movzx ecx, cl
add esi, ecx
mov cl, byte [eax + 1]
test cl, cl
je 0x1003814
imul esi, esi, 0x21
movzx ecx, cl
add esi, ecx
inc eax
inc eax
movzx ecx, word [eax]
test cx, cx
jne 0x10037f1
mov eax, esi
pop esi
pop ebp
ret 4

Function at 0x100492d
Capabilities:
Terminate process

Disassembly:
push 0x10
push 0x1006898
call fcn.01005204
xor ebx, ebx
mov dword [ebp - 4], ebx
mov eax, dword fs:[0x18]
mov esi, dword [eax + 4]
mov dword [ebp - 0x1c], ebx
mov edi, 0x1008fd0
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
cmp eax, ebx
je 0x1004742
cmp eax, esi
jne 0x1004735
xor esi, esi
inc esi
mov dword [ebp - 0x1c], esi
jmp 0x1004745
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x100471c
xor esi, esi
inc esi
mov eax, dword [0x1008fcc]
cmp eax, esi
jne 0x1004758
push 0x1f
call sub.msvcrt.dll__amsg_exit
pop ecx
jmp 0x1004793
mov eax, dword [0x1008fcc]
test eax, eax
jne 0x100478d
mov dword [0x1008fcc], esi
push 0x10011d4
push 0x10011c8
call fcn.01004699
pop ecx
pop ecx
test eax, eax
je 0x1004793
mov dword [ebp - 4], NetApiBufferFree
mov eax, 0xff
jmp 0x100485d
mov dword [0x1008c94], esi
mov eax, dword [0x1008fcc]
cmp eax, esi
jne 0x10047b7
push 0x10011c4
push 0x10011bc
call sub.msvcrt.dll__initterm
pop ecx
pop ecx
mov dword [0x1008fcc], 2
cmp dword [ebp - 0x1c], ebx
jne 0x10047c4
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
cmp dword [0x1008fd8], ebx
je 0x10047e5
push 0x1008fd8
call fcn.01005179
pop ecx
test eax, eax
je 0x10047e5
push ebx
push 2
push ebx
call dword [0x1008fd8]
push dword [0x1008c7c]
push dword [0x1008c80]
push dword [0x1008c78]
call fcn.01002eaf
add esp, 0xc
mov dword [0x1008c90], eax
cmp dword [0x1008c84], ebx
jne 0x1004843
push eax
call dword [sym.imp.msvcrt.dll_exit]
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
mov ecx, dword [ecx]
mov dword [ebp - 0x20], ecx
push eax
push ecx
call sub.msvcrt.dll__XcptFilter
pop ecx
pop ecx
ret
cmp dword [0x1008c94], ebx
jne 0x1004851
call dword [sym.imp.msvcrt.dll__cexit]
mov dword [ebp - 4], NetApiBufferFree
mov eax, dword [0x1008c90]
call fcn.01005249
ret
call fcn.01005351
jmp 0x10046fa
Function at 0x1006529
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
xor ebx, ebx
mov dword [ebp - 4], ebx
cmp dword [ebp + 0xc], ebx
je 0x100660c
push esi
call dword [sym.imp.KERNEL32.dll_GetConsoleOutputCP]
mov esi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push ebx
push ebx
push ebx
push ebx
push 0xffffffffffffffff
push dword [ebp + 0xc]
mov dword [ebp - 8], eax
push ebx
push eax
call esi
mov dword [ebp - 4], eax
cmp eax, ebx
jne 0x1006586
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push 0x1001c78
push eax
call dword [sym.imp.msvcrt.dll_fwprintf]
add esp, 0xc
jmp 0x100660b
push edi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
cmp edi, ebx
jne 0x10065ba
push dword [ebp - 4]
mov eax, dword [sym.imp.msvcrt.dll__iob]
push 8
add eax, 0x40
push 0x1001c10
push eax
call dword [sym.imp.msvcrt.dll_fwprintf]
add esp, 0x10
jmp 0x10065f7
push ebx
push ebx
push dword [ebp - 4]
push edi
push 0xffffffffffffffff
push dword [ebp + 0xc]
push ebx
push dword [ebp - 8]
call esi
mov dword [ebp - 4], eax
cmp eax, ebx
je 0x10065f7
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x10065d7
push ebx
lea ecx, [ebp - 4]
push ecx
sub eax, edx
push eax
push edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp edi, ebx
je 0x100660a
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x402b30
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.00404590
test esi, esi
jne 0x402b66
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.00404680
jmp 0x402b84
call sub.KERNEL32.DLL_GetCommandLineA
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.004029e4
mov edi, eax
test esi, esi
je 0x402b84
cmp dword [ebx], 0
je 0x402b84
dec esi
jmp 0x402b6d
add esp, 0x108
pop edi
pop esi
pop ebx
ret

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

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

Function at 0x403694
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [0x480010]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x40372c
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA_1
test eax, eax
jne 0x40370c
xor eax, eax
push ebp
push 0x403705
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 0x403748
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegQueryValueExA_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40370c
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey_1
ret
mov ax, word [0x480010]
and ax, 0xffc0
mov dx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [0x480010], ax
mov esp, ebp
pop ebp
ret

Function at 0x404414
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x48304c], 0
je 0x404475
cmp word [0x483220], 0xd7b2
jne 0x40443d
cmp dword [0x483228], 0
jbe 0x40443d
mov eax, 0x48321c
call dword [0x483238]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x480058
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 0x40449c
push 0xfffffffffffffff5
call sub.KERNEL32.DLL_GetStdHandle
push eax
call sub.KERNEL32.DLL_WriteFile
pop edx
ret
cmp byte [0x480020], 0
jne 0x404491
push 0
push 0x480078
push 0x480058
push 0
call sub.user32.dll_MessageBoxA_1
pop edx
ret
Function at 0x406028
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 0x406258
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA_1
test eax, eax
je 0x4060ab
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x406258
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA_1
test eax, eax
je 0x4060ab
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x406274
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA_1
test eax, eax
jne 0x406134
xor eax, eax
push ebp
push 0x40612d
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0x18], 5
lea eax, [ebp - 0x11d]
mov edx, 0x105
call fcn.00405e70
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_1
test eax, eax
je 0x406112
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x12]
push eax
push 0
push 0
push 0x406294
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegQueryValueExA_1
test eax, eax
je 0x406112
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 0x406134
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegCloseKey_1
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 0x40624e
cmp byte [ebp - 0xd], 0
jne 0x40617b
cmp byte [ebp - 0x12], 0
je 0x40624e
lea eax, [ebp - 0x11d]
push eax
call sub.KERNEL32.DLL_lstrlenA
mov ebx, eax
lea eax, [ebp - 0x11d]
add ebx, eax
jmp 0x406194
dec ebx
cmp byte [ebx], 0x2e
je 0x4061a3
lea eax, [ebp - 0x11d]
cmp ebx, eax
jne 0x406193
lea eax, [ebp - 0x11d]
cmp ebx, eax
je 0x40624e
inc ebx
cmp byte [ebp - 0x12], 0
je 0x4061e0
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 0x40624e
cmp byte [ebp - 0xd], 0
je 0x40624e
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 0x40624e
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
Function at 0x408f98
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebx
mov ebx, eax
mov eax, ebx
call fcn.00404a40
push eax
call sub.KERNEL32.DLL_GetFileAttributesA
cmp eax, 0xffffffff
je 0x408fb1
test al, 0x10
jne 0x408fb5
xor eax, eax
pop ebx
ret
mov al, 1
pop ebx
ret

Function at 0x408fbc
Capabilities:
Get file attributes

Disassembly:
push ebx
mov ebx, eax
mov eax, ebx
call fcn.00404a40
push eax
call sub.KERNEL32.DLL_GetFileAttributesA
pop ebx
ret

Function at 0x408fd0
Capabilities:
Set file attributes

Disassembly:
push ebx
push esi
push edi
mov edi, edx
mov esi, eax
xor ebx, ebx
push edi
mov eax, esi
call fcn.00404a40
push eax
call sub.KERNEL32.DLL_SetFileAttributesA
test eax, eax
jne 0x408ff2
call sub.KERNEL32.DLL_GetLastError_1
mov ebx, eax
mov eax, ebx
pop edi
pop esi
pop ebx
ret

Function at 0x40bd50
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 0x40bd89
mov ecx, eax
dec ecx
lea edx, [ebp - 0x100]
mov eax, ebx
call fcn.00404680
jmp 0x40bd92
mov eax, ebx
mov edx, esi
call fcn.004045e4
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

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

Function at 0x40d2f0
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
push ebx
xor edx, edx
mov dword [ebp - 0xc], edx
xor edx, edx
push ebp
push 0x40d354
push dword fs:[edx]
mov dword fs:[edx], esp
push 7
lea edx, [ebp - 7]
push edx
push 0x1004
push eax
call sub.KERNEL32.DLL_GetLocaleInfoA_1
lea eax, [ebp - 0xc]
lea edx, [ebp - 7]
mov ecx, 7
call fcn.004047f8
mov eax, dword [ebp - 0xc]
push eax
call sub.KERNEL32.DLL_GetACP
mov edx, eax
pop eax
call fcn.00408d6c
mov ebx, eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40d35b
lea eax, [ebp - 0xc]
call fcn.00404590
ret
Function at 0x423de8
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov edi, 0x483a24
cmp dword [edi], 0
jne 0x423e64
push 0x40
push 0x1000
push 0x1000
push 0
call sub.KERNEL32.DLL_VirtualAlloc_1
mov esi, eax
mov eax, dword [0x483a20]
mov dword [esi], eax
lea edx, [esi + 4]
mov eax, 0x48066c
mov ecx, 2
call fcn.004029a4
mov edx, 0x423dc0
lea eax, [esi + 5]
call fcn.00423de0
mov dword [esi + 6], eax
lea ebx, [esi + 0xa]
mov byte [ebx], 0xe8
lea edx, [esi + 4]
mov eax, ebx
call fcn.00423de0
mov dword [ebx + 1], eax
mov eax, dword [edi]
mov dword [ebx + 5], eax
mov dword [edi], ebx
add ebx, 0xd
mov eax, ebx
sub eax, esi
cmp eax, 0xffc
jl 0x423e39
mov dword [0x483a20], esi
mov eax, dword [edi]
mov ebx, dword [edi]
mov edx, dword [ebx + 5]
mov dword [edi], edx
mov edx, dword [ebp + 8]
mov dword [ebx + 5], edx
mov edx, dword [ebp + 0xc]
mov dword [ebx + 9], edx
pop edi
pop esi
pop ebx
pop ebp
ret 8

Function at 0x425410
Capabilities:
Encode data using xor

Disassembly:
mov ecx, edx
mov edx, eax
xor eax, eax
rol ax, 5
xor al, byte [edx]
inc edx
dec ecx
jne 0x425416
ret

Function at 0x427908
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd4
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
lea eax, [ebp - 0x2c]
push eax
call sub.KERNEL32.DLL_GetSystemInfo
mov edx, dword [ebp - 4]
mov ecx, dword [ebp - 8]
dec ecx
js 0x427959
lea eax, [ebp - 0x2c]
cmp word [eax + 0x20], 3
je 0x427940
mov eax, dword [edx + ecx*4]
bswap eax
shr eax, 8
mov dword [edx + ecx*4], eax
dec ecx
jns 0x427930
jmp 0x427959
push ebx
xor ebx, ebx
mov eax, dword [edx + ecx*4]
mov bh, al
mov bl, ah
shr eax, 0x10
shl ebx, 8
mov bl, al
mov dword [edx + ecx*4], ebx
dec ecx
jns 0x427941
pop ebx
mov esp, ebp
pop ebp
ret