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

Disassembly:
sub esp, 0x130
lea eax, [esp + 8]
push ebx
mov ebx, dword [esp + 0x138]
push ebp
push esi
lea ebp, [ebx + 0x1a]
push eax
push ebp
call fcn.00403180
add esp, 8
test eax, eax
je 0x403ac7
push edi
mov ecx, 0x49
lea esi, [esp + 0x18]
mov edi, ebp
mov dword [ebx + 0x16], 0x125
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x14]
push ecx
movsb byte es:[edi], byte [esi]
call fcn.00407159
lea edx, [esp + 0x14]
push edx
call fcn.00407159
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
add esp, 8
inc eax
cmp eax, ecx
pop edi
jle 0x403ac7
lea ecx, [esp + 0xc]
push ecx
call fcn.00407159
xor ecx, ecx
add esp, 4
mov cx, word [ebx]
xor eax, eax
lea esi, [ecx - 1]
cmp esi, 0xf
ja case.0x403a4c.4
xor edx, edx
mov dl, byte [esi + 0x403ae4]
jmp dword [edx*4 + 0x403ad4]
mov ecx, dword [ebx + 0x16]
mov edx, dword [ebx + 2]
lea eax, [ebx + 6]
push 0x10
push eax
push 0
push ecx
push ebp
push edx
call sub.WSOCK32.dll_sendto
jmp case.0x403a4c.4
mov eax, dword [ebx + 0x16]
mov ecx, dword [ebx + 2]
push 0
push eax
push ebp
push ecx
call sub.WSOCK32.dll_send
jmp case.0x403a4c.4
mov dx, word [ebx + 0x16]
mov al, byte [ebx + 6]
mov cl, byte [ebx + 2]
push edx
push ebp
push eax
push ecx
call fcn.00403b00
add esp, 0x10
and eax, 0xff
cmp word [ebx], 0x10
je 0x403ab1
cmp eax, 0xffffffff
jne 0x403ac7
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2733
jne 0x403ac7
jmp 0x403ab6
cmp eax, 5
jne 0x403ac7
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0xc]
inc edx
cmp edx, eax
jg 0x403a28
pop esi
pop ebp
pop ebx
add esp, 0x130
ret

Function at 0x403b50
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
call fcn.00401000
mov esi, dword [esp + 0xc]
mov dword [esi], eax
call fcn.00401000
mov dword [esi + 4], eax
mov byte [esi + 8], 0
xor eax, eax
mov cl, byte [eax + esi]
mov dl, byte [esi + 8]
add dl, cl
inc eax
cmp eax, 8
mov byte [esi + 8], dl
jl 0x403b6b
mov eax, dword [esi + 9]
xor eax, 0xa8a8a8a8
mov dword [esi + 9], eax
xor eax, eax
mov edx, eax
and edx, 0x80000007
jns 0x403b98
dec edx
or edx, 0xfffffff8
inc edx
mov cl, byte [edx + esi]
mov dl, byte [esi + eax + 0xd]
xor dl, cl
mov byte [esi + eax + 0xd], dl
inc eax
cmp eax, 0x128
jl 0x403b89
mov ecx, dword [esp + 0x10]
mov eax, esi
sub ecx, esi
mov esi, 8
mov dl, byte [ecx + eax]
mov bl, byte [eax]
xor bl, dl
mov byte [eax], bl
inc eax
dec esi
jne 0x403bba
pop esi
pop ebx
ret
Function at 0x404710
Capabilities:
Send data
Send data on socket
Set socket configuration

Disassembly:
sub esp, 0x24
push esi
push edi
push 0x3e8
mov edi, 6
push 2
push edi
call sub.WSOCK32.dll_socket
mov esi, eax
cmp esi, 0xffffffff
jne 0x404739
call sub.WSOCK32.dll_WSAGetLastError
pop edi
pop esi
add esp, 0x24
ret
xor eax, eax
mov dword [esp + 0x1c], eax
mov word [esp + 0x1c], di
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
push eax
mov word [esp + 0x2c], ax
call sub.WSOCK32.dll_htons
lea ecx, [esp + 0x1c]
push 0xe
push ecx
push esi
mov word [esp + 0x34], ax
call sub.WSOCK32.dll_bind
cmp eax, 0xffffffff
jne 0x404783
call sub.WSOCK32.dll_WSAGetLastError
push esi
mov edi, eax
call sub.WSOCK32.dll_closesocket
mov eax, edi
pop edi
pop esi
add esp, 0x24
ret
lea edx, [esp + 8]
push 4
push edx
push 0x20
push 0xffff
push esi
mov dword [esp + 0x1c], 1
call sub.WSOCK32.dll_setsockopt
cmp eax, 0xffffffff
jne 0x4047b9
call sub.WSOCK32.dll_WSAGetLastError
push esi
mov edi, eax
call sub.WSOCK32.dll_closesocket
mov eax, edi
pop edi
pop esi
add esp, 0x24
ret
xor eax, eax
or ecx, 0xffffffff
mov dword [esp + 0xc], eax
push 0x452
mov dword [esp + 0x14], eax
mov word [esp + 0x10], di
mov dword [esp + 0x18], eax
mov dword [esp + 0x16], ecx
mov word [esp + 0x1c], ax
mov word [esp + 0x1a], cx
call sub.WSOCK32.dll_htons
mov ecx, dword [esp + 0x30]
lea edx, [esp + 0xc]
mov word [esp + 0x18], ax
mov eax, dword [esp + 0x34]
push 0xe
push edx
push 0
push eax
push ecx
push esi
call sub.WSOCK32.dll_sendto
cmp eax, 0xffffffff
jne 0x40481f
call sub.WSOCK32.dll_WSAGetLastError
push esi
mov edi, eax
call sub.WSOCK32.dll_closesocket
mov eax, edi
pop edi
pop esi
add esp, 0x24
ret
push esi
call sub.WSOCK32.dll_closesocket
pop edi
xor eax, eax
pop esi
add esp, 0x24
ret
Function at 0x404b00
Capabilities:
Create tcp socket
Create udp socket
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration

Disassembly:
sub esp, 0x28c
mov ecx, dword [0x411360]
mov eax, dword [str.GSND_REQ]
mov dword [esp + 0x3d], ecx
mov ecx, dword [esp + 0x290]
mov dword [esp + 0x39], eax
mov eax, ecx
shl eax, 6
sub eax, ecx
push ebx
push esi
push edi
lea edx, [eax + eax*4]
mov dword [esp + 0x34], 0x64
mov word [esp + 0x4d], 0
mov dword [esp + 0x55], GetEnvironmentVariableA
lea eax, [ecx + edx*4]
lea edx, [esp + 0x38]
lea ebx, [eax + eax*8]
mov eax, dword [0x414798]
shl ebx, 1
sub ebx, ecx
shl ebx, 1
add eax, ebx
push eax
push edx
mov ecx, dword [eax + 8]
mov dword [esp + 0x49], ecx
call fcn.00403b50
add esp, 8
mov edi, 6
push 0x3e8
push 2
push edi
call sub.WSOCK32.dll_socket
mov esi, eax
cmp esi, 0xffffffff
jne 0x404b96
call sub.WSOCK32.dll_WSAGetLastError
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x28c
ret
xor eax, eax
lea ecx, [esp + 0x20]
mov dword [esp + 0x20], eax
push 0xe
mov dword [esp + 0x28], eax
push ecx
mov dword [esp + 0x30], eax
push esi
mov word [esp + 0x38], ax
mov word [esp + 0x2c], di
mov word [esp + 0x38], ax
call sub.WSOCK32.dll_bind
cmp eax, 0xffffffff
je 0x404cc2
lea edx, [esp + 0x1c]
push 4
push edx
push 0x20
push 0xffff
push esi
mov dword [esp + 0x30], 1
call sub.WSOCK32.dll_setsockopt
cmp eax, 0xffffffff
je 0x404cc2
lea eax, [esp + 0x34]
push 4
push eax
push 0x1006
push 0xffff
push esi
call sub.WSOCK32.dll_setsockopt
cmp eax, 0xffffffff
je 0x404cc2
xor ecx, ecx
or edx, 0xffffffff
mov dword [esp + 0xc], ecx
push 0x4587
mov dword [esp + 0x14], ecx
mov word [esp + 0x10], di
mov dword [esp + 0x18], ecx
mov dword [esp + 0x16], edx
mov word [esp + 0x1c], cx
mov word [esp + 0x1a], dx
call sub.WSOCK32.dll_htons
mov word [esp + 0x18], ax
lea eax, [esp + 0xc]
push 0xe
push eax
push 0
lea ecx, [esp + 0x44]
push 0x135
push ecx
push esi
call sub.WSOCK32.dll_sendto
cmp eax, 0xffffffff
je 0x404cc2
mov ecx, 0x49
xor eax, eax
lea edi, [esp + 0x170]
lea edx, [esp + 0x30]
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
lea eax, [esp + 0xc]
push edx
push eax
push 0
lea ecx, [esp + 0x17c]
push 0x125
push ecx
push esi
mov dword [esp + 0x48], 0xe
call sub.WSOCK32.dll_recvfrom
cmp eax, 0xffffffff
je 0x404cc2
test eax, eax
je 0x404cc2
push esi
call sub.WSOCK32.dll_closesocket
mov edx, dword [0x414798]
mov eax, 1
pop edi
pop esi
mov dword [ebx + edx + 0xb124], eax
pop ebx
add esp, 0x28c
ret
call sub.WSOCK32.dll_WSAGetLastError
push esi
call sub.WSOCK32.dll_closesocket
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x28c
ret
Function at 0x405d50
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x14
push esi
push 0x3e8
push 2
push 6
call sub.WSOCK32.dll_socket
mov esi, eax
cmp esi, 0xffffffff
jne 0x405d73
call sub.WSOCK32.dll_WSAGetLastError
pop esi
add esp, 0x14
ret
xor eax, eax
lea ecx, [esp + 8]
mov dword [esp + 8], eax
push 0xe
mov dword [esp + 0x10], eax
push ecx
mov dword [esp + 0x18], eax
push esi
mov word [esp + 0x20], ax
mov word [esp + 0x14], 6
mov word [esp + 0x20], ax
call sub.WSOCK32.dll_bind
cmp eax, 0xffffffff
jne 0x405dc8
push edi
call sub.WSOCK32.dll_WSAGetLastError
mov edi, eax
push edi
push str.bind_error:__d_n
call fcn.00407118
add esp, 8
push esi
call sub.WSOCK32.dll_closesocket
mov eax, edi
pop edi
pop esi
add esp, 0x14
ret
xor edx, edx
lea eax, [esp + 4]
mov dword [esp + 8], edx
lea ecx, [esp + 8]
mov dword [esp + 0xc], edx
push eax
mov dword [esp + 0x14], edx
push ecx
push esi
mov dword [esp + 0x10], 0xe
mov word [esp + 0x20], dx
call sub.WSOCK32.dll_getsockname
mov edx, dword [esp + 8]
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
mov dword [0x416ff0], edx
mov dx, word [esp + 0x14]
push esi
mov dword [0x416ff4], eax
mov dword [0x416ff8], ecx
mov word [0x416ffc], dx
call sub.WSOCK32.dll_closesocket
xor eax, eax
pop esi
add esp, 0x14
ret

Function at 0x405e30
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x14
push esi
push edi
push 0x3e8
push 2
push 6
call sub.WSOCK32.dll_socket
mov esi, eax
cmp esi, 0xffffffff
jne 0x405e55
call sub.WSOCK32.dll_WSAGetLastError
pop edi
pop esi
add esp, 0x14
ret
xor eax, eax
push 0x4587
mov dword [esp + 0x10], eax
mov word [esp + 0x10], 6
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov word [esp + 0x1c], ax
call sub.WSOCK32.dll_htons
lea ecx, [esp + 0xc]
push 0xe
push ecx
push esi
mov word [esp + 0x24], ax
call sub.WSOCK32.dll_bind
cmp eax, 0xffffffff
jne 0x405eb3
call sub.WSOCK32.dll_WSAGetLastError
mov edi, eax
push edi
push str.bind_error:__d_n
call fcn.00407118
add esp, 8
push esi
call sub.WSOCK32.dll_closesocket
mov eax, edi
pop edi
pop esi
add esp, 0x14
ret
lea edx, [esp + 8]
push 4
push edx
push 0x20
push 0xffff
push esi
mov dword [esp + 0x1c], 1
call sub.WSOCK32.dll_setsockopt
cmp eax, 0xffffffff
jne 0x405ee9
call sub.WSOCK32.dll_WSAGetLastError
push esi
mov edi, eax
call sub.WSOCK32.dll_closesocket
mov eax, edi
pop edi
pop esi
add esp, 0x14
ret
mov eax, dword [esp + 0x20]
pop edi
mov dword [eax], esi
xor eax, eax
pop esi
add esp, 0x14
ret
Function at 0x405f00
Capabilities:
Create udp socket
Set socket configuration

Disassembly:
sub esp, 0x14
push esi
push edi
push 0
push 2
push 2
call sub.WSOCK32.dll_socket
mov esi, eax
cmp esi, 0xffffffff
jne 0x405f22
call sub.WSOCK32.dll_WSAGetLastError
pop edi
pop esi
add esp, 0x14
ret
xor eax, eax
mov dword [esp + 0xc], eax
mov word [esp + 0xc], 2
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
push eax
mov dword [esp + 0x1c], eax
call sub.WSOCK32.dll_htonl
push 0x11eb
mov dword [esp + 0x14], eax
call sub.WSOCK32.dll_htons
lea ecx, [esp + 0xc]
push 0x10
push ecx
push esi
mov word [esp + 0x1a], ax
call sub.WSOCK32.dll_bind
cmp eax, 0xffffffff
jne 0x405f7b
call sub.WSOCK32.dll_WSAGetLastError
push esi
mov edi, eax
call sub.WSOCK32.dll_closesocket
mov eax, edi
pop edi
pop esi
add esp, 0x14
ret
lea edx, [esp + 8]
push 4
push edx
push 0x20
push 0xffff
push esi
mov dword [esp + 0x1c], 1
call sub.WSOCK32.dll_setsockopt
cmp eax, 0xffffffff
jne 0x405fbf
call sub.WSOCK32.dll_WSAGetLastError
mov edi, eax
push edi
push str.setsockopt___failed__error_code:__d_n
call fcn.00407118
add esp, 8
push esi
call sub.WSOCK32.dll_closesocket
mov eax, edi
pop edi
pop esi
add esp, 0x14
ret
mov eax, dword [esp + 0x20]
pop edi
mov dword [eax], esi
xor eax, eax
pop esi
add esp, 0x14
ret

Function at 0x405fd0
Capabilities:
Create tcp socket
Create udp socket

Disassembly:
sub esp, 0x10
push esi
push edi
push 0
push 1
push 2
call sub.WSOCK32.dll_socket
mov esi, eax
cmp esi, 0xffffffff
jne 0x405ff2
call sub.WSOCK32.dll_WSAGetLastError
pop edi
pop esi
add esp, 0x10
ret
xor eax, eax
mov dword [esp + 8], eax
mov word [esp + 8], 2
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], eax
push eax
mov dword [esp + 0x18], eax
call sub.WSOCK32.dll_htonl
push 0x11eb
mov dword [esp + 0x10], eax
call sub.WSOCK32.dll_htons
lea ecx, [esp + 8]
push 0x10
push ecx
push esi
mov word [esp + 0x16], ax
call sub.WSOCK32.dll_bind
cmp eax, 0xffffffff
jne 0x40604b
call sub.WSOCK32.dll_WSAGetLastError
push esi
mov edi, eax
call sub.WSOCK32.dll_closesocket
mov eax, edi
pop edi
pop esi
add esp, 0x10
ret
push 0x64
push esi
call sub.WSOCK32.dll_listen
cmp eax, 0xffffffff
jne 0x40606d
call sub.WSOCK32.dll_WSAGetLastError
push esi
mov edi, eax
call sub.WSOCK32.dll_closesocket
mov eax, edi
pop edi
pop esi
add esp, 0x10
ret
mov edx, dword [esp + 0x1c]
pop edi
xor eax, eax
mov dword [edx], esi
pop esi
add esp, 0x10
ret
Function at 0x406870
Capabilities:
Check mutex on windows

Disassembly:
sub esp, 0x34
push esi
push edi
mov edi, dword [esp + 0x40]
push str.ndsrvw95.exe
push 1
push 0
mov dword [0x416b28], edi
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x4068bc
push 0
push str.NetDog_Server_Status
push str.NetDog_Server_has_already_started.
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
mov eax, 1
pop esi
add esp, 0x34
ret 0x10
call fcn.00406c90
mov esi, eax
test esi, esi
je 0x4068f9
push esi
lea eax, [esp + 0xc]
push str.Cannot_start_NetDogServer__return_code:__d
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea ecx, [esp + 8]
push 0
push str.ERROR
push ecx
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, esi
pop edi
pop esi
add esp, 0x34
ret 0x10
push 0
push 0x406920
push 0
push 0x6c
push edi
call dword [sym.imp.USER32.dll_DialogBoxParamA]
pop edi
xor eax, eax
pop esi
add esp, 0x34
ret 0x10
Function at 0x406f60
Capabilities:
Delete registry key
Delete registry value
Get common file path
Persist via run registry key
Query or enumerate registry value

Disassembly:
sub esp, 0x15c
lea eax, [esp + 8]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea ecx, [esp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp byte [esp + eax + 7], 0x5c
je 0x406f92
mov byte [esp + eax + 8], 0x5c
mov byte [esp + eax + 9], 0
push esi
push edi
lea edx, [esp + 0x10]
push str.NDOGSRV.DOG
push edx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [esp + 0x10]
push eax
call fcn.00407ce3
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
add esp, 4
lea ecx, [esp + 8]
push ecx
push str.SOFTWAREMicrosoftWindowsCurrentVersionRun
push reloc.WSOCK32.dll_bind
call edi
test eax, eax
jne 0x40707d
mov ecx, dword [esp + 8]
lea edx, [esp + 0xc]
lea eax, [esp + 0x114]
push edx
push eax
push 0
push 0
push str.NHNetDogService
push ecx
mov dword [esp + 0x24], 0x50
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x407024
lea edx, [esp + 0x114]
push edx
push 0x416b40
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x407024
mov eax, dword [esp + 8]
push str.NHNetDogService
push eax
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
mov ecx, dword [esp + 8]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ecx
call esi
lea edx, [esp + 8]
push edx
push str.SystemCurrentControlSetServicesNHNetDogService
push reloc.WSOCK32.dll_bind
call edi
test eax, eax
jne 0x407068
push str.SystemCurrentControlSetServicesNHNetDogService
push reloc.WSOCK32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
mov eax, dword [esp + 8]
push eax
call esi
pop edi
xor eax, eax
pop esi
add esp, 0x15c
ret
mov ecx, dword [esp + 8]
push ecx
call esi
pop edi
mov eax, 1
pop esi
add esp, 0x15c
ret
mov edx, dword [esp + 8]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov eax, 1
pop esi
add esp, 0x15c
ret
Function at 0x40b8bb
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x414088
cmp edx, dword [eax]
je 0x40b8dd
add eax, 8
inc ecx
cmp eax, 0x414118
jl 0x40b8ce
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x414088]
jne 0x40ba0b
mov eax, dword [0x4167d0]
cmp eax, 1
je 0x40b9e5
test eax, eax
jne 0x40b90e
cmp dword [0x411ae4], 1
je 0x40b9e5
cmp edx, 0xfc
je 0x40ba0b
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40b945
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.0040d690
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.0040bac0
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x40b988
lea eax, [ebp - 0x1a4]
push eax
call fcn.0040bac0
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x40f608
push edi
call fcn.00407ac0
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.0040d690
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.0040d6a0
lea eax, [ebp - 0xa0]
push 0x40f5e8
push eax
call fcn.0040d6a0
push dword [esi + 0x41408c]
lea eax, [ebp - 0xa0]
push eax
call fcn.0040d6a0
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.0040d780
add esp, 0x2c
pop edi
jmp 0x40ba0b
lea eax, [ebp + 8]
lea esi, [esi + 0x41408c]
push 0
push eax
push dword [esi]
call fcn.0040bac0
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
leave
ret
Function at 0x402b4c
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.004047f0
test esi, esi
jne 0x402b82
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.004048e0
jmp 0x402ba0
call sub.kernel32.dll_GetCommandLineA
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.00402a00
mov edi, eax
test esi, esi
je 0x402ba0
cmp dword [ebx], 0
je 0x402ba0
dec esi
jmp 0x402b89
add esp, 0x108
pop edi
pop esi
pop ebx
ret

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

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

Function at 0x403850
Capabilities:
Query or enumerate registry value

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

Function at 0x4045d0
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x4d604c], 0
je 0x404631
cmp word [0x4d6220], 0xd7b2
jne 0x4045f9
cmp dword [0x4d6228], 0
jbe 0x4045f9
mov eax, 0x4d621c
call dword [0x4d6238]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x4d2074
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 0x404658
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x4d2034], 0
jne 0x40464d
push 0
push 0x4d206c
push 0x4d2074
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret

Function at 0x4047a4
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.004027c4
mov dword [eax], edi
mov edx, dword [ebp + 0x10]
mov dword [eax + 4], edx
mov byte [0x4d604d], 1
mov edx, dword [ebp + 8]
push edx
mov edx, dword [ebp + 0xc]
push edx
push eax
mov eax, 0x40476c
push eax
push esi
push ebx
call sub.kernel32.dll_CreateThread
pop edi
pop esi
pop ebx
pop ebp
ret 0xc
Function at 0x40615c
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 0x40638c
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
je 0x4061df
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x40638c
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
je 0x4061df
lea eax, [ebp - 8]
push eax
push 0xf0019
push 0
push 0x4063a8
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x406268
xor eax, eax
push ebp
push 0x406261
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0x18], 5
lea eax, [ebp - 0x11d]
mov edx, 0x105
call fcn.00405fa4
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 0x406246
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x12]
push eax
push 0
push 0
push 0x4063c8
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
je 0x406246
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 0x406268
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 0x406382
cmp byte [ebp - 0xd], 0
jne 0x4062af
cmp byte [ebp - 0x12], 0
je 0x406382
lea eax, [ebp - 0x11d]
push eax
call sub.kernel32.dll_lstrlenA
mov ebx, eax
lea eax, [ebp - 0x11d]
add ebx, eax
jmp 0x4062c8
dec ebx
cmp byte [ebx], 0x2e
je 0x4062d7
lea eax, [ebp - 0x11d]
cmp ebx, eax
jne 0x4062c7
lea eax, [ebp - 0x11d]
cmp ebx, eax
je 0x406382
inc ebx
cmp byte [ebp - 0x12], 0
je 0x406314
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 0x406382
cmp byte [ebp - 0xd], 0
je 0x406382
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 0x406382
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