joyce8/EMBER2024-capa huggingface dataset:
Function at 0x49d7b0
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push esi
mov esi, edx
test esi, esi
not eax
je 0x49d7e2
lea esp, [esp]
test cl, 3
je 0x49d7e2
movzx edx, byte [ecx]
xor edx, eax
and edx, 0xff
shr eax, 8
xor eax, dword [edx*4 + 0x4d0b40]
add ecx, 1
sub esi, 1
jne 0x49d7c0
cmp esi, 0x20
push ebx
push edi
jb 0x49d9cc
mov edi, esi
shr edi, 5
xor eax, dword [ecx]
add ecx, 4
mov edx, eax
shr edx, 0x10
movzx ebx, ah
and edx, 0xff
mov edx, dword [edx*4 + 0x4d0f40]
xor edx, dword [ebx*4 + 0x4d1340]
mov ebx, eax
and eax, 0xff
shr ebx, 0x18
xor edx, dword [ebx*4 + 0x4d0b40]
add ecx, 4
xor edx, dword [eax*4 + 0x4d1740]
add ecx, 4
xor edx, dword [ecx - 8]
add ecx, 4
mov eax, edx
shr eax, 0x10
and eax, 0xff
mov eax, dword [eax*4 + 0x4d0f40]
movzx ebx, dh
xor eax, dword [ebx*4 + 0x4d1340]
mov ebx, edx
and edx, 0xff
shr ebx, 0x18
xor eax, dword [ebx*4 + 0x4d0b40]
add ecx, 4
xor eax, dword [edx*4 + 0x4d1740]
add ecx, 4
xor eax, dword [ecx - 0x10]
mov edx, eax
shr edx, 0x10
movzx ebx, ah
and edx, 0xff
mov edx, dword [edx*4 + 0x4d0f40]
xor edx, dword [ebx*4 + 0x4d1340]
mov ebx, eax
and eax, 0xff
shr ebx, 0x18
xor edx, dword [ebx*4 + 0x4d0b40]
xor edx, dword [eax*4 + 0x4d1740]
xor edx, dword [ecx - 0xc]
mov eax, edx
shr eax, 0x10
and eax, 0xff
mov eax, dword [eax*4 + 0x4d0f40]
movzx ebx, dh
xor eax, dword [ebx*4 + 0x4d1340]
mov ebx, edx
and edx, 0xff
shr ebx, 0x18
xor eax, dword [ebx*4 + 0x4d0b40]
xor eax, dword [edx*4 + 0x4d1740]
xor eax, dword [ecx - 8]
mov edx, eax
shr edx, 0x10
movzx ebx, ah
and edx, 0xff
mov edx, dword [edx*4 + 0x4d0f40]
xor edx, dword [ebx*4 + 0x4d1340]
mov ebx, eax
and eax, 0xff
shr ebx, 0x18
xor edx, dword [ebx*4 + 0x4d0b40]
xor edx, dword [eax*4 + 0x4d1740]
xor edx, dword [ecx - 4]
mov eax, edx
shr eax, 0x10
and eax, 0xff
mov eax, dword [eax*4 + 0x4d0f40]
movzx ebx, dh
xor eax, dword [ebx*4 + 0x4d1340]
mov ebx, edx
shr ebx, 0x18
xor eax, dword [ebx*4 + 0x4d0b40]
and edx, 0xff
xor eax, dword [edx*4 + 0x4d1740]
xor eax, dword [ecx]
add ecx, 4
mov edx, eax
shr edx, 0x10
movzx ebx, ah
and edx, 0xff
mov edx, dword [edx*4 + 0x4d0f40]
xor edx, dword [ebx*4 + 0x4d1340]
mov ebx, eax
and eax, 0xff
shr ebx, 0x18
xor edx, dword [ebx*4 + 0x4d0b40]
add ecx, 4
xor edx, dword [eax*4 + 0x4d1740]
sub esi, 0x20
xor edx, dword [ecx - 4]
mov eax, edx
shr eax, 0x10
and eax, 0xff
mov eax, dword [eax*4 + 0x4d0f40]
movzx ebx, dh
xor eax, dword [ebx*4 + 0x4d1340]
mov ebx, edx
shr ebx, 0x18
xor eax, dword [ebx*4 + 0x4d0b40]
and edx, 0xff
xor eax, dword [edx*4 + 0x4d1740]
sub edi, 1
jne 0x49d7f2
cmp esi, 4
jb 0x49da19
mov edx, esi
shr edx, 2
xor eax, dword [ecx]
add ecx, 4
mov edi, eax
shr edi, 0x10
and edi, 0xff
mov edi, dword [edi*4 + 0x4d0f40]
movzx ebx, ah
xor edi, dword [ebx*4 + 0x4d1340]
mov ebx, eax
shr ebx, 0x18
xor edi, dword [ebx*4 + 0x4d0b40]
and eax, 0xff
xor edi, dword [eax*4 + 0x4d1740]
sub esi, 4
sub edx, 1
mov eax, edi
jne 0x49d9d6
test esi, esi
pop edi
pop ebx
je 0x49da3d
nop
movzx edx, byte [ecx]
xor edx, eax
and edx, 0xff
shr eax, 8
xor eax, dword [edx*4 + 0x4d0b40]
add ecx, 1
sub esi, 1
jne 0x49da20
not eax
pop esi
ret
Function at 0x4a0722
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
cmp dword [0x4f7438], 0
push esi
jne 0x4a0695
call fcn.004a05c0
test eax, eax
je 0x4a06d8
mov eax, dword [0x4f7438]
cmp eax, 1
jne 0x4a06b6
push 0xd
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
je 0x4a06d8
pop esi
ret
push eax
call dword [0x4f7440]
test eax, eax
jne 0x4a0720
push 0x40
mov eax, 0x1000
push eax
push eax
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov esi, eax
test esi, esi
jne 0x4a06dc
xor eax, eax
pop esi
ret
mov eax, dword [esi]
push edi
push dword [0x4f7438]
call dword [0x4f7440]
mov edi, eax
test edi, edi
je 0x4a0703
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, edi
jmp 0x4a071f
lea edi, [esi + 0xff0]
push esi
push dword [0x4f7438]
call dword [0x4f743c]
add esi, 0x10
cmp esi, edi
jb 0x4a0709
mov eax, esi
pop edi
pop esi
ret
jmp 0x4a0682

Function at 0x4a1873
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x4f3280]
jne 0x4a187d
repz ret
jmp fcn.004abe10

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

Disassembly:
push esi
xor esi, esi
cmp dword [esp + 8], esi
jne 0x4a8022
call fcn.004a9f18
mov dword [eax], esi
call fcn.004a9f05
push esi
push esi
push esi
push esi
push esi
mov dword [eax], 0x16
call fcn.004a1a79
add esp, 0x14
push 0x16
pop eax
pop esi
ret
test dword [esp + 0xc], 0xfffffff9
jne 0x4a7ffe
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x4a8051
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004a9f2b
pop ecx
call fcn.004a9f05
mov eax, dword [eax]
pop esi
ret
test al, 0x10
jne 0x4a8078
test al, 1
je 0x4a8078
test byte [esp + 0xc], 2
je 0x4a8078
call fcn.004a9f18
mov dword [eax], 5
call fcn.004a9f05
mov dword [eax], 0xd
jmp 0x4a8048
xor eax, eax
pop esi
ret
Function at 0x4a82aa
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov ecx, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
xor edi, edi
cmp dword [ebp + 0x10], edi
mov dword [ebp - 8], ecx
mov dword [ebp - 4], ebx
je 0x4a82e7
cmp dword [ebp + 0x14], edi
je 0x4a82e7
cmp ecx, edi
jne 0x4a82ee
call fcn.004a9f05
push edi
push edi
push edi
push edi
mov dword [eax], 0x16
push edi
call fcn.004a1a79
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
mov esi, dword [ebp + 0x18]
cmp esi, edi
je 0x4a8302
or eax, 0xffffffff
xor edx, edx
div dword [ebp + 0x10]
cmp dword [ebp + 0x14], eax
jbe 0x4a8323
cmp ebx, 0xffffffff
je 0x4a8312
push ebx
push edi
push ecx
call fcn.004a1e50
add esp, 0xc
cmp esi, edi
je 0x4a82cf
or eax, 0xffffffff
xor edx, edx
div dword [ebp + 0x10]
cmp dword [ebp + 0x14], eax
ja 0x4a82cf
mov edi, dword [ebp + 0x10]
imul edi, dword [ebp + 0x14]
test word [esi + 0xc], 0x10c
mov dword [ebp - 0x10], edi
mov ebx, edi
je 0x4a833f
mov eax, dword [esi + 0x18]
mov dword [ebp - 0xc], eax
jmp 0x4a8346
mov dword [ebp - 0xc], 0x1000
test edi, edi
je 0x4a8437
test word [esi + 0xc], 0x10c
je 0x4a839a
mov eax, dword [esi + 4]
test eax, eax
je 0x4a839a
jl 0x4a8498
cmp ebx, eax
mov edi, ebx
jb 0x4a836b
mov edi, eax
cmp edi, dword [ebp - 4]
ja 0x4a843f
push edi
push dword [esi]
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.004a1aad
sub dword [esi + 4], edi
add dword [esi], edi
add dword [ebp - 8], edi
sub ebx, edi
add esp, 0x10
sub dword [ebp - 4], edi
mov edi, dword [ebp - 0x10]
jmp 0x4a842f
cmp ebx, dword [ebp - 0xc]
jb 0x4a8407
cmp dword [ebp - 0xc], 0
je 0x4a83c4
mov ecx, SysReAllocString
xor edx, edx
cmp ebx, ecx
jbe 0x4a83b9
mov eax, ecx
div dword [ebp - 0xc]
mov eax, ecx
jmp 0x4a83c0
mov eax, ebx
div dword [ebp - 0xc]
mov eax, ebx
sub eax, edx
jmp 0x4a83cf
mov eax, SysReAllocString
cmp ebx, eax
ja 0x4a83cf
mov eax, ebx
cmp eax, dword [ebp - 4]
ja 0x4a846b
push eax
push dword [ebp - 8]
push esi
call fcn.004b3d3f
pop ecx
push eax
call fcn.004b5fa5
add esp, 0xc
test eax, eax
je 0x4a84aa
cmp eax, 0xffffffff
je 0x4a8498
add dword [ebp - 8], eax
sub ebx, eax
sub dword [ebp - 4], eax
jmp 0x4a842f
push esi
call fcn.004b58c4
cmp eax, 0xffffffff
pop ecx
je 0x4a849c
cmp dword [ebp - 4], 0
je 0x4a846b
mov ecx, dword [ebp - 8]
inc dword [ebp - 8]
mov byte [ecx], al
mov eax, dword [esi + 0x18]
dec ebx
dec dword [ebp - 4]
mov dword [ebp - 0xc], eax
test ebx, ebx
jne 0x4a834e
mov eax, dword [ebp + 0x14]
jmp 0x4a82e9
xor esi, esi
cmp dword [ebp + 0xc], 0xffffffff
je 0x4a8456
push dword [ebp + 0xc]
push esi
push dword [ebp + 8]
call fcn.004a1e50
add esp, 0xc
call fcn.004a9f05
push esi
push esi
push esi
push esi
mov dword [eax], 0x22
push esi
jmp 0x4a82df
cmp dword [ebp + 0xc], 0xffffffff
je 0x4a8481
push dword [ebp + 0xc]
push 0
push dword [ebp + 8]
call fcn.004a1e50
add esp, 0xc
call fcn.004a9f05
mov dword [eax], 0x22
xor eax, eax
push eax
push eax
push eax
push eax
push eax
jmp 0x4a82df
or dword [esi + 0xc], 0x20
mov eax, edi
sub eax, ebx
xor edx, edx
div dword [ebp + 0x10]
jmp 0x4a82e9
or dword [esi + 0xc], 0x10
jmp 0x4a849c
Function at 0x4aed62
Capabilities:
Write file on windows

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push esi
push edi
xor esi, esi
xor edi, edi
cmp ebx, dword [edi*8 + 0x4f3570]
je 0x4aed7d
inc edi
cmp edi, 0x17
jb 0x4aed6e
cmp edi, 0x17
jae 0x4aeefd
push ebp
push 3
call fcn.004be7ad
cmp eax, 1
pop ecx
je 0x4aeec9
push 3
call fcn.004be7ad
test eax, eax
pop ecx
jne 0x4aedb1
cmp dword [0x4f3270], 1
je 0x4aeec9
cmp ebx, 0xfc
je 0x4aeefc
push 0x4ceb20
mov ebx, 0x314
push ebx
mov ebp, 0x4f7b18
push ebp
call fcn.004a7210
add esp, 0xc
test eax, eax
je 0x4aede7
push esi
push esi
push esi
push esi
push esi
call fcn.004a197d
add esp, 0x14
push 0x104
mov esi, 0x4f7b31
push esi
push 0
mov byte [0x4f7c35], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4aee2b
push 0x4ceb08
push 0x2fb
push esi
call fcn.004a7210
add esp, 0xc
test eax, eax
je 0x4aee2b
xor eax, eax
push eax
push eax
push eax
push eax
push eax
call fcn.004a197d
add esp, 0x14
push esi
call fcn.004a1d20
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x4aee70
push esi
call fcn.004a1d20
sub esi, 0x3b
add eax, esi
push 3
mov ecx, 0x4f7e2c
push 0x4ceb04
sub ecx, eax
push ecx
push eax
call fcn.004a74a6
add esp, 0x14
test eax, eax
je 0x4aee70
xor esi, esi
push esi
push esi
push esi
push esi
push esi
call fcn.004a197d
add esp, 0x14
jmp 0x4aee72
xor esi, esi
push 0x4ceb00
push ebx
push ebp
call fcn.004b75c6
add esp, 0xc
test eax, eax
je 0x4aee92
push esi
push esi
push esi
push esi
push esi
call fcn.004a197d
add esp, 0x14
push dword [edi*8 + 0x4f3574]
push ebx
push ebp
call fcn.004b75c6
add esp, 0xc
test eax, eax
je 0x4aeeb4
push esi
push esi
push esi
push esi
push esi
call fcn.004a197d
add esp, 0x14
push 0x12010
push 0x4cead8
push ebp
call fcn.004be5f0
add esp, 0xc
jmp 0x4aeefc
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ebp, eax
cmp ebp, esi
je 0x4aeefc
cmp ebp, 0xffffffff
je 0x4aeefc
push 0
lea eax, [esp + 0x14]
push eax
lea esi, [edi*8 + 0x4f3574]
push dword [esi]
call fcn.004a1d20
pop ecx
push eax
push dword [esi]
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret
Function at 0x4be5f0
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
call fcn.004ac08a
xor ebx, ebx
cmp dword [0x4f824c], ebx
mov dword [ebp - 8], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
jne 0x4be6c6
push 0x4d00ec
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x4be7a6
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x4d00e0
push edi
call esi
cmp eax, ebx
je 0x4be7a6
push eax
call fcn.004ac01c
mov dword [esp], 0x4d00d0
push edi
mov dword [0x4f824c], eax
call esi
push eax
call fcn.004ac01c
mov dword [esp], 0x4d00bc
push edi
mov dword [0x4f8250], eax
call esi
push eax
call fcn.004ac01c
mov dword [0x4f8254], eax
lea eax, [ebp - 0xc]
push eax
call fcn.004a515d
test eax, eax
pop ecx
pop ecx
je 0x4be694
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.004a197d
add esp, 0x14
cmp dword [ebp - 0xc], 2
jne 0x4be6c6
push 0x4d00a0
push edi
call esi
push eax
call fcn.004ac01c
cmp eax, ebx
pop ecx
mov dword [0x4f825c], eax
je 0x4be6c6
push 0x4d0088
push edi
call esi
push eax
call fcn.004ac01c
pop ecx
mov dword [0x4f8258], eax
mov eax, dword [0x4f8258]
mov ecx, dword [ebp - 8]
cmp eax, ecx
je 0x4be74b
cmp dword [0x4f825c], ecx
je 0x4be74b
push eax
call fcn.004ac093
push dword [0x4f825c]
mov esi, eax
call fcn.004ac093
cmp esi, ebx
pop ecx
pop ecx
mov edi, eax
je 0x4be74b
cmp edi, ebx
je 0x4be74b
call esi
cmp eax, ebx
je 0x4be718
lea ecx, [ebp - 0x14]
push ecx
push 0xc
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x4be718
test byte [ebp - 0x18], 1
jne 0x4be74b
lea eax, [ebp - 0x10]
push eax
call fcn.004a5194
test eax, eax
pop ecx
je 0x4be733
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.004a197d
add esp, 0x14
cmp dword [ebp - 0x10], 4
jb 0x4be742
or dword [ebp + 0x10], 0x200000
jmp 0x4be786
or dword [ebp + 0x10], 0x40000
jmp 0x4be786
mov eax, dword [0x4f8250]
cmp eax, dword [ebp - 8]
je 0x4be786
push eax
call fcn.004ac093
cmp eax, ebx
pop ecx
je 0x4be786
call eax
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x4be786
mov eax, dword [0x4f8254]
cmp eax, dword [ebp - 8]
je 0x4be786
push eax
call fcn.004ac093
cmp eax, ebx
pop ecx
je 0x4be786
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x4f824c]
call fcn.004ac093
cmp eax, ebx
pop ecx
je 0x4be7a6
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x4be7a8
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40329c
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.00405130
test esi, esi
jne 0x4032d4
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.0040526c
jmp 0x4032f2
call sub.kernel32.dll_GetCommandLineW
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.004031e0
mov edi, eax
test esi, esi
je 0x4032f2
cmp dword [ebx], 0
je 0x4032f2
dec esi
jmp 0x4032db
add esp, 0x20c
pop edi
pop esi
pop ebx
ret

Function at 0x4038f8
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [0x41b020]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x403990
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExW
test eax, eax
jne 0x403970
xor eax, eax
push ebp
push 0x403969
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 0x4039c8
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegQueryValueExW
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x403970
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey
ret
movzx eax, word [0x41b020]
and ax, 0xffc0
movzx edx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [0x41b020], ax
mov esp, ebp
pop ebp
ret

Function at 0x404818
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x41c04c], 0
je 0x404879
cmp word [0x41c328], 0xd7b2
jne 0x404841
cmp dword [0x41c330], 0
jbe 0x404841
mov eax, 0x41c324
call dword [0x41c340]
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 0x4048a4
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x41b02c], 0
jne 0x404895
push 0
push str.Error
push str.Runtime_error_____at_00000000
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret
Function at 0x4069f8
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 0x40875c
Capabilities:
Encrypt data using rc4 prga

Disassembly:
cmp eax, edx
je 0x408805
test eax, edx
je 0x408808
push 0
push 0
cmp word [eax - 0xa], 2
je 0x408785
push edx
mov edx, eax
mov eax, esp
call fcn.00405304
pop edx
mov eax, dword [esp]
cmp word [edx - 0xa], 2
je 0x40879b
push eax
lea eax, [esp + 8]
call fcn.00405304
pop eax
mov edx, dword [esp + 4]
movzx ecx, word [edx]
cmp cx, word [eax]
je 0x4087aa
movzx eax, word [eax]
sub eax, ecx
jmp 0x4087d1
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 0x4087eb
add ecx, 4
js 0x4087c2
pop eax
pop ebx
mov ecx, esp
mov edx, dword [ecx]
or edx, dword [ecx + 4]
je 0x4087e8
push eax
mov eax, ecx
mov edx, 2
call fcn.00404a10
pop eax
pop edx
pop edx
ret
bsf ebx, ebx
shr ebx, 4
add ebx, ebx
add ecx, ebx
jns 0x4087cf
movzx eax, word [ecx + eax]
movzx edx, word [ecx + edx]
sub eax, edx
pop ebx
pop ebx
jmp 0x4087d1
xor eax, eax
ret
test eax, eax
je 0x408818
test edx, edx
jne 0x40876c
mov eax, dword [eax - 4]
ret
sub eax, dword [edx - 4]
ret

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

Disassembly:
push ebx
push esi
mov esi, eax
mov eax, esi
call fcn.004051bc
push eax
call sub.kernel32.dll_GetFileAttributesW
cmp eax, 0xffffffff
je 0x40920a
test al, 0x10
sete al
pop esi
pop ebx
ret
call sub.kernel32.dll_GetLastError
mov ebx, eax
cmp ebx, 2
je 0x40922b
cmp ebx, 3
je 0x40922b
cmp ebx, 0x7b
je 0x40922b
mov eax, esi
call fcn.004091ac
test al, al
jne 0x40922f
xor eax, eax
jmp 0x409231
mov al, 1
pop esi
pop ebx
ret

Function at 0x40c5d4
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 0x40c60d
mov ecx, eax
dec ecx
lea edx, [ebp - 0x200]
mov eax, ebx
call fcn.0040526c
jmp 0x40c616
mov eax, ebx
mov edx, esi
call fcn.00405130
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x40c620
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 0x40c642
movzx eax, word [esp]
jmp 0x40c644
mov eax, edi
pop edx
pop edi
pop esi
pop ebx
ret
Function at 0x40cdcc
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 0x40cef1
push dword fs:[ecx]
mov dword fs:[ecx], esp
push 0x400
lea ecx, [ebp - 0x888]
call fcn.0040cbe0
mov esi, eax
mov eax, dword [0x41bd30]
cmp byte [eax], 0
je 0x40ce99
mov eax, dword [0x41bc1c]
call fcn.00403360
call fcn.00403090
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 [0x40cda8]
call fcn.00405fd8
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 0x40cf0c
push 0xfffffffffffffff4
call sub.kernel32.dll_GetStdHandle_1
push eax
call sub.kernel32.dll_WriteFile_1
jmp 0x40ced5
push 0x40
lea eax, [ebp - 0x88]
push eax
mov eax, dword [0x41bbf0]
mov eax, dword [eax + 4]
push eax
mov eax, dword [0x41eb48]
call fcn.00406090
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 0x40cef8
lea eax, [ebp - 4]
mov edx, dword [0x40cda8]
call fcn.00405fe4
ret

Function at 0x40e7d0
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffdf8
mov ebx, eax
mov eax, ebx
call fcn.00404cc0
mov ebp, eax
push 0
push 0
push ebp
push ebx
push 0
push 0xfde9
call sub.kernel32.dll_MultiByteToWideChar_1
mov edi, eax
cmp edi, 0x104
jbe 0x40e77a
mov eax, edi
add eax, eax
call fcn.00402f28
mov esi, eax
jmp 0x40e77c
mov esi, esp
push edi
push esi
push ebp
push ebx
push 0
push 0xfde9
call sub.kernel32.dll_MultiByteToWideChar_1
push edi
push esi
call sub.user32.dll_CharUpperBuffW
xor ebx, ebx
mov eax, edi
dec eax
test eax, eax
jl 0x40e7b5
inc eax
xor edx, edx
mov ecx, ebx
shl ecx, 5
shr ebx, 0x1b
or ecx, ebx
mov ebx, ecx
movzx ecx, word [esi + edx*2]
xor ebx, ecx
inc edx
dec eax
jne 0x40e79f
mov eax, esp
cmp esi, eax
je 0x40e7c2
mov eax, esi
call fcn.00402f44
mov eax, ebx
add esp, 0x208
pop ebp
pop edi
pop esi
pop ebx
ret
push esi
push ebx
mov esi, eax
xor eax, eax
push esi
rol eax, 5
mov bl, byte [esi]
test bl, 0x80
jne 0x40e7fc
cmp bl, 0
je 0x40e7f8
cmp bl, 0x41
jl 0x40e7f3
cmp bl, 0x5a
jg 0x40e7f3
or bl, 0x20
xor al, bl
inc esi
jmp 0x40e7d7
pop ecx
pop ebx
pop esi
ret
pop eax
pop ebx
pop esi
jmp 0x40e73c
Function at 0x419344
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
push ebx
push esi
push edi
mov dword [ebp - 4], ecx
mov edi, edx
mov ebx, eax
movzx eax, byte [ebp + 8]
call fcn.00418f1c
mov esi, eax
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp - 4]
push eax
push esi
push 0
mov eax, edi
call fcn.004051bc
push eax
mov eax, dword [ebx + 4]
push eax
call sub.advapi32.dll_RegSetValueExW
test eax, eax
je 0x4193a3
mov dword [ebp - 0xc], edi
mov byte [ebp - 8], 0x11
lea eax, [ebp - 0xc]
push eax
push 0
mov ecx, dword [0x41bca8]
mov dl, 1
mov eax, dword [0x418d94]
call fcn.0040d008
call fcn.00404298
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8

Function at 0x4193ac
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
push ebx
push esi
push edi
mov edi, ecx
mov esi, edx
mov ebx, eax
xor eax, eax
mov dword [ebp - 4], eax
lea eax, [ebp + 0xc]
push eax
push edi
lea eax, [ebp - 4]
push eax
push 0
mov eax, esi
call fcn.004051bc
push eax
mov eax, dword [ebx + 4]
push eax
call sub.advapi32.dll_RegQueryValueExW_1
test eax, eax
je 0x419404
mov dword [ebp - 0xc], esi
mov byte [ebp - 8], 0x11
lea eax, [ebp - 0xc]
push eax
push 0
mov ecx, dword [0x41bdbc]
mov dl, 1
mov eax, dword [0x418d94]
call fcn.0040d008
call fcn.00404298
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebp - 4]
call fcn.00418f4c
mov edx, dword [ebp + 8]
mov byte [edx], al
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8

Function at 0x4194e4
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 4], ecx
mov edi, edx
mov esi, eax
xor eax, eax
push ebp
push 0x41956a
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, 0x104
call fcn.00409768
mov ebx, eax
lea eax, [ebp - 8]
push eax
push esi
call sub.user32.dll_GetDesktopWindow
push eax
call sub.shell32.dll_SHGetSpecialFolderLocation
push ebx
mov eax, dword [ebp - 8]
push eax
call sub.shell32.dll_SHGetPathFromIDListW
test eax, eax
je 0x419537
mov eax, edi
mov edx, ebx
call fcn.004052ac
lea eax, [ebp - 4]
push eax
call sub.shell32.dll_SHGetMalloc
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp - 4]
push eax
mov eax, dword [eax]
call dword [eax + 0x14]
mov eax, ebx
call fcn.0040979c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x419571
lea eax, [ebp - 4]
call fcn.00406784
ret
Function at 0x41958c
Capabilities:
Query environment variable

Disassembly:
push ebx
push esi
push edi
push ebp
push ecx
mov dword [esp], edx
mov ebp, eax
mov ebx, 0x104
lea eax, [ebx + 2]
call fcn.00409768
mov esi, eax
push ebx
push esi
mov eax, ebp
call fcn.004051bc
push eax
call sub.kernel32.dll_ExpandEnvironmentStringsW
mov edi, eax
test edi, edi
jbe 0x41960c
cmp ebx, edi
jb 0x4195ca
mov eax, dword [esp]
mov edx, esi
call fcn.004052ac
jmp 0x41960c
mov eax, esi
call fcn.0040979c
mov ebx, edi
lea eax, [ebx + 2]
call fcn.00409768
mov esi, eax
push ebx
push esi
mov eax, ebp
call fcn.004051bc
push eax
call sub.kernel32.dll_ExpandEnvironmentStringsW
mov edi, eax
test edi, edi
jbe 0x41960c
cmp ebx, edi
jb 0x419602
mov eax, dword [esp]
mov edx, esi
call fcn.004052ac
jmp 0x41960c
mov eax, dword [esp]
xor edx, edx
call fcn.00405130
mov eax, esi
call fcn.0040979c
pop edx
pop ebp
pop edi
pop esi
pop ebx
ret