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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 8], 0
cmp dword [ebp + 0x10], 0
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edx, ebx
je 0x40d6d8
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x423d00]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x40d6d8
test cl, 0x48
je 0x40d56d
cmp byte [eax + 5], 0xa
je 0x40d56d
mov eax, dword [edi]
mov al, byte [eax + esi + 5]
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea edx, [ebx + 1]
mov dword [ebp - 8], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push edx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40d5bf
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x40d5a7
call fcn.00405b6a
mov dword [eax], 9
call fcn.00405b73
mov dword [eax], esi
jmp 0x40d5b7
cmp eax, 0x6d
je 0x40d6d8
push eax
call fcn.00405b7c
pop ecx
or eax, 0xffffffff
jmp 0x40d6da
mov eax, dword [ebp - 0xc]
mov ecx, dword [edi]
add dword [ebp - 8], eax
test byte [ecx + esi + 4], 0x80
je 0x40d6d3
test eax, eax
je 0x40d5e6
cmp byte [ebx], 0xa
jne 0x40d5e6
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x40d5ef
mov eax, dword [edi]
lea eax, [eax + esi + 4]
and byte [eax], 0xfb
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
add ecx, eax
cmp eax, ecx
mov dword [ebp + 0x10], eax
mov dword [ebp - 8], ecx
jae 0x40d6cd
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x40d6bd
cmp al, 0xd
je 0x40d621
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x40d6af
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x40d63b
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x40d636
add dword [ebp + 0x10], 2
jmp 0x40d68f
mov dword [ebp + 0x10], eax
jmp 0x40d6ab
inc dword [ebp + 0x10]
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [edi]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40d663
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40d6ab
cmp dword [ebp - 0xc], 0
je 0x40d6ab
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x40d684
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x40d68f
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x40d6ae
cmp ebx, dword [ebp + 0xc]
jne 0x40d694
cmp byte [ebp - 1], 0xa
jne 0x40d694
mov byte [ebx], 0xa
jmp 0x40d6ae
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0040d27b
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x40d6af
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x40d605
jmp 0x40d6cd
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x40d6cd
lea esi, [eax + esi + 4]
or byte [esi], 2
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
jmp 0x40d6da
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40e709
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
cmp eax, ebx
push edi
mov dword [ebp - 0x10], ebx
jne 0x40e722
or eax, 0xffffffff
jmp 0x40e783
push esi
mov esi, dword [eax]
cmp esi, ebx
mov dword [ebp - 8], esi
je 0x40e77f
push 0x3d
push esi
call fcn.00404b72
cmp eax, ebx
pop ecx
pop ecx
mov dword [ebp - 0xc], eax
je 0x40e77f
cmp esi, eax
je 0x40e77f
xor ecx, ecx
cmp byte [eax + 1], cl
mov eax, dword [0x4227b4]
sete cl
cmp eax, dword [0x4227b8]
mov dword [ebp - 4], ecx
jne 0x40e765
mov edi, eax
call fcn.0040e6a8
mov dword [0x4227b4], eax
cmp eax, ebx
jne 0x40e7be
cmp dword [ebp + 0xc], ebx
je 0x40e787
cmp dword [0x4227bc], ebx
je 0x40e787
call fcn.0040d7d8
test eax, eax
je 0x40e7be
or eax, 0xffffffff
pop esi
pop edi
pop ebx
leave
ret
cmp dword [ebp - 4], ebx
je 0x40e790
xor eax, eax
jmp 0x40e782
push 4
call fcn.004042c6
cmp eax, ebx
pop ecx
mov dword [0x4227b4], eax
je 0x40e77f
mov dword [eax], ebx
cmp dword [0x4227bc], ebx
jne 0x40e7be
push 4
call fcn.004042c6
cmp eax, ebx
pop ecx
mov dword [0x4227bc], eax
je 0x40e77f
mov dword [eax], ebx
mov edi, dword [ebp - 0xc]
mov ebx, dword [0x4227b4]
sub edi, esi
push esi
call fcn.0040e65b
mov edi, eax
test edi, edi
pop ecx
jl 0x40e825
cmp dword [ebx], 0
je 0x40e825
lea esi, [ebx + edi*4]
push dword [esi]
call fcn.004042d8
xor eax, eax
cmp dword [ebp - 4], eax
pop ecx
jne 0x40e805
mov ecx, dword [ebp - 8]
mov dword [esi], ecx
mov ecx, dword [ebp + 8]
mov esi, dword [ebp - 8]
mov dword [ecx], eax
jmp 0x40e866
mov ecx, dword [esi + 4]
inc edi
mov dword [esi], ecx
lea esi, [ebx + edi*4]
cmp dword [esi], eax
jne 0x40e7fc
mov eax, edi
shl eax, 2
push eax
push dword [0x4227b4]
call fcn.00404bed
test eax, eax
mov esi, dword [ebp - 8]
pop ecx
pop ecx
je 0x40e866
jmp 0x40e861
cmp dword [ebp - 4], 0
jne 0x40e8cd
test edi, edi
jge 0x40e835
neg edi
lea eax, [edi*4 + 8]
push eax
push dword [0x4227b4]
call fcn.00404bed
test eax, eax
pop ecx
pop ecx
je 0x40e77f
lea ecx, [eax + edi*4]
and dword [ecx + 4], 0
mov dword [ecx], esi
mov ecx, dword [ebp + 8]
and dword [ecx], 0
mov dword [0x4227b4], eax
cmp dword [ebp + 0xc], 0
je 0x40e8b8
push esi
call fcn.00403490
inc eax
inc eax
push eax
call fcn.004042c6
mov edi, eax
test edi, edi
pop ecx
pop ecx
je 0x40e8b8
push esi
push edi
call fcn.00409b80
mov eax, edi
sub eax, esi
add eax, dword [ebp - 0xc]
pop ecx
pop ecx
mov ecx, dword [ebp - 4]
mov byte [eax], 0
inc eax
neg ecx
sbb ecx, ecx
not ecx
and ecx, eax
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
test eax, eax
jne 0x40e8b1
or dword [ebp - 0x10], 0xffffffff
push edi
call fcn.004042d8
pop ecx
cmp dword [ebp - 4], 0
je 0x40e8c5
push esi
call fcn.004042d8
pop ecx
mov eax, dword [ebp - 0x10]
jmp 0x40e782
push esi
call fcn.004042d8
mov eax, dword [ebp + 8]
and dword [eax], 0
pop ecx
jmp 0x40e78c
Function at 0x410693
Capabilities:
Check if file exists
Get file attributes
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push 0x128
xor ebx, ebx
push ebx
push esi
mov edi, ecx
call fcn.00404090
add esp, 0xc
push 0x104
push dword [edi + 0xc]
lea eax, [esi + 0x22]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
mov eax, dword [edi + 4]
cmp eax, dword [0x419cc4]
je 0x4107e1
lea ecx, [ebp - 0x18]
push ecx
lea ecx, [ebp - 0x10]
push ecx
lea ecx, [ebp - 8]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileTime]
test eax, eax
je 0x410703
push ebx
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], ebx
jne 0x41070a
cmp ebx, ebx
jne 0x41070a
xor eax, eax
jmp 0x4107e4
mov edi, dword [edi + 0xc]
cmp dword [edi - 0xc], ebx
jne 0x410717
mov byte [esi + 0x20], bl
jmp 0x41072b
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
sete cl
dec cl
and ecx, eax
mov byte [esi + 0x20], cl
lea eax, [ebp - 8]
push eax
call fcn.00402306
test eax, eax
je 0x410752
push 0xffffffffffffffff
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 0x20]
call fcn.004023ed
mov ecx, dword [eax]
mov dword [esi], ecx
mov eax, dword [eax + 4]
mov dword [esi + 4], eax
jmp 0x410757
mov dword [esi], ebx
mov dword [esi + 4], ebx
lea eax, [ebp - 0x10]
push eax
call fcn.00402306
test eax, eax
je 0x41077f
push 0xffffffffffffffff
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x20]
call fcn.004023ed
mov ecx, dword [eax]
mov dword [esi + 0x10], ecx
mov eax, dword [eax + 4]
mov dword [esi + 0x14], eax
jmp 0x410789
xor eax, eax
xor ecx, ecx
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], ecx
lea eax, [ebp - 0x18]
push eax
call fcn.00402306
test eax, eax
je 0x4107b1
push 0xffffffffffffffff
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x20]
call fcn.004023ed
mov ecx, dword [eax]
mov dword [esi + 8], ecx
mov eax, dword [eax + 4]
mov dword [esi + 0xc], eax
jmp 0x4107bb
xor eax, eax
xor ecx, ecx
mov dword [esi + 8], eax
mov dword [esi + 0xc], ecx
mov eax, dword [esi]
or eax, dword [esi + 4]
jne 0x4107cd
mov eax, dword [esi + 8]
mov dword [esi], eax
mov eax, dword [esi + 0xc]
mov dword [esi + 4], eax
mov eax, dword [esi + 0x10]
or eax, dword [esi + 0x14]
jne 0x4107e1
mov eax, dword [esi + 8]
mov dword [esi + 0x10], eax
mov eax, dword [esi + 0xc]
mov dword [esi + 0x14], eax
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret 4
Function at 0x410e46
Capabilities:
Get disk information

Disassembly:
mov eax, 0x41843b
call fcn.00404068
sub esp, 0x154
mov eax, dword [0x41f8bc]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
xor eax, ebp
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x158]
push eax
push edi
mov esi, 0x104
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
test eax, eax
jne 0x410e8d
push esi
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
jmp 0x410e91
cmp eax, esi
jb 0x410e98
xor eax, eax
jmp 0x410f7c
call fcn.00410437
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x154], eax
and dword [ebp - 4], 0
lea eax, [ebp - 0x154]
push eax
push edi
call fcn.00410e04
push dword [ebp - 0x154]
call dword [sym.imp.SHLWAPI.dll_PathIsUNCA]
test eax, eax
jne 0x410f69
push eax
push eax
lea ecx, [ebp - 0x15c]
push ecx
lea ecx, [ebp - 0x160]
push ecx
push eax
push eax
push eax
push dword [ebp - 0x154]
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationA]
test eax, eax
jne 0x410ef9
xor esi, esi
jmp 0x410f6c
test byte [ebp - 0x15c], 2
jne 0x410f09
push edi
call dword [sym.imp.USER32.dll_CharUpperA]
test byte [ebp - 0x15c], 4
jne 0x410f69
lea eax, [ebp - 0x150]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
je 0x410f69
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp - 0x158], 0
je 0x410ef5
cmp dword [ebp - 0x158], edi
jbe 0x410ef5
lea eax, [ebp - 0x124]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
sub eax, edi
add eax, dword [ebp - 0x158]
cmp eax, esi
jge 0x410ef5
lea eax, [ebp - 0x124]
push eax
push dword [ebp - 0x158]
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
xor esi, esi
inc esi
mov ecx, dword [ebp - 0x154]
add ecx, 0xfffffff0
call fcn.00401190
mov eax, esi
mov ecx, dword [ebp - 0xc]
pop edi
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
pop esi
xor ecx, ebp
pop ebx
call fcn.00403476
leave
ret 8

Function at 0x414a71
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x104
mov eax, dword [0x41f8bc]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
xor eax, ebp
push edi
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ebx, eax
mov eax, 0x100
cmp ebx, eax
ja 0x414ac4
push eax
lea eax, [ebp - 0x104]
push eax
push esi
call dword [sym.imp.USER32.dll_GetWindowTextA]
cmp eax, ebx
jne 0x414ac4
push edi
lea eax, [ebp - 0x104]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x414acc
push edi
push esi
call dword [sym.imp.USER32.dll_SetWindowTextA]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00403476
leave
ret 8
Function at 0x4159b6
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x41f8bc]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
xor eax, ebp
mov esi, ecx
cmp dword [esi + 0x50], 0
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 4], eax
je 0x415a07
push edi
call fcn.00416c41
mov esi, eax
test esi, esi
je 0x415a2b
push 4
lea eax, [ebp + 0x10]
push eax
push 4
push 0
push ebx
push esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push esi
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
test edi, edi
sete al
jmp 0x415a2b
push dword [ebp + 0x10]
lea eax, [ebp - 0x14]
push 0x419d48
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push dword [esi + 0x64]
lea eax, [ebp - 0x14]
push eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00403476
leave
ret 0xc

Function at 0x415c56
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x11c
mov eax, dword [0x41f8bc]
xor eax, ebp
cmp dword [ebp + 8], 0x800
mov dword [ebp - 4], eax
push esi
mov esi, ecx
lea eax, [ebp - 0x11c]
jne 0x415c89
push 0x4196cc
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp 0x415c9b
push 4
push eax
push 3
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
test eax, eax
je 0x415cd0
lea eax, [ebp - 0x11c]
push eax
push esi
mov esi, 0x112
lea eax, [ebp - 0x118]
push esi
push eax
call fcn.0040479f
add esp, 0x10
cmp eax, 0xffffffff
je 0x415cd0
cmp eax, esi
jae 0x415cd0
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
jmp 0x415cd2
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.00403476
leave
ret
Function at 0x415cf5
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov eax, dword [0x41f8bc]
push ebx
push esi
xor eax, ebp
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
xor ebx, ebx
push 0x419740
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x18], ebx
xor esi, esi
call edi
push 0x419724
push eax
mov dword [ebp - 0x20], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x415d9f
call eax
mov esi, dword [sym.imp.KERNEL32.dll_ConvertDefaultLocale]
mov ebx, 0x3ff
mov edi, 0xfc00
mov dword [ebp - 0x18], eax
movzx eax, ax
mov ecx, eax
and ecx, ebx
movzx ecx, cx
and eax, edi
or eax, ecx
push eax
mov dword [ebp - 0x1c], ecx
call esi
push dword [ebp - 0x1c]
mov dword [ebp - 0x40], eax
call esi
push 0x419708
push dword [ebp - 0x20]
mov dword [ebp - 0x3c], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
call eax
mov dword [ebp - 0x18], eax
movzx eax, ax
mov ecx, eax
and ecx, ebx
movzx ebx, cx
and eax, edi
or eax, ebx
push eax
call esi
push ebx
mov dword [ebp - 0x38], eax
call esi
mov dword [ebp - 0x34], eax
push 4
xor ebx, ebx
jmp 0x415ea1
call dword [sym.imp.KERNEL32.dll_GetVersion]
test eax, eax
jns 0x415e4f
lea eax, [ebp - 0x1c]
push eax
push 0x20019
push ebx
push 0x4196e0
push 0x80000001
mov dword [ebp - 0x1c], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x415ea2
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x24]
push eax
push ebx
push ebx
push dword [ebp - 0x1c]
mov dword [ebp - 0x20], 0x10
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x415e44
cmp dword [ebp - 0x24], 1
jne 0x415e44
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x14]
push 0x4196dc
push eax
call fcn.004047f6
add esp, 0xc
cmp eax, 1
jne 0x415e44
mov eax, dword [ebp - 0x28]
mov esi, dword [sym.imp.KERNEL32.dll_ConvertDefaultLocale]
mov dword [ebp - 0x18], eax
movzx eax, ax
mov ecx, eax
and ecx, 0x3ff
movzx edi, cx
and eax, 0xfc00
or eax, edi
push eax
call esi
push edi
mov dword [ebp - 0x40], eax
call esi
push 2
mov dword [ebp - 0x3c], eax
pop esi
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x415ea2
push 0x4196d0
call edi
cmp eax, ebx
je 0x415ea2
lea ecx, [ebp - 0x18]
push ecx
push 0x415cdf
push 1
push 0x10
push eax
mov dword [ebp - 0x18], ebx
call dword [sym.imp.KERNEL32.dll_EnumResourceLanguagesA]
cmp word [ebp - 0x18], bx
je 0x415ea2
movzx eax, word [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_ConvertDefaultLocale]
mov ecx, eax
and ecx, 0x3ff
movzx edi, cx
and eax, 0xfc00
or eax, edi
push eax
call esi
push edi
mov dword [ebp - 0x40], eax
call esi
mov dword [ebp - 0x3c], eax
push 2
pop esi
mov dword [ebp + esi*4 - 0x40], 0x800
inc esi
xor edi, edi
cmp esi, ebx
jle 0x415ec7
push dword [ebp + edi*4 - 0x40]
mov ecx, dword [ebp - 0x2c]
call fcn.00415c56
cmp eax, ebx
pop ecx
jne 0x415ec9
inc edi
cmp edi, esi
jl 0x415eb1
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00403476
leave
ret 4
Function at 0x415eda
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push edi
xor edi, edi
mov dword [ecx + 0x9c], edi
cmp dword [0x41f100], edi
mov dword [ebp - 0x10], ecx
mov dword [ebp - 4], edi
mov dword [ebp - 8], edi
mov dword [ebp - 0x14], 4
mov dword [ebp - 0xc], edi
mov ebx, 0x41f100
je 0x415f96
push esi
lea eax, [ebp - 4]
push eax
push 1
push edi
push dword [ebx]
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x415f7e
mov esi, dword [ebx + 4]
jmp 0x415f78
lea ecx, [ebp - 0x14]
push ecx
lea ecx, [ebp - 8]
push ecx
lea ecx, [ebp - 0xc]
push ecx
push edi
push eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x415f68
cmp dword [ebp - 0xc], 4
jne 0x415f68
cmp dword [ebp - 8], edi
mov eax, dword [ebp - 0x10]
mov ecx, dword [esi + 4]
je 0x415f60
or dword [eax + 0x9c], ecx
jmp 0x415f68
not ecx
and dword [eax + 0x9c], ecx
mov dword [ebp - 8], edi
mov dword [ebp - 0x14], 4
mov dword [ebp - 0xc], edi
add esi, 8
mov eax, dword [esi]
cmp eax, edi
jne 0x415f2c
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
add ebx, 8
cmp dword [ebx], edi
mov dword [ebp - 4], edi
jne 0x415f0f
pop esi
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
pop edi
inc eax
pop ebx
leave
ret

Function at 0x41638a
Capabilities:
Query or enumerate registry key

Disassembly:
mov eax, 0x418381
call fcn.00404068
sub esp, 0x124
mov eax, dword [0x41f8bc]
mov ecx, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
xor eax, ebp
mov dword [ebp - 0x10], esp
lea edx, [ebp - 0x124]
mov dword [ebp - 0x14], eax
mov eax, dword [edi]
push edx
push eax
push ecx
mov dword [ebp - 0x12c], ecx
mov dword [ebp - 0x128], edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
mov esi, eax
test esi, esi
jne 0x416498
push 0x104
lea eax, [ebp - 0x11c]
push eax
push 0
push dword [ebp - 0x124]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
mov esi, eax
test esi, esi
jne 0x41646c
and dword [ebp - 4], eax
lea eax, [ebp - 0x11c]
push eax
lea ecx, [ebp - 0x120]
call fcn.004018f0
lea eax, [ebp - 0x120]
push eax
push dword [ebp - 0x124]
mov byte [ebp - 4], 1
call fcn.0041638a
mov ecx, dword [ebp - 0x120]
mov esi, eax
test esi, esi
setne bl
add ecx, 0xfffffff0
mov byte [ebp - 4], 0
call fcn.00401190
test bl, bl
jne 0x41646c
or dword [ebp - 4], 0xffffffff
jmp 0x4163d7
cmp esi, 0x103
je 0x41647c
cmp esi, 0x3f2
jne 0x41648c
push dword [edi]
push dword [ebp - 0x12c]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
mov esi, eax
push dword [ebp - 0x124]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x14]
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.00403476
leave
ret 8
Function at 0x416e9b
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
push edi
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [esp + 0x10]
test edi, edi
jle 0x416ed0
cmp edi, dword [esi + 0xc]
jge 0x416ed0
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x416ed0
cmp edi, dword [eax + 8]
jge 0x416ed0
mov eax, dword [eax + 0xc]
mov edi, dword [eax + edi*4]
jmp 0x416ed2
xor edi, edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, edi
pop edi
pop esi
pop ebx
ret 4

Function at 0x416fd6
Capabilities:
Allocate thread local storage

Disassembly:
xor eax, eax
push esi
mov esi, ecx
mov dword [esi + 0x14], eax
mov dword [esi + 0x18], eax
mov dword [esi + 0x18], 4
mov dword [esi + 4], eax
mov dword [esi + 8], 1
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [esi], eax
jne 0x41700a
jmp fcn.0040f185
lea eax, [esi + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov eax, esi
pop esi
ret

Function at 0x41707b
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, ecx
lea esi, [edi + 0x1c]
push esi
mov dword [ebp - 4], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebp + 8]
xor ebx, ebx
cmp eax, ebx
jle 0x417174
cmp eax, dword [edi + 0xc]
jge 0x417174
push dword [edi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
cmp esi, ebx
je 0x4170cc
mov ecx, dword [ebp + 8]
cmp ecx, dword [esi + 8]
jl 0x41715d
cmp dword [ebp + 0xc], ebx
je 0x41715d
jmp 0x4170f6
push 0x10
call fcn.00416d67
cmp eax, ebx
je 0x4170e2
mov ecx, eax
call fcn.00416fcd
mov esi, eax
jmp 0x4170e4
xor esi, esi
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
mov ecx, dword [edi + 0x14]
mov eax, dword [edi + 0x18]
mov dword [esi + eax], ecx
mov dword [edi + 0x14], esi
mov eax, dword [esi + 0xc]
cmp eax, ebx
jne 0x41710d
mov eax, dword [edi + 0xc]
shl eax, 2
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
jmp 0x41711d
mov ecx, dword [edi + 0xc]
push 2
shl ecx, 2
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_LocalReAlloc]
cmp eax, ebx
jne 0x41712f
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call fcn.0040f185
mov ecx, dword [esi + 8]
mov dword [esi + 0xc], eax
mov edx, dword [edi + 0xc]
sub edx, ecx
shl edx, 2
push edx
lea eax, [eax + ecx*4]
push ebx
push eax
call fcn.00404090
mov eax, dword [edi + 0xc]
add esp, 0xc
push esi
mov dword [esi + 8], eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov ecx, dword [ebp + 8]
mov eax, dword [esi + 0xc]
cmp eax, ebx
je 0x41716f
cmp ecx, dword [esi + 8]
jge 0x41716f
mov edx, dword [ebp + 0xc]
mov dword [eax + ecx*4], edx
push dword [ebp - 4]
jmp 0x417175
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x417233
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x417261
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x41727f
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.0041719d
jmp 0x41727f
mov eax, dword [esi + 0x14]
test eax, eax
je 0x41727f
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
push eax
mov ecx, esi
call fcn.0041719d
test edi, edi
mov eax, edi
jne 0x417269
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
mov ecx, dword [0x420b4c]
test ecx, ecx
je 0x417332
jmp 0x417232
ret 8
Function at 0x10002550
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
push edi
mov edi, edx
push edi
push 0
push dword [section..data]
mov dword [ebp - 8], edi
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, edi
shr ebx, 2
mov dword [ebp - 4], eax
test ebx, ebx
je 0x10002594
mov edi, esi
mov ecx, eax
sub edi, eax
mov edx, ebx
mov eax, dword [edi + ecx]
mov dword [ecx], eax
lea ecx, [ecx + 4]
dec edx
jne 0x10002583
mov edi, dword [ebp - 8]
mov eax, dword [ebp - 4]
shl ebx, 2
cmp ebx, edi
jae 0x100025af
mov edx, edi
sub esi, eax
lea ecx, [ebx + eax]
sub edx, ebx
mov al, byte [ecx + esi]
mov byte [ecx], al
lea ecx, [ecx + 1]
dec edx
jne 0x100025a4
mov eax, dword [ebp - 4]
lea esi, [edi - 8]
lea ecx, [eax - 8]
add ecx, edi
mov ebx, esi
mov edx, dword [ecx + 4]
mov dword [ebp - 0x10], ecx
mov ecx, dword [ecx]
shr ebx, 2
and esi, 3
mov dword [ebp - 0xc], edx
mov dword [ebp - 8], ecx
test ebx, ebx
je 0x100025f1
lea ecx, [ebx + edx]
mov edx, dword [eax]
movzx ecx, cl
ror edx, cl
mov ecx, dword [ebp - 8]
add eax, 4
xor edx, ecx
sub edx, ebx
mov dword [eax - 4], edx
mov edx, dword [ebp - 0xc]
dec ebx
jne 0x100025d4
test esi, esi
je 0x100025fd
xor byte [eax], cl
lea eax, [eax + 1]
dec esi
jne 0x100025f5
mov edi, dword [ebp - 0x10]
mov edi, dword [edi - 4]
push edi
push 0
push dword [section..data]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, dword [ebp - 4]
mov esi, eax
mov edx, esi
mov ecx, ebx
call fcn.1000104b
push ebx
push 0
push dword [section..data]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
mov dword [eax], edi
pop edi
mov dword [ecx], esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8