joyce8/EMBER2024-capa huggingface dataset:
Function at 0x5df08527
Capabilities:
Connect socket
Get socket status
Set socket configuration

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x21c
and dword [ebp - 8], 0
and dword [ebp - 4], 0
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
lea eax, [ebp - 0xc]
push eax
mov ebx, 0x8004667e
push ebx
push dword [esi]
xor edi, edi
inc edi
mov dword [ebp - 0xc], edi
call sub.WS2_32.dll_ioctlsocket
cmp eax, 0xffffffff
jne 0x5df0856b
call sub.WS2_32.dll_WSAGetLastError
mov eax, 0x88770168
jmp 0x5df08634
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [esi]
call sub.WS2_32.dll_connect
cmp eax, 0xffffffff
jne 0x5df08615
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x2733
jne 0x5df08604
mov eax, dword [esi]
mov dword [ebp - 0x114], eax
mov dword [ebp - 0x218], eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x118]
mov dword [ebp - 0x118], edi
mov dword [ebp - 0x21c], edi
xor edi, edi
push eax
push edi
push edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x10], 0xe4e1c0
call sub.WS2_32.dll_select
cmp eax, 0xffffffff
jne 0x5df085d8
call sub.WS2_32.dll_WSAGetLastError
jmp 0x5df08604
cmp eax, edi
je 0x5df08604
lea eax, [ebp - 0x118]
push eax
push dword [esi]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x5df08561
lea eax, [ebp - 0x21c]
push eax
push dword [esi]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x5df08615
lea eax, [ebp - 4]
push eax
push ebx
push dword [esi]
call sub.WS2_32.dll_ioctlsocket
jmp 0x5df08561
lea eax, [ebp - 4]
push eax
push ebx
push dword [esi]
call sub.WS2_32.dll_ioctlsocket
cmp dword [ebp + 0x14], 0
je 0x5df08631
push dword [esi]
call fcn.5df05978
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
leave
ret 0x10

Function at 0x5df08640
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x5df0b004]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 0xc]
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp + 0x10]
mov dword [ebp - 0x18], 0x10
call sub.WS2_32.dll_getsockname
cmp eax, 0xffffffff
jne 0x5df08686
call sub.WS2_32.dll_WSAGetLastError
push dword [ebp + 0x10]
call sub.WS2_32.dll_closesocket
mov eax, 0x80004005
jmp 0x5df086f9
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x38]
xor ecx, ecx
dec eax
push edi
cmp dword [ebp + 0x14], ecx
je 0x5df086c3
dec eax
je 0x5df086b0
sub eax, 4
jne 0x5df086f6
push 6
pop eax
mov word [esi], ax
mov ax, word [ebp - 8]
mov word [esi + 0xc], ax
lea edi, [esi + 6]
jmp 0x5df086dd
push 2
pop eax
mov word [esi], ax
mov ax, word [ebp - 0x12]
mov word [esi + 2], ax
mov dword [esi + 4], ecx
jmp 0x5df086f6
dec eax
je 0x5df086e4
sub eax, 4
jne 0x5df086f6
push 6
pop eax
mov word [esi + 0x10], ax
mov ax, word [ebp - 8]
mov word [esi + 0x1c], ax
lea edi, [esi + 0x16]
xor eax, eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
jmp 0x5df086f6
push 2
pop eax
mov word [esi + 0x10], ax
mov ax, word [ebp - 0x12]
mov word [esi + 0x12], ax
mov dword [esi + 0x14], ecx
xor eax, eax
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.5df099e0
leave
ret 0x10
Function at 0x5df0870d
Capabilities:
Set socket configuration

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
mov esi, dword [ebp + 8]
xor eax, eax
push edi
inc eax
xor edi, edi
mov dword [ebp - 4], eax
cmp dword [esi + 0x10], edi
je 0x5df08740
push eax
push edi
push dword [esi + 4]
call fcn.5df083fc
mov eax, dword [esi + 0x10]
or dword [esi + 4], 0xffffffff
mov dword [esi + 0xd8], eax
mov dword [esi + 0x10], edi
push edi
lea eax, [ebp - 8]
push eax
push edi
push 0x8ba
push 2
lea eax, [ebp + 8]
push eax
push esi
call fcn.5df0809b
test eax, eax
jge 0x5df08762
mov eax, 0x88770122
jmp 0x5df08787
mov edi, dword [ebp + 8]
push 4
lea eax, [ebp - 4]
push eax
push 0x20
push 0xffff
push edi
call sub.WS2_32.dll_setsockopt
cmp eax, 0xffffffff
jne 0x5df08782
call sub.WS2_32.dll_WSAGetLastError
mov dword [esi + 4], edi
xor eax, eax
pop edi
pop esi
leave
ret 4

Function at 0x5df08972
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x5df0b004]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x18], 0x10
test esi, esi
je 0x5df0899d
cmp dword [esi + 4], 0
jne 0x5df089bc
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp + 0xc]
call sub.WS2_32.dll_getsockname
cmp eax, 0xffffffff
jne 0x5df089b9
call sub.WS2_32.dll_WSAGetLastError
jmp 0x5df089c3
lea esi, [ebp - 0x14]
add edi, 4
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
xor eax, eax
pop esi
call fcn.5df099e0
leave
ret 0xc

Function at 0x5df089da
Capabilities:
Resolve dns

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
cmp dword [ebp + 0x10], 0
push esi
je 0x5df08a32
mov esi, dword [ebp + 0xc]
test esi, esi
je 0x5df08a32
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x5df089f2
sub eax, edx
je 0x5df08a32
push esi
call sub.WS2_32.dll_inet_addr
test eax, eax
je 0x5df08a32
cmp eax, 0xffffffff
je 0x5df08a13
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
jmp 0x5df08a38
push esi
call sub.WS2_32.dll_gethostbyname
test eax, eax
jne 0x5df08a29
call sub.WS2_32.dll_WSAGetLastError
mov eax, 0x80070057
jmp 0x5df08a3a
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
jmp 0x5df08a0c
mov eax, dword [ebp + 8]
or dword [eax], 0xffffffff
xor eax, eax
pop esi
pop ebp
ret 0xc
Function at 0x5df09238
Capabilities:
Create process on windows
Get common file path

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x220
mov eax, dword [0x5df0b004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov ebx, dword [ebp + 8]
mov esi, 0x5df01478
lea edi, [ebp - 0x14]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
mov esi, 0x94
push esi
xor edi, edi
lea eax, [ebp - 0x1bc]
push edi
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x1bc]
push eax
mov dword [ebp - 0x1bc], esi
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x5df0929c
xor eax, eax
cmp dword [ebp - 0x1ac], 2
sete al
jmp 0x5df092a4
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor eax, eax
mov ecx, dword [0x5df0b398]
cmp ecx, edi
jne 0x5df093c6
cmp eax, edi
je 0x5df092bd
push 0x5df01430
jmp 0x5df092c2
push 0x5df01450
push edi
push 0x100000
call dword [sym.imp.KERNEL32.dll_OpenEventA]
mov esi, eax
cmp esi, edi
jne 0x5df0937e
push 0x105
lea eax, [ebp - 0x128]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
jne 0x5df09301
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.5df099e0
leave
ret 4
push 0x5df01468
push 0x113
lea eax, [ebp - 0x128]
push eax
call fcn.5df091c8
xor eax, eax
mov word [ebp - 0x1ee], ax
lea eax, [ebp - 0x1dc]
push eax
lea eax, [ebp - 0x220]
push eax
push edi
push edi
push 0x20
push edi
push edi
push edi
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x128]
push eax
mov dword [ebp - 0x220], 0x44
mov dword [ebp - 0x21c], edi
mov dword [ebp - 0x218], edi
mov dword [ebp - 0x214], edi
mov dword [ebp - 0x1f4], edi
mov dword [ebp - 0x1ec], edi
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x5df092ee
mov ecx, dword [ebp - 0x1d4]
jmp 0x5df093b6
xor eax, eax
lea edi, [ebp - 0x1cc]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push 0xffffffffffffffff
push esi
stosd dword es:[edi], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x1cc]
push eax
mov dword [ebp - 0x1cc], 4
call fcn.5df08e5b
mov ecx, dword [ebp - 0x1c8]
xor eax, eax
mov dword [0x5df0b398], ecx
inc eax
mov dword [ebx], ecx
jmp 0x5df092f0
xor eax, eax
jmp 0x5df093bf
Function at 0x404548
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffdf4
mov ebx, edx
mov esi, eax
mov eax, ebx
xor edx, edx
call fcn.00406e44
test esi, esi
jne 0x404580
push 0x105
lea eax, [esp + 4]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameW
mov ecx, eax
mov edx, esp
mov eax, ebx
call fcn.00406f80
jmp 0x40459e
call sub.kernel32.dll_GetCommandLineW
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.0040448c
mov edi, eax
test esi, esi
je 0x40459e
cmp dword [ebx], 0
je 0x40459e
dec esi
jmp 0x404587
add esp, 0x20c
pop edi
pop esi
pop ebx
ret

Function at 0x405e08
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x4df050], 0
je 0x405e69
cmp word [0x4df32c], 0xd7b2
jne 0x405e31
cmp dword [0x4df334], 0
jbe 0x405e31
mov eax, 0x4df328
call dword [0x4df344]
push 0
lea eax, [esp + 4]
push eax
push 0x1d
push str.Runtime_error_____at_00000000
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 0x405e94
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x4dc030], 0
jne 0x405e85
push 0
push 0x4dc794
push str.Runtime_error_____at_00000000
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret

Function at 0x405ff4
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov ebx, ecx
mov dword [ebp - 4], edx
mov edi, eax
mov esi, dword [ebp + 0x10]
cmp dword [0x4dc034], 0
je 0x40601a
mov edx, esi
mov eax, ebx
call dword [0x4dc034]
jmp 0x406029
mov eax, 8
call fcn.004041d4
mov dword [eax], ebx
mov dword [eax + 4], esi
mov byte [0x4df051], 1
mov edx, dword [ebp + 8]
push edx
mov edx, dword [ebp + 0xc]
push edx
push eax
mov eax, 0x405fbc
push eax
mov eax, dword [ebp - 4]
push eax
push edi
call sub.kernel32.dll_CreateThread
pop edi
pop esi
pop ebx
pop ecx
pop ebp
ret 0xc
Function at 0x408bf8
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffe94
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x164], ecx
mov dword [ebp - 0x168], ecx
mov dword [ebp - 0x16c], ecx
mov dword [ebp - 8], edx
mov esi, eax
xor eax, eax
push ebp
push 0x408d5f
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 8]
xor edx, edx
call fcn.00406e44
cmp si, word [0x4dc7d0]
jb 0x408c92
cmp si, word [0x4dc9d0]
ja 0x408c92
mov edi, 0x40
xor eax, eax
mov dword [ebp - 0xc], eax
cmp edi, dword [ebp - 0xc]
jb 0x408c92
mov ebx, dword [ebp - 0xc]
add ebx, edi
shr ebx, 1
cmp si, word [ebx*8 + 0x4dc7d0]
jae 0x408c6c
mov edi, ebx
dec edi
jmp 0x408c8d
cmp si, word [ebx*8 + 0x4dc7d0]
jbe 0x408c7c
inc ebx
mov dword [ebp - 0xc], ebx
jmp 0x408c8d
mov edx, dword [ebp - 8]
mov eax, dword [ebx*8 + 0x4dc7d4]
call fcn.00408b08
jmp 0x408c92
cmp edi, dword [ebp - 0xc]
jae 0x408c56
mov eax, dword [ebp - 8]
cmp dword [eax], 0
jne 0x408d41
push 2
movzx eax, si
push eax
call sub.kernel32.dll_IsValidLocale
test eax, eax
je 0x408d41
push 0x55
lea eax, [ebp - 0xb6]
push eax
push 0x59
movzx ebx, si
push ebx
call sub.kernel32.dll_GetLocaleInfoW
push 0x55
lea eax, [ebp - 0x160]
push eax
push 0x5a
push ebx
call sub.kernel32.dll_GetLocaleInfoW
lea eax, [ebp - 0x164]
lea edx, [ebp - 0xb6]
mov ecx, 0x55
call fcn.0040703c
push dword [ebp - 0x164]
push 0x408d7c
lea eax, [ebp - 0x168]
lea edx, [ebp - 0x160]
mov ecx, 0x55
call fcn.0040703c
push dword [ebp - 0x168]
push 0x408d8c
lea eax, [ebp - 0x16c]
lea edx, [ebp - 0xb6]
mov ecx, 0x55
call fcn.0040703c
push dword [ebp - 0x16c]
mov eax, dword [ebp - 8]
mov edx, 5
call fcn.004073f4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x408d66
lea eax, [ebp - 0x16c]
mov edx, 3
call fcn.00406e3c
ret
Function at 0x408d90
Capabilities:
Identify system language via api

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe4
xor ecx, ecx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 6], edx
mov word [ebp - 2], ax
xor eax, eax
push ebp
push 0x408f76
push dword fs:[eax]
mov dword fs:[eax], esp
push 0x4e1b58
call sub.kernel32.dll_EnterCriticalSection
movzx eax, word [0x4e1b70]
cmp ax, word [ebp - 2]
jne 0x408de8
mov eax, dword [ebp - 6]
mov edx, 0x4e1b74
mov ecx, 0x55
call fcn.0040703c
push 0x4e1b58
call sub.kernel32.dll_LeaveCriticalSection
jmp 0x408f60
push 0x4e1b58
call sub.kernel32.dll_LeaveCriticalSection
mov eax, dword [ebp - 6]
xor edx, edx
call fcn.00406e44
push 2
movzx eax, word [ebp - 2]
push eax
call sub.kernel32.dll_IsValidLocale
test eax, eax
je 0x408f28
cmp byte [0x4e1b54], 0
je 0x408ede
call dword [0x4e1b4c]
mov word [ebp - 0x16], ax
movzx eax, word [ebp - 2]
push eax
call dword [0x4e1b50]
xor eax, eax
mov dword [ebp - 0x10], eax
xor eax, eax
mov dword [ebp - 0xc], eax
xor ecx, ecx
push ebp
push 0x408ed7
push dword fs:[ecx]
mov dword fs:[ecx], esp
lea eax, [ebp - 0xc]
push eax
push 0
lea eax, [ebp - 0x14]
push eax
push 0x38
call dword [0x4e1b48]
test al, al
je 0x408eb0
mov eax, dword [ebp - 0xc]
add eax, eax
call fcn.004041d4
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x10]
push eax
lea eax, [ebp - 0x14]
push eax
push 0x38
call dword [0x4e1b48]
mov edx, dword [ebp - 0xc]
sub edx, 2
test edx, edx
jb 0x408ea5
inc edx
xor eax, eax
mov ecx, dword [ebp - 0x10]
cmp word [ecx + eax*2], 0
jne 0x408ea1
mov ecx, dword [ebp - 0x10]
mov word [ecx + eax*2], 0x2c
inc eax
dec edx
jne 0x408e8e
mov eax, dword [ebp - 6]
mov edx, dword [ebp - 0x10]
call fcn.00407000
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x408f28
movzx eax, word [ebp - 0x16]
push eax
call dword [0x4e1b50]
cmp dword [ebp - 0x10], 0
je 0x408ed6
mov eax, dword [ebp - 0x10]
call fcn.004041f0
ret
mov edx, dword [ebp - 6]
movzx eax, word [ebp - 2]
call fcn.00408bf8
call sub.kernel32.dll_GetSystemDefaultUILanguage
cmp ax, word [ebp - 2]
je 0x408f28
mov eax, dword [ebp - 6]
cmp dword [eax], 0
je 0x408f0d
mov eax, dword [ebp - 6]
mov edx, 0x408f90
call fcn.00407250
mov eax, dword [ebp - 6]
call sub.kernel32.dll_GetSystemDefaultUILanguage
lea edx, [ebp - 0x1c]
call fcn.00408bf8
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 6]
call fcn.00407250
mov eax, dword [ebp - 6]
push 0x4e1b58
call sub.kernel32.dll_EnterCriticalSection
movzx eax, word [ebp - 2]
mov word [0x4e1b70], ax
push 0xaa
mov eax, dword [ebp - 6]
mov eax, dword [eax]
call fcn.00406ed0
push eax
push 0x4e1b74
call sub.kernel32.dll_lstrcpynW
push 0x4e1b58
call sub.kernel32.dll_LeaveCriticalSection
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x408f7d
lea eax, [ebp - 0x1c]
call fcn.00406e34
ret
Function at 0x4091b4
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffde4
push ebx
mov ebx, edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00406e2c
xor eax, eax
push ebp
push 0x409399
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [ebp - 4], 0
jne 0x4091f4
push 0x105
lea eax, [ebp - 0x21a]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameW
jmp 0x40920e
push 0x105
mov eax, dword [ebp - 4]
call fcn.00406ed0
push eax
lea eax, [ebp - 0x21a]
push eax
call sub.kernel32.dll_lstrcpynW
cmp word [ebp - 0x21a], 0
je 0x409383
xor eax, eax
mov dword [ebp - 8], eax
lea eax, [ebp - 0xc]
push eax
push 0xf0019
push 0
push 0x4093a8
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExW
test eax, eax
je 0x40929d
lea eax, [ebp - 0xc]
push eax
push 0xf0019
push 0
push 0x4093a8
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExW
test eax, eax
je 0x40929d
lea eax, [ebp - 0xc]
push eax
push 0xf0019
push 0
push 0x4093dc
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExW
test eax, eax
je 0x40929d
lea eax, [ebp - 0xc]
push eax
push 0xf0019
push 0
push 0x409410
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExW
test eax, eax
jne 0x409383
xor eax, eax
push ebp
push 0x40937c
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x21a]
mov edx, 0x105
call fcn.00408fb8
lea eax, [ebp - 0x10]
push eax
push 0
push 0
push 0
lea eax, [ebp - 0x21a]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegQueryValueExW
test eax, eax
jne 0x40930c
mov eax, dword [ebp - 0x10]
call fcn.004041d4
mov dword [ebp - 8], eax
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 8]
push eax
push 0
push 0
lea eax, [ebp - 0x21a]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegQueryValueExW
mov eax, ebx
mov edx, dword [ebp - 8]
call fcn.00407000
jmp 0x409357
lea eax, [ebp - 0x10]
push eax
push 0
push 0
push 0
push 0x409450
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegQueryValueExW
test eax, eax
jne 0x409357
mov eax, dword [ebp - 0x10]
call fcn.004041d4
mov dword [ebp - 8], eax
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 8]
push eax
push 0
push 0
push 0x409450
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegQueryValueExW
mov eax, ebx
mov edx, dword [ebp - 8]
call fcn.00407000
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x409383
cmp dword [ebp - 8], 0
je 0x409372
mov eax, dword [ebp - 8]
call fcn.004041f0
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegCloseKey
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4093a0
lea eax, [ebp - 4]
call fcn.00406e34
ret
Function at 0x409664
Capabilities:
Identify system language via api

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffdd8
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x228], ebx
mov dword [ebp - 0x224], ebx
mov dword [ebp - 0x220], ebx
mov esi, ecx
mov dword [ebp - 0x21c], edx
mov dword [ebp - 0x218], eax
mov eax, dword [ebp - 0x218]
call fcn.00406e2c
mov eax, dword [ebp - 0x21c]
call fcn.00406e2c
lea edi, [ebp - 0x210]
xor eax, eax
push ebp
push 0x409803
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, esi
xor edx, edx
call fcn.00406e44
xor ebx, ebx
push 0x105
mov eax, dword [ebp - 0x21c]
call fcn.00406ed0
push eax
lea eax, [ebp - 0x20a]
push eax
call sub.kernel32.dll_lstrcpynW
lea eax, [ebp - 0x20a]
push eax
call sub.kernel32.dll_lstrlenW
add eax, eax
lea edx, [ebp - 0x20a]
add eax, edx
sub eax, 2
mov dword [edi], eax
jmp 0x409704
sub dword [edi], 2
mov eax, dword [edi]
cmp word [eax], 0x2e
je 0x409716
lea eax, [ebp - 0x20a]
cmp eax, dword [edi]
jne 0x409701
lea eax, [ebp - 0x20a]
cmp eax, dword [edi]
je 0x4097cf
add dword [edi], 2
mov eax, dword [edi]
mov word [eax], 0
lea eax, [ebp - 0x20a]
mov edx, dword [edi]
sub edx, eax
sar edx, 1
jns 0x40973f
adc edx, 0
mov eax, 0x105
sub eax, edx
mov dword [ebp - 0x214], eax
lea edx, [ebp - 0x220]
mov eax, dword [ebp - 0x218]
call fcn.004091b4
cmp dword [ebp - 0x220], 0
je 0x409777
push ebp
mov eax, dword [ebp - 0x220]
call fcn.00409558
pop ecx
mov ebx, eax
jmp 0x4097cf
push ebp
call sub.kernel32.dll_GetUserDefaultUILanguage
lea edx, [ebp - 0x224]
call fcn.00408d90
mov eax, dword [ebp - 0x224]
call fcn.00409558
pop ecx
mov ebx, eax
test bl, bl
jne 0x4097c2
cmp byte [0x4e1b54], 0
jne 0x4097c2
push ebp
call sub.kernel32.dll_GetSystemDefaultUILanguage
lea edx, [ebp - 0x228]
call fcn.00408d90
mov eax, dword [ebp - 0x228]
call fcn.00409558
pop ecx
mov ebx, eax
test bl, bl
jne 0x4097cf
push ebp
call fcn.00409608
pop ecx
mov ebx, eax
test bl, bl
je 0x4097e5
mov eax, esi
lea edx, [ebp - 0x20a]
mov ecx, 0x105
call fcn.0040703c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40980a
lea eax, [ebp - 0x228]
mov edx, 5
call fcn.00406e3c
ret

Function at 0x409f7c
Capabilities:
Get system information on windows

Disassembly:
add esp, 0xffffffdc
push esp
call sub.kernel32.dll_GetSystemInfo
mov eax, dword [esp + 0x14]
add esp, 0x24
ret
Function at 0x40d02c
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
mov esi, 0x4e1c4c
push 0xa
push 0x40d0c0
mov eax, dword [0x4e1c3c]
push eax
call sub.kernel32.dll_FindResourceW
mov ebx, eax
test ebx, ebx
jne 0x40d050
call fcn.004198a8
push ebx
mov eax, dword [0x4e1c3c]
push eax
call sub.kernel32.dll_LoadResource
mov ebx, eax
test ebx, ebx
jne 0x40d067
call fcn.004198a8
push ebx
call sub.kernel32.dll_LockResource
mov dword [esi], eax
cmp dword [esi], 0
jne 0x40d079
call fcn.004198a8
mov eax, dword [esi]
mov edx, dword [esi]
mov ecx, edx
add ecx, dword [eax]
mov dword [0x4e1c50], ecx
mov ecx, edx
add ecx, dword [eax + 4]
mov dword [0x4e1c54], ecx
mov ecx, edx
add ecx, dword [eax + 8]
mov dword [0x4e1c58], ecx
mov ecx, edx
add ecx, dword [eax + 0xc]
mov dword [0x4e1c5c], ecx
mov ecx, edx
add ecx, dword [eax + 0x10]
mov dword [0x4e1c60], ecx
add edx, dword [eax + 0x14]
mov dword [0x4e1c64], edx
pop esi
pop ebx
ret

Function at 0x411e64
Capabilities:
Encrypt data using rc4 prga

Disassembly:
cmp eax, edx
je 0x411f0d
test eax, edx
je 0x411f10
push 0
push 0
cmp word [eax - 0xa], 2
je 0x411e8d
push edx
mov edx, eax
mov eax, esp
call fcn.00407058
pop edx
mov eax, dword [esp]
cmp word [edx - 0xa], 2
je 0x411ea3
push eax
lea eax, [esp + 8]
call fcn.00407058
pop eax
mov edx, dword [esp + 4]
movzx ecx, word [edx]
cmp cx, word [eax]
je 0x411eb2
movzx eax, word [eax]
sub eax, ecx
jmp 0x411ed9
push ebx
mov ebx, dword [eax - 4]
xor ecx, ecx
sub ebx, dword [edx - 4]
push ebx
adc ecx, 0xffffffff
and ecx, ebx
sub ecx, dword [eax - 4]
shl ecx, 1
sub eax, ecx
sub edx, ecx
mov ebx, dword [ecx + eax]
xor ebx, dword [ecx + edx]
jne 0x411ef3
add ecx, 4
js 0x411eca
pop eax
pop ebx
mov ecx, esp
mov edx, dword [ecx]
or edx, dword [ecx + 4]
je 0x411ef0
push eax
mov eax, ecx
mov edx, 2
call fcn.00406094
pop eax
pop edx
pop edx
ret
bsf ebx, ebx
shr ebx, 4
add ebx, ebx
add ecx, ebx
jns 0x411ed7
movzx eax, word [ecx + eax]
movzx edx, word [ecx + edx]
sub eax, edx
pop ebx
pop ebx
jmp 0x411ed9
xor eax, eax
ret
test eax, eax
je 0x411f20
test edx, edx
jne 0x411e74
mov eax, dword [eax - 4]
ret
sub eax, dword [edx - 4]
ret

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

Disassembly:
push ebx
push esi
mov esi, eax
mov eax, esi
call fcn.00406ed0
push eax
call sub.kernel32.dll_GetFileAttributesW
cmp eax, 0xffffffff
je 0x4131ea
test al, 0x10
sete al
pop esi
pop ebx
ret
call sub.kernel32.dll_GetLastError_1
mov ebx, eax
cmp ebx, 2
je 0x41320b
cmp ebx, 3
je 0x41320b
cmp ebx, 0x7b
je 0x41320b
mov eax, esi
call fcn.0041318c
test al, al
jne 0x41320f
xor eax, eax
jmp 0x413211
mov al, 1
pop esi
pop ebx
ret

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

Disassembly:
push ebx
mov ebx, eax
mov eax, ebx
call fcn.00406ed0
push eax
call sub.kernel32.dll_GetFileAttributesW
cmp eax, 0xffffffff
je 0x41322d
test al, 0x10
jne 0x413231
xor eax, eax
pop ebx
ret
mov al, 1
pop ebx
ret