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

Disassembly:
push ecx
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0xc]
lea eax, [esp]
push 0
push eax
mov eax, dword [esp + 0x10]
push ecx
push edx
push eax
mov dword [esp + 0x14], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp]
pop ecx
ret

Function at 0x45e720
Capabilities:
Get file size

Disassembly:
mov eax, dword [esp + 4]
push ebx
push 0
lea ecx, [esp + 0xc]
push eax
push ecx
xor bl, bl
call fcn.0045e650
add esp, 0xc
test al, al
je 0x45e75d
mov edx, dword [esp + 8]
push 0
push edx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 8]
push edx
mov bl, 1
mov dword [ecx], eax
call fcn.0045e700
add esp, 4
mov al, bl
pop ebx
ret

Function at 0x45e770
Capabilities:
Persist via run registry key
Query or enumerate registry value

Disassembly:
sub esp, 0x40c
lea eax, [esp]
inc esp
and al, 0
push esi
push eax
push 1
push 0
push str.SoftwareMicrosoftWindowsCurrentVersionExplorerShell_Folders
push 0x80000001
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], 0x400
mov dword [esp + 0x20], 2
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov esi, eax
test esi, esi
jne 0x45e7f0
lea ecx, [esp + 8]
lea edx, [esp + 0x10]
push ecx
mov ecx, dword [esp + 8]
lea eax, [esp + 0x10]
push edx
push eax
push esi
push 0x4a8040
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov esi, eax
test esi, esi
jne 0x45e7e5
mov ecx, dword [esp + 0x414]
lea edx, [esp + 0x10]
push edx
call fcn.00414080
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
test esi, esi
sete al
pop esi
add esp, 0x40c
ret
Function at 0x4603e0
Capabilities:
Check os version

Disassembly:
sub esp, 0x94
push ebx
push ebp
push esi
mov esi, dword [esp + 0xa4]
push edi
mov ecx, 0x216
xor eax, eax
mov edi, esi
rep stosd dword es:[edi], eax
mov ecx, esi
call fcn.004070e0
mov ecx, 0x25
xor eax, eax
lea edi, [esp + 0x10]
lea ebp, [esi + 0x84c]
rep stosd dword es:[edi], eax
lea ebx, [esi + 0x850]
lea eax, [esp + 0x10]
push eax
mov dword [ebp], 0
mov dword [ebx], 0
mov byte [esi + 0x848], 0
mov byte [esi + 0x854], 0
mov dword [esp + 0x14], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [esp + 0x14], 5
jbe 0x460469
push str.OS_greater_than_5_detected._Font_chaining_not_needed_n
call fcn.00406d50
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x94
ret
push str.Attempting_to_load_MLang._n
call fcn.00406d50
add esp, 4
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
test eax, eax
jl 0x4604f8
push ebp
push 0x4a09d0
push 3
push 0
push 0x4a09c0
mov byte [esi + 0x854], 1
call dword [sym.imp.ole32.dll_CoCreateInstance]
mov ebp, dword [ebp]
test ebp, ebp
jne 0x4604bd
push 0x4a8260
call fcn.00406d50
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x94
ret
mov ecx, dword [ebp]
push ebx
push 0x4a8250
push ebp
call dword [ecx]
cmp dword [ebx], 0
jne 0x4604e6
push str.iMLangFontLink_query_failed_n
call fcn.00406d50
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x94
ret
mov byte [esi + 0x848], 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x94
ret
push str.MLang_failed___CoInitialise_error____n
call fcn.00406d50
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x94
ret
Function at 0x463840
Capabilities:
Link many functions at runtime

Disassembly:
mov eax, dword [0x4b05c4]
sub esp, 0x190
cmp eax, 1
push esi
jne 0x463859
pop esi
add esp, 0x190
ret
cmp eax, 2
je 0x4639a8
push str.WSOCK32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
test esi, esi
je 0x46399e
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.WSACleanup
push esi
call edi
push str.WSAStartup
push esi
mov dword [0x4b0580], eax
call edi
push str.listen
push esi
mov dword [0x4b0584], eax
call edi
push str.closesocket
push esi
mov dword [0x4b0588], eax
call edi
push str.bind
push esi
mov dword [0x4b058c], eax
call edi
push str.htons
push esi
mov dword [0x4b0590], eax
call edi
push str.htonl
push esi
mov dword [0x4b0594], eax
call edi
push str.socket
push esi
mov dword [0x4b0598], eax
call edi
push str.WSAAsyncSelect
push esi
mov dword [0x4b059c], eax
call edi
push str.accept
push esi
mov dword [0x4b05a0], eax
call edi
push str.WSAGetLastError
push esi
mov dword [0x4b05a4], eax
call edi
push str.WSAAsyncGetHostByName
push esi
mov dword [0x4b05a8], eax
call edi
push str.inet_addr
push esi
mov dword [0x4b05ac], eax
call edi
push str.connect
push esi
mov dword [0x4b05b0], eax
call edi
push str.send
push esi
mov dword [0x4b05b4], eax
call edi
push str.recv
push esi
mov dword [0x4b05b8], eax
call edi
push str.WSACancelAsyncRequest
push esi
mov dword [0x4b05bc], eax
call edi
mov dword [0x4b05c0], eax
lea eax, [esp + 8]
push eax
push 0x101
call dword [0x4b0584]
test eax, eax
pop edi
jne 0x46399e
mov ax, word [esp + 4]
cmp al, 1
jne 0x463998
xor ecx, ecx
mov cl, ah
cmp cl, al
jne 0x463998
mov dword [0x4b05c4], 1
mov eax, 1
pop esi
add esp, 0x190
ret
call dword [0x4b0580]
mov dword [0x4b05c4], 2
xor eax, eax
pop esi
add esp, 0x190
ret
Function at 0x465c10
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
sub esp, 0x120
push ebx
push esi
push edi
mov edi, dword [esp + 0x13c]
test edi, edi
jne 0x465cda
mov eax, dword [esp + 0x138]
mov edi, dword [esp + 0x130]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenA]
mov dword [esp + 0xc], 0x114
test eax, eax
mov byte [esp + 0x18], 0
je 0x465cad
lea eax, [esp + 0x14]
push eax
push 1
push 0
push edi
push 0x80000000
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x465cad
lea ecx, [esp + 0xc]
lea edx, [esp + 0x18]
push ecx
lea eax, [esp + 0x14]
push edx
push eax
push 0
push edi
push 0x80000000
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea ecx, [esp + 0x18]
push ecx
call ebx
test eax, eax
je 0x465c99
cmp dword [esp + 0x10], 1
jne 0x465c99
xor esi, esi
jmp 0x465c9e
mov esi, 1
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
je 0x465ccb
mov esi, dword [esp + 0x134]
push esi
call ebx
push eax
push esi
push 1
push edi
push 0x80000000
call dword [sym.imp.ADVAPI32.dll_RegSetValueA]
test eax, eax
jne 0x465d3b
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x120
ret
mov ecx, dword [esp + 0x130]
lea eax, [esp + 0xc]
push eax
push ecx
push 0x80000000
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne 0x465d3b
mov esi, dword [esp + 0x134]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edx, dword [esp + 0xc]
inc eax
push eax
push esi
push 1
push 0
push edi
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov esi, eax
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
jne 0x465d3b
test esi, esi
jne 0x465d3b
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x120
ret
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x120
ret
Function at 0x404a7c
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffdf4
mov ebx, edx
mov esi, eax
mov eax, ebx
call fcn.00406610
test esi, esi
jne 0x404ab2
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.0040677c
jmp 0x404ad0
call sub.kernel32.dll_GetCommandLineW
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.00404960
mov edi, eax
test esi, esi
je 0x404ad0
cmp dword [ebx], 0
je 0x404ad0
dec esi
jmp 0x404ab9
add esp, 0x20c
pop edi
pop esi
pop ebx
ret

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

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

Function at 0x405578
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffff4
mov edi, edx
mov esi, eax
mov ebp, dword [esi + 0x10]
mov eax, esi
call fcn.00405828
mov byte [esp], al
cmp byte [esp], 0
jne 0x405704
test edi, edi
je 0x405704
mov byte [esp + 1], 0
test ebp, ebp
jle 0x40563b
call sub.kernel32.dll_GetTickCount
mov dword [esp + 4], eax
test ebp, ebp
jle 0x405616
cmp edi, 0xffffffff
je 0x4055d7
call sub.kernel32.dll_GetTickCount
sub eax, dword [esp + 4]
cmp edi, eax
ja 0x4055d7
mov byte [esp], 0
jmp 0x405704
mov ebx, dword [esi]
cmp ebx, 1
jg 0x405616
test ebx, ebx
jne 0x40560c
mov eax, esi
xor ecx, ecx
mov edx, 1
call fcn.004026dc
test eax, eax
jne 0x40560c
call sub.kernel32.dll_GetCurrentThreadId
mov dword [esi + 8], eax
mov dword [esi + 4], 1
mov byte [esp], 1
jmp 0x405704
call 0x40586c
dec ebp
test ebp, ebp
jg 0x4055bc
cmp edi, 0xffffffff
je 0x40563b
call sub.kernel32.dll_GetTickCount
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
sub eax, dword [esp + 4]
cmp edi, eax
ja 0x405639
mov byte [esp], 0
jmp 0x405704
sub edi, eax
mov ebx, dword [esi]
test ebx, ebx
je 0x405586
lea edx, [ebx + 2]
mov eax, esi
mov ecx, ebx
call fcn.004026dc
cmp ebx, eax
jne 0x40563b
call sub.kernel32.dll_GetTickCount
mov dword [esp + 4], eax
mov eax, esi
call fcn.00405774
mov edx, eax
mov ebx, dword [0x5de8f4]
mov ecx, edi
xor eax, eax
call dword [ebx + 0x10]
test eax, eax
sete byte [esp]
cmp edi, 0xffffffff
je 0x4056a2
call sub.kernel32.dll_GetTickCount
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
sub eax, dword [esp + 4]
cmp edi, eax
jbe 0x4056a0
mov eax, dword [esp + 8]
sub eax, dword [esp + 4]
sub edi, eax
jmp 0x4056a2
xor edi, edi
cmp byte [esp], 0
je 0x4056cb
mov ebx, dword [esi]
test bl, 1
jne 0x4056e4
mov edx, ebx
sub edx, 2
or edx, 1
mov eax, esi
mov ecx, ebx
call fcn.004026dc
cmp ebx, eax
jne 0x4056a8
mov byte [esp + 1], 1
jmp 0x4056e4
mov ebx, dword [esi]
mov edx, ebx
sub edx, 2
mov eax, esi
mov ecx, ebx
call fcn.004026dc
cmp ebx, eax
jne 0x4056cb
mov byte [esp + 1], 1
cmp byte [esp + 1], 0
je 0x405655
cmp byte [esp], 0
je 0x405704
call sub.kernel32.dll_GetCurrentThreadId
mov dword [esi + 8], eax
mov dword [esi + 4], 1
movzx eax, byte [esp]
add esp, 0xc
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x40626c
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x5de054], 0
je 0x4062d3
cmp word [0x5de340], 0xd7b2
jne 0x406295
cmp dword [0x5de348], 0
jbe 0x406295
mov eax, 0x5de33c
call dword [0x5de358]
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
mov eax, 0x406300
call fcn.00406f64
push eax
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x5d8032], 0
jne 0x4062ef
push 0
push 0x5d89c2
push str.Runtime_error_____at_00000000
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret

Function at 0x4064cc
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov edi, dword [ebp + 0x10]
cmp dword [0x5d8034], 0
je 0x4064f7
mov edx, edi
mov eax, esi
call dword [0x5d8034]
mov ebx, eax
jmp 0x406508
mov eax, 8
call fcn.0040464c
mov ebx, eax
mov dword [ebx], esi
mov dword [ebx + 4], edi
mov byte [0x5de055], 1
mov eax, dword [ebp + 8]
push eax
mov eax, dword [ebp + 0xc]
push eax
push ebx
mov eax, 0x406494
push eax
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_CreateThread
mov esi, eax
test esi, esi
jne 0x40653d
mov edx, 8
mov eax, ebx
call fcn.00404668
mov eax, esi
pop edi
pop esi
pop ebx
pop ecx
pop ecx
pop ebp
ret 0xc
Function at 0x408a90
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffe98
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x160], ecx
mov dword [ebp - 0x164], ecx
mov dword [ebp - 0x168], ecx
mov dword [ebp - 4], edx
mov esi, eax
xor eax, eax
push ebp
push 0x408bf5
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
call fcn.00406610
cmp si, word [0x5d8a00]
jb 0x408b28
cmp si, word [0x5d8c00]
ja 0x408b28
mov edi, 0x40
xor eax, eax
mov dword [ebp - 8], eax
cmp edi, dword [ebp - 8]
jb 0x408b28
mov ebx, edi
add ebx, dword [ebp - 8]
shr ebx, 1
cmp si, word [ebx*8 + 0x5d8a00]
jae 0x408b02
mov edi, ebx
dec edi
jmp 0x408b23
cmp si, word [ebx*8 + 0x5d8a00]
jbe 0x408b12
inc ebx
mov dword [ebp - 8], ebx
jmp 0x408b23
mov edx, dword [ebp - 4]
mov eax, dword [ebx*8 + 0x5d8a04]
call fcn.004089a0
jmp 0x408b28
cmp edi, dword [ebp - 8]
jae 0x408aec
mov eax, dword [ebp - 4]
cmp dword [eax], 0
jne 0x408bd7
push 2
movzx eax, si
push eax
call sub.kernel32.dll_IsValidLocale
test eax, eax
je 0x408bd7
push 0x55
lea eax, [ebp - 0xb2]
push eax
push 0x59
movzx ebx, si
push ebx
call sub.kernel32.dll_GetLocaleInfoW
push 0x55
lea eax, [ebp - 0x15c]
push eax
push 0x5a
push ebx
call sub.kernel32.dll_GetLocaleInfoW
lea eax, [ebp - 0x160]
lea edx, [ebp - 0xb2]
mov ecx, 0x55
call fcn.004072c0
push dword [ebp - 0x160]
push 0x408c10
lea eax, [ebp - 0x164]
lea edx, [ebp - 0x15c]
mov ecx, 0x55
call fcn.004072c0
push dword [ebp - 0x164]
push 0x408c20
lea eax, [ebp - 0x168]
lea edx, [ebp - 0xb2]
mov ecx, 0x55
call fcn.004072c0
push dword [ebp - 0x168]
mov eax, dword [ebp - 4]
mov edx, 5
call fcn.0040748c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x408bfc
lea eax, [ebp - 0x168]
mov edx, 3
call fcn.00406670
ret
Function at 0x408da8
Capabilities:
Identify system language via api

Disassembly:
push ebp
mov ebp, esp
push 0
push ebx
push esi
mov esi, edx
mov ebx, eax
xor eax, eax
push ebp
push 0x408eab
push dword fs:[eax]
mov dword fs:[eax], esp
push 0x5e0b84
call sub.kernel32.dll_EnterCriticalSection
cmp bx, word [0x5e0b9c]
jne 0x408df4
mov eax, esi
mov edx, 0x5e0b9e
mov ecx, 0x55
call fcn.004072c0
push 0x5e0b84
call sub.kernel32.dll_LeaveCriticalSection
jmp 0x408e95
push 0x5e0b84
call sub.kernel32.dll_LeaveCriticalSection
mov eax, esi
call fcn.00406610
push 2
movzx eax, bx
push eax
call sub.kernel32.dll_IsValidLocale
test eax, eax
je 0x408e63
cmp byte [0x5e0b80], 0
je 0x408e28
mov edx, esi
mov eax, ebx
call fcn.00408c8c
jmp 0x408e63
mov edx, esi
mov eax, ebx
call fcn.00408a90
call sub.kernel32.dll_GetSystemDefaultUILanguage
cmp bx, ax
je 0x408e63
cmp dword [esi], 0
je 0x408e4c
mov eax, esi
mov edx, 0x408ec4
call fcn.004073ac
call sub.kernel32.dll_GetSystemDefaultUILanguage
lea edx, [ebp - 4]
call fcn.00408a90
mov edx, dword [ebp - 4]
mov eax, esi
call fcn.004073ac
push 0x5e0b84
call sub.kernel32.dll_EnterCriticalSection
mov word [0x5e0b9c], bx
push 0xaa
mov eax, dword [esi]
call fcn.00407214
push eax
push 0x5e0b9e
call sub.kernel32.dll_lstrcpynW
push 0x5e0b84
call sub.kernel32.dll_LeaveCriticalSection
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x408eb2
lea eax, [ebp - 4]
call fcn.00406610
ret
Function at 0x40d060
Capabilities:
Get common file path
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff3e0
push ebx
push esi
push edi
mov dword [ebp - 4], edx
mov edi, eax
push 0
push 0x80
push 4
push 0
push 0
push 0xc0000000
push 0x5e3e24
call sub.kernel32.dll_CreateFileA
mov esi, eax
cmp esi, 0xffffffff
jne 0x40d11a
lea eax, [ebp - 0xc10]
push eax
push 0
push 0
push 0x8005
push 0
call sub.SHFolder.dll_SHGetFolderPathA
test eax, eax
jne 0x40d11a
lea eax, [ebp - 0xc10]
call fcn.0040bf30
mov ebx, eax
test ebx, ebx
je 0x40d0ce
cmp byte [ebp + ebx - 0xc11], 0x5c
je 0x40d0d7
mov byte [ebp + ebx - 0xc10], 0x5c
inc ebx
lea ecx, [ebp - 0xc]
lea edx, [ebp - 0x10]
mov eax, 0x5e3e24
call fcn.0040d040
mov ecx, dword [ebp - 0xc]
inc ecx
lea edx, [ebp + ebx - 0xc10]
mov eax, dword [ebp - 0x10]
call fcn.00404860
push 0
push 0x80
push 4
push 0
push 0
push 0xc0000000
lea eax, [ebp - 0xc10]
push eax
call sub.kernel32.dll_CreateFileA
mov esi, eax
cmp esi, 0xffffffff
je 0x40d24e
push 2
push 0
push 0
push esi
call sub.kernel32.dll_SetFilePointer
lea edx, [ebp - 0x410]
mov eax, 0x40d258
mov ecx, 2
call fcn.0040c290
mov ebx, eax
mov eax, 0x40d25c
mov ecx, 0x20
mov edx, ebx
call fcn.0040c290
mov ebx, eax
lea eax, [ebp - 0xc20]
push eax
call sub.kernel32.dll_GetLocalTime
movzx eax, word [ebp - 0xc20]
mov edx, ebx
call fcn.0040c1d0
mov ebx, eax
mov byte [ebx], 0x2f
inc ebx
movzx eax, word [ebp - 0xc1e]
mov edx, ebx
call fcn.0040c1d0
mov ebx, eax
mov byte [ebx], 0x2f
inc ebx
movzx eax, word [ebp - 0xc1a]
mov edx, ebx
call fcn.0040c1d0
mov ebx, eax
mov byte [ebx], 0x20
inc ebx
movzx eax, word [ebp - 0xc18]
mov edx, ebx
call fcn.0040c1d0
mov ebx, eax
mov byte [ebx], 0x3a
inc ebx
cmp word [ebp - 0xc16], 0xa
jae 0x40d1c3
mov byte [ebx], 0x30
inc ebx
movzx eax, word [ebp - 0xc16]
mov edx, ebx
call fcn.0040c1d0
mov ebx, eax
mov byte [ebx], 0x3a
inc ebx
cmp word [ebp - 0xc14], 0xa
jae 0x40d1e5
mov byte [ebx], 0x30
inc ebx
movzx eax, word [ebp - 0xc14]
mov edx, ebx
call fcn.0040c1d0
mov ebx, eax
mov eax, 0x40d25c
mov ecx, 0x20
mov edx, ebx
call fcn.0040c290
mov ebx, eax
mov eax, 0x40d258
mov ecx, 2
mov edx, ebx
call fcn.0040c290
mov ebx, eax
push 0
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x410]
sub ebx, eax
push ebx
lea eax, [ebp - 0x410]
push eax
push esi
call sub.kernel32.dll_WriteFile_1
push 0
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 4]
push eax
push edi
push esi
call sub.kernel32.dll_WriteFile_1
push esi
call sub.kernel32.dll_CloseHandle_1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40d2a0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff7f8
push ebx
mov eax, 0x5e3e24
call fcn.0040bf60
mov ebx, eax
test ebx, ebx
jbe 0x40d342
mov eax, dword [0x5d9404]
call fcn.0040bf30
mov ecx, eax
inc ecx
lea edx, [ebx + 0x5e3e20]
mov eax, dword [0x5d9404]
call fcn.00404860
push 0x3ff
lea eax, [ebp - 0x808]
push eax
push 0x40d348
call sub.kernel32.dll_GetEnvironmentVariableA
mov ebx, eax
test ebx, ebx
jbe 0x40d342
cmp byte [ebp + ebx - 0x809], 0x5c
je 0x40d30a
mov byte [ebp + ebx - 0x808], 0x5c
inc ebx
lea ecx, [ebp - 8]
lea edx, [ebp - 4]
mov eax, 0x5e3e24
call fcn.0040d040
mov ecx, dword [ebp - 8]
inc ecx
lea edx, [ebp + ebx - 0x808]
mov eax, dword [ebp - 4]
call fcn.00404860
mov edx, 0x5e3e24
lea eax, [ebp - 0x808]
mov ecx, 0x3ff
call fcn.00404860
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x41cb10
Capabilities:
Encrypt data using rc4 prga

Disassembly:
cmp eax, edx
je 0x41cb69
test eax, edx
je 0x41cb6c
movzx ecx, word [edx]
cmp cx, word [eax]
je 0x41cb27
movzx eax, word [eax]
sub eax, ecx
jmp 0x41cb4e
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 0x41cb4f
add ecx, 4
js 0x41cb3f
pop eax
pop ebx
ret
bsf ebx, ebx
shr ebx, 4
add ebx, ebx
add ecx, ebx
jns 0x41cb4c
movzx eax, word [ecx + eax]
movzx edx, word [ecx + edx]
sub eax, edx
pop ebx
pop ebx
jmp 0x41cb4e
xor eax, eax
ret
test eax, eax
je 0x41cb78
test edx, edx
jne 0x41cb18
mov eax, dword [eax - 4]
ret
sub eax, dword [edx - 4]
ret

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

Disassembly:
push ebx
push esi
push edi
mov ebx, edx
mov esi, eax
mov eax, esi
call fcn.00407214
mov edi, eax
push edi
call sub.kernel32.dll_GetFileAttributesW
cmp eax, 0xffffffff
je 0x41d942
test ah, 4
je 0x41d93b
test bl, bl
jne 0x41d900
mov al, 1
jmp 0x41d969
test al, 0x10
je 0x41d908
xor eax, eax
jmp 0x41d969
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push edi
call sub.kernel32.dll_CreateFileW
cmp eax, 0xffffffff
je 0x41d92c
push eax
call sub.kernel32.dll_CloseHandle_1
mov al, 1
jmp 0x41d969
call sub.kernel32.dll_GetLastError_2
mov ebx, eax
cmp ebx, 0x20
sete al
jmp 0x41d969
test al, 0x10
sete al
jmp 0x41d969
call sub.kernel32.dll_GetLastError_2
mov ebx, eax
cmp ebx, 2
je 0x41d963
cmp ebx, 3
je 0x41d963
cmp ebx, 0x7b
je 0x41d963
mov eax, esi
call fcn.0041d898
test al, al
jne 0x41d967
xor eax, eax
jmp 0x41d969
mov al, 1
pop edi
pop esi
pop ebx
ret
Function at 0x41d970
Capabilities:
Check if file exists
Delete directory
Delete file
Get file attributes

Disassembly:
push ebx
push esi
push edi
push ebp
mov esi, eax
mov eax, esi
call fcn.00407214
mov ebp, eax
push ebp
call sub.kernel32.dll_DeleteFileW
cmp eax, 1
sbb ebx, ebx
inc ebx
test bl, bl
jne 0x41d9c5
call sub.kernel32.dll_GetLastError_2
mov edi, eax
push ebp
call sub.kernel32.dll_GetFileAttributesW
cmp eax, 0xffffffff
je 0x41d9bf
test ah, 4
je 0x41d9bf
test al, 0x10
je 0x41d9bf
mov eax, esi
call fcn.00407214
push eax
call sub.kernel32.dll_RemoveDirectoryW
cmp eax, 1
sbb ebx, ebx
inc ebx
jmp 0x41d9c5
push edi
call sub.kernel32.dll_SetLastError
mov eax, ebx
pop ebp
pop edi
pop esi
pop ebx
ret

Function at 0x421ce0
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffe00
push ebx
push esi
mov esi, ecx
mov ebx, dword [ebp + 8]
push pe_nt_image_headers32
lea ecx, [ebp - 0x200]
push ecx
push edx
push eax
call sub.kernel32.dll_GetLocaleInfoW_1
test eax, eax
jle 0x421d19
mov ecx, eax
dec ecx
lea edx, [ebp - 0x200]
mov eax, ebx
call fcn.0040677c
jmp 0x421d22
mov eax, ebx
mov edx, esi
call fcn.004069d4
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x421d2c
Capabilities:
Get geographical location

Disassembly:
push ebx
push esi
push edi
push ecx
mov edi, ecx
mov esi, edx
mov ebx, eax
push 2
lea eax, [esp + 4]
push eax
push esi
push ebx
call sub.kernel32.dll_GetLocaleInfoW_1
test eax, eax
jle 0x421d4e
movzx eax, word [esp]
jmp 0x421d50
mov eax, edi
pop edx
pop edi
pop esi
pop ebx
ret

Function at 0x422a14
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff778
push ebx
push esi
xor ecx, ecx
mov dword [ebp - 4], ecx
xor ecx, ecx
push ebp
push 0x422b39
push dword fs:[ecx]
mov dword fs:[ecx], esp
push 0x400
lea ecx, [ebp - 0x888]
call fcn.0042281c
mov esi, eax
mov eax, dword [0x5dd2b4]
cmp byte [eax], 0
je 0x422ae1
mov eax, dword [0x5dccc4]
call fcn.00404c54
call fcn.00404810
push 0
push 0
push 0
push 0
push esi
lea eax, [ebp - 0x888]
push eax
push 0
push 1
call sub.kernel32.dll_WideCharToMultiByte_1
mov ebx, eax
push ebx
lea eax, [ebp - 4]
mov ecx, 1
mov edx, dword [0x4229e4]
call fcn.00408510
add esp, 4
push 0
push 0
push ebx
mov eax, dword [ebp - 4]
push eax
push esi
lea eax, [ebp - 0x888]
push eax
push 0
push 1
call sub.kernel32.dll_WideCharToMultiByte_1
push 0
lea eax, [ebp - 8]
push eax
push ebx
mov eax, dword [ebp - 4]
push eax
push 0xfffffffffffffff4
call sub.kernel32.dll_GetStdHandle_1
push eax
call sub.kernel32.dll_WriteFile_1
push 0
lea eax, [ebp - 8]
push eax
push 2
push 0x422b54
push 0xfffffffffffffff4
call sub.kernel32.dll_GetStdHandle_1
push eax
call sub.kernel32.dll_WriteFile_1
jmp 0x422b1d
push 0x40
lea eax, [ebp - 0x88]
push eax
mov eax, dword [0x5dcc1c]
mov eax, dword [eax + 4]
push eax
mov eax, dword [0x5e0c4c]
call fcn.004085d4
push eax
call sub.user32.dll_LoadStringW_1
push 0x2010
lea eax, [ebp - 0x88]
push eax
lea eax, [ebp - 0x888]
push eax
push 0
call sub.user32.dll_MessageBoxW
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x422b40
lea eax, [ebp - 4]
mov edx, dword [0x4229e4]
call fcn.0040851c
ret