joyce8/EMBER2024-capa huggingface dataset:
Function at 0x41a3e0
Capabilities:
Get common file path

Disassembly:
push ecx
cmp dword [esi], 0
push edi
jne 0x41a481
cmp dword [esi + 4], 0xffffffff
jne 0x41a481
lea edi, [esi + 0x244]
push edi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov eax, edi
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x41a410
sub eax, edx
sar eax, 1
movzx eax, word [esi + eax*2 + 0x242]
cmp ax, 0x5c
je 0x41a449
cmp ax, 0x2f
je 0x41a449
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x41a436
mov eax, dword [0x462fd4]
mov dword [edi], eax
mov eax, dword [esp + 0xc]
lea ecx, [esp + 0xc]
push ecx
call fcn.004191b0
add esp, 4
test eax, eax
jne 0x41a467
mov eax, dword [esp + 0xc]
pop edi
pop ecx
ret 4
call fcn.004195e0
mov dword [esi], eax
neg eax
sbb eax, eax
and eax, 0xfffffe00
add eax, 0x200
pop edi
pop ecx
ret 4
mov eax, 0x1000000
pop edi
pop ecx
ret 4

Function at 0x41aa80
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
sub esp, 0x414
mov eax, dword [0x4737e0]
xor eax, esp
mov dword [esp + 0x410], eax
push ebx
mov ebx, dword [esp + 0x420]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push esi
mov esi, dword [esp + 0x424]
test esi, esi
je 0x41aac0
push esi
call ebp
cmp eax, 0xffffffff
jne 0x41aac0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
movzx eax, word [ebx]
test ax, ax
je 0x41aba6
mov ecx, ebx
mov edx, ebx
movzx eax, ax
cmp ax, 0x2f
je 0x41aadf
cmp ax, 0x5c
jne 0x41aae1
mov ecx, edx
movzx eax, word [edx + 2]
add edx, 2
test ax, ax
jne 0x41aad3
push edi
cmp ecx, ebx
je 0x41ab24
sub ecx, ebx
sar ecx, 1
add ecx, ecx
mov edi, ecx
push edi
lea eax, [esp + 0x21c]
push ebx
push eax
call fcn.004452f0
lea edx, [esp + 0x224]
push edx
xor ecx, ecx
push esi
mov word [esp + edi + 0x22c], cx
call fcn.0041aa80
add esp, 0x14
xor eax, eax
mov word [esp + 0x10], ax
test esi, esi
je 0x41ab4f
lea edx, [esp + 0x10]
mov eax, esi
sub edx, esi
jmp 0x41ab40
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x41ab40
mov eax, ebx
mov edx, ebx
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x41ab53
lea edi, [esp + 0x10]
sub eax, edx
add edi, 0xfffffffe
jmp 0x41ab70
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x41ab70
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x10]
push ecx
call ebp
pop edi
cmp eax, 0xffffffff
jne 0x41aba6
push 0
lea edx, [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov ecx, dword [esp + 0x41c]
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0043bfab
add esp, 0x414
ret
Function at 0x41b7d0
Capabilities:
Encode data using xor
Generate random numbers using the delphi lcg
Hash data with crc32
Write file on windows

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push esi
mov esi, ecx
cmp byte [esi + 0x2d], 0
push edi
mov edi, dword [esp + 0x14]
mov eax, ebx
je 0x41b8ab
mov eax, dword [esi + 0x3c]
push ebp
xor ebp, ebp
cmp eax, ebp
je 0x41b804
cmp dword [esi + 0x40], edi
jae 0x41b804
push eax
call fcn.0041d37c
add esp, 4
mov dword [esi + 0x3c], ebp
cmp dword [esi + 0x3c], ebp
jne 0x41b81b
lea eax, [edi + edi]
push eax
call fcn.0041d387
add esp, 4
mov dword [esi + 0x3c], eax
mov dword [esi + 0x40], edi
mov ecx, dword [esi + 0x3c]
push edi
push ebx
push ecx
call fcn.004452f0
add esp, 0xc
cmp edi, ebp
jbe 0x41b8a7
lea ecx, [ecx]
mov edx, dword [esi + 0x3c]
mov bl, byte [edx + ebp]
mov edi, dword [esi + 0x30]
mov eax, dword [esi + 0x38]
movsx ecx, bl
xor ecx, edi
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x463560]
shr edi, 8
xor ecx, edi
mov dword [esi + 0x30], ecx
movzx ecx, cl
add ecx, dword [esi + 0x34]
mov edx, eax
imul ecx, ecx, 0x8088405
inc ecx
mov dword [esi + 0x34], ecx
shr ecx, 0x18
xor ecx, eax
shr eax, 8
and ecx, 0xff
xor eax, dword [ecx*4 + 0x463560]
and edx, 0xfffd
mov dword [esi + 0x38], eax
mov ecx, dword [esi + 0x3c]
or edx, 2
mov eax, edx
xor eax, 1
imul eax, edx
shr eax, 8
xor al, bl
mov byte [ecx + ebp], al
inc ebp
cmp ebp, dword [esp + 0x18]
jb 0x41b830
mov edi, dword [esp + 0x18]
mov eax, dword [esi + 0x3c]
pop ebp
mov edx, dword [esi + 0x20]
test edx, edx
je 0x41b8e4
mov ecx, dword [esi + 0x24]
lea ebx, [ecx + edi]
cmp ebx, dword [esi + 0x28]
jb 0x41b8cc
pop edi
mov dword [esi + 0x14], 0x30000
pop esi
xor eax, eax
pop ebx
ret 8
push edi
push eax
add ecx, edx
push ecx
call fcn.004452f0
add esp, 0xc
add dword [esi + 0x24], edi
mov eax, edi
pop edi
pop esi
pop ebx
ret 8
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x41b905
push 0
lea edx, [esp + 0x18]
push edx
push edi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebx
ret 8
pop edi
mov dword [esi + 0x14], 0x1000000
pop esi
xor eax, eax
pop ebx
ret 8
Function at 0x41e4b0
Capabilities:
Create http request

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
push esi
mov esi, ecx
and dword [esi + 0x10], 0
and dword [esi + 0xc], 0
mov dword [esi + 4], eax
mov eax, dword [ebp + 8]
mov dword [esi], vtable.CInternetSession.0
test eax, eax
jne 0x41e4db
call fcn.00425f8b
mov eax, dword [eax + 0x10]
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push eax
call dword [sym.imp.WININET.dll_InternetOpenW]
mov dword [esi + 8], eax
test eax, eax
jne 0x41e4fe
push eax
push dword [esi + 4]
call fcn.0041e436
push esi
push eax
mov ecx, 0x47521c
call fcn.0041e0b6
mov eax, esi
pop esi
pop ebp
ret 0x18

Function at 0x41eeef
Capabilities:
Connect to http server

Disassembly:
push 4
mov eax, 0x457f23
call fcn.0043e485
mov esi, ecx
mov dword [ebp - 0x10], esi
push dword [ebp + 0x20]
mov edi, dword [ebp + 8]
push dword [ebp + 0x14]
push dword [ebp + 0xc]
push edi
call fcn.0041eeaf
and dword [ebp - 4], 0
lea ecx, [esi + 0x18]
mov dword [esi], vtable.CHttpConnection.0
call fcn.00401a90
push dword [esi + 8]
mov edi, dword [edi + 8]
push dword [ebp + 0x10]
mov byte [ebp - 4], 1
push 3
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0xc]
push edi
call dword [sym.imp.WININET.dll_InternetConnectW]
mov dword [esi + 4], eax
test eax, eax
jne 0x41ef56
push eax
push dword [esi + 8]
call fcn.0041e436
push dword [esi + 0xc]
mov ecx, 0x47521c
push eax
call fcn.0041e0b6
mov eax, esi
call fcn.0043e55d
ret 0x1c

Function at 0x422a53
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ebx
xor ebx, ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 4], ebx
cmp dword [ebp + 0xc], ebx
je 0x422a9b
call fcn.00425f8b
mov esi, dword [eax + 0xc]
push 0xf0
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x422a9b
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 4], eax
test eax, eax
je 0x422ade
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
mov esi, dword [ebp + 8]
mov dword [ebp + 0xc], 1
test ebx, ebx
je 0x422ac7
push dword [ebp + 0x10]
mov eax, dword [edi]
push ebx
push esi
mov ecx, edi
call dword [eax + 0x20]
cmp dword [ebp - 4], 0
mov dword [ebp + 0xc], eax
je 0x422ac7
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FreeResource]
cmp dword [esi + 0x4c], 0
je 0x422adb
mov ecx, dword [esi + 0x4c]
push dword [ebp + 0x10]
mov eax, dword [ecx]
call dword [eax + 0xa0]
mov eax, dword [ebp + 0xc]
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x42b6ca
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
xor ebx, ebx
xor edi, edi
mov dword [ebp - 4], ecx
cmp dword [ebp + 8], ebx
je 0x42b711
call fcn.00425f8b
mov esi, dword [eax + 0xc]
push 0xf0
push dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x42b711
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebx, eax
test ebx, ebx
je 0x42b72d
push ebx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
mov ecx, dword [ebp - 4]
push edi
call fcn.0042b242
mov esi, eax
test edi, edi
je 0x42b72b
test ebx, ebx
je 0x42b72b
push ebx
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret 4

Function at 0x42be2c
Capabilities:
Get graphical window text

Disassembly:
push 4
mov eax, 0x4581ef
call fcn.0043e485
mov esi, ecx
cmp dword [esi + 0x50], 0
jne 0x42be51
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [esi + 0x20]
call dword [sym.imp.USER32.dll_GetWindowTextW]
jmp 0x42be97
lea ecx, [ebp - 0x10]
call fcn.00401a90
mov ecx, dword [esi + 0x50]
mov eax, dword [ecx]
and dword [ebp - 4], 0
lea edx, [ebp - 0x10]
push edx
call dword [eax + 0x8c]
push 0xffffffffffffffff
push dword [ebp - 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0041d923
add esp, 0x10
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
mov esi, eax
call fcn.00401160
mov eax, esi
call fcn.0043e55d
ret 8
Function at 0x43bfab
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x4737e0]
jne 0x43bfb5
repz ret
jmp fcn.0044352c

Function at 0x44dfb0
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.00442f39
and dword [ebp - 4], 0
cmp dword [0x477cb0], 0
mov ebx, eax
jne 0x44e061
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x44e112
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
je 0x44e112
push eax
call fcn.00442ec7
mov dword [esp], 0x460b18
push edi
mov dword [0x477cb0], eax
call esi
push eax
call fcn.00442ec7
mov dword [esp], 0x460b04
push edi
mov dword [0x477cb4], eax
call esi
push eax
call fcn.00442ec7
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x477cb8], eax
call esi
push eax
call fcn.00442ec7
pop ecx
mov dword [0x477cc0], eax
test eax, eax
je 0x44e061
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.00442ec7
pop ecx
mov dword [0x477cbc], eax
mov eax, dword [0x477cbc]
cmp eax, ebx
je 0x44e0b9
cmp dword [0x477cc0], ebx
je 0x44e0b9
push eax
call fcn.00442f42
push dword [0x477cc0]
mov esi, eax
call fcn.00442f42
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x44e0b9
test edi, edi
je 0x44e0b9
call esi
test eax, eax
je 0x44e0b0
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x44e0b0
test byte [ebp - 0xc], 1
jne 0x44e0b9
or dword [ebp + 0x10], 0x200000
jmp 0x44e0f2
mov eax, dword [0x477cb4]
cmp eax, ebx
je 0x44e0f2
push eax
call fcn.00442f42
pop ecx
test eax, eax
je 0x44e0f2
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x44e0f2
mov eax, dword [0x477cb8]
cmp eax, ebx
je 0x44e0f2
push eax
call fcn.00442f42
pop ecx
test eax, eax
je 0x44e0f2
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x477cb0]
call fcn.00442f42
pop ecx
test eax, eax
je 0x44e112
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x44e114
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x1002430
Capabilities:
Get token membership

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [0x100700c]
push ebx
push esi
push edi
xor ebx, ebx
mov esi, dword [ebp + 0xc]
mov dword [ebp - 4], eax
lea eax, [ebp - 0x10]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push dword [ebp + 8]
lea eax, [ebp - 0xc]
push 0x20
push 2
xor edi, edi
push eax
mov dword [ebp - 0x10], ebx
mov byte [ebp - 0xc], bl
mov byte [ebp - 0xb], bl
mov byte [ebp - 0xa], bl
mov byte [ebp - 9], bl
mov byte [ebp - 8], bl
mov byte [ebp - 7], 5
inc edi
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x1002485
cmp dword [ebp - 0x10], ebx
jne 0x1002489
xor eax, eax
jmp 0x10024a5
push esi
push dword [ebp - 0x10]
push ebx
call dword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
test eax, eax
jne 0x100249a
xor edi, edi
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov eax, edi
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.01005b2e
leave
ret 8

Function at 0x1002594
Capabilities:
Delete registry key

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
and dword [ebp - 4], 0
lea eax, [ebp - 4]
push eax
call fcn.010023ea
or eax, 0xf003f
push eax
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x10025d7
push esi
push dword [ebp - 4]
call dword [sym.imp.ntdll.dll_NtDeleteKey]
push dword [ebp - 4]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
leave
ret 8

Function at 0x1002a73
Capabilities:
Print debug messages
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x408
mov eax, dword [0x100700c]
mov dword [ebp - 4], eax
lea eax, [ebp + 0xc]
push eax
push dword [ebp + 8]
lea eax, [ebp - 0x404]
push 0x400
push eax
call fcn.010022be
test eax, eax
jl 0x1002ae4
lea eax, [ebp - 0x404]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1002aab
mov ecx, dword [section..data]
sub eax, edx
cmp ecx, 0xffffffff
je 0x1002ad7
push 0
lea edx, [ebp - 0x408]
push edx
push eax
lea eax, [ebp - 0x404]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [ebp - 0x404]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov ecx, dword [ebp - 4]
call fcn.01005b2e
leave
ret
Function at 0x1002bb6
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x438
mov eax, dword [0x100700c]
push esi
mov esi, dword [ebp + 0xc]
push edi
lea ecx, [ebp - 0x424]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ecx
push eax
xor edi, edi
call fcn.01002b10
test eax, eax
je 0x1002c24
lea eax, [ebp - 0x438]
push eax
lea eax, [ebp - 0x424]
push eax
call dword [sym.imp.ntdll.dll_RtlStringFromGUID]
test eax, eax
jl 0x1002c24
push dword [ebp - 0x434]
lea eax, [ebp - 0x414]
push 0x1001260
push 0x100124c
push 0x104
push eax
call fcn.010028c8
add esp, 0x14
test eax, eax
jge 0x1002c2b
xor eax, eax
jmp 0x1002ccd
lea eax, [ebp - 0x428]
push eax
call fcn.010023ea
or eax, 1
push eax
push 0
lea eax, [ebp - 0x414]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1002ca9
lea eax, [ebp - 0x430]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x42c]
push eax
push 0
push 0x1001230
push dword [ebp - 0x428]
mov dword [ebp - 0x430], 0x208
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1002ca9
cmp dword [ebp - 0x42c], 1
jne 0x1002ca9
lea eax, [ebp - 0x20c]
push eax
push dword [ebp + 0x10]
push esi
call fcn.010028a6
xor edi, edi
test eax, eax
jl 0x1002cb6
inc edi
lea eax, [ebp - 0x438]
push eax
call dword [sym.imp.ntdll.dll_RtlFreeUnicodeString]
cmp dword [ebp - 0x428], 0
je 0x1002ccb
push dword [ebp - 0x428]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, edi
mov ecx, dword [ebp - 4]
pop edi
pop esi
call fcn.01005b2e
leave
ret 0xc
Function at 0x1002e29
Capabilities:
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x438
mov eax, dword [0x100700c]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor ebx, ebx
push edi
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push 0x1001318
push 0x100130c
mov dword [ebp - 0x430], eax
mov esi, 0x208
lea eax, [ebp - 0x424]
push esi
push eax
mov dword [ebp - 0x42c], edi
mov dword [ebp - 0x428], ebx
mov byte [ebp - 0x14], 0xc
mov byte [ebp - 0x13], bl
mov byte [ebp - 0x12], bl
mov byte [ebp - 0x11], bl
mov byte [ebp - 0x10], bl
mov byte [ebp - 0xf], bl
mov byte [ebp - 0xe], bl
mov byte [ebp - 0xd], bl
mov byte [ebp - 0xc], 6
mov byte [ebp - 0xb], bl
mov byte [ebp - 0xa], bl
mov byte [ebp - 9], bl
mov byte [ebp - 8], bl
mov byte [ebp - 7], bl
mov byte [ebp - 6], bl
mov byte [ebp - 5], bl
call fcn.010028c8
add esp, 0x14
test eax, eax
jge 0x1002eb9
push 0x408
jmp 0x1002f7f
lea eax, [ebp - 0x438]
push eax
lea eax, [ebp - 0x428]
push eax
push ebx
push 2
push ebx
push ebx
push ebx
lea eax, [ebp - 0x424]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
cmp eax, ebx
je 0x1002ef7
cmp eax, 5
je 0x1002f7a
push edi
push 0x3f1
jmp 0x1002f91
mov edi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push 0x10
lea eax, [ebp - 0x14]
push eax
push 3
push ebx
push dword [ebp - 0x430]
push dword [ebp - 0x428]
call edi
cmp eax, ebx
mov dword [ebp - 0x434], eax
je 0x1002f33
push dword [ebp - 0x428]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x434], 5
jmp 0x1002f78
push dword [ebp - 0x430]
lea eax, [ebp - 0x424]
push 0x10012f4
push esi
push eax
mov byte [ebp - 0x14], bl
call fcn.010028c8
add esp, 0x10
test eax, eax
jl 0x1002eaf
push 4
lea eax, [ebp - 0x14]
push eax
push 1
push ebx
lea eax, [ebp - 0x424]
push eax
push dword [ebp - 0x428]
call edi
cmp eax, ebx
je 0x1002f98
cmp eax, 5
jne 0x1002f86
push 0x3f0
call fcn.0100292f
jmp 0x1002f97
push dword [ebp - 0x42c]
push 0x412
call fcn.0100292f
pop ecx
pop ecx
cmp dword [ebp - 0x428], ebx
pop edi
pop esi
pop ebx
je 0x1002faf
push dword [ebp - 0x428]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 4]
call fcn.01005b2e
leave
ret 8
Function at 0x1002fc0
Capabilities:
Delete registry value
Query or enumerate registry key

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x21c
mov eax, dword [0x100700c]
mov ecx, dword [ebp + 0xc]
push esi
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push eax
push 0x1001318
push 0x100130c
mov dword [ebp - 0x218], eax
lea eax, [ebp - 0x20c]
push 0x104
xor esi, esi
push eax
mov dword [ebp - 0x21c], ecx
mov dword [ebp - 0x214], esi
call fcn.010028c8
add esp, 0x14
test eax, eax
jge 0x1003021
push 0x408
call fcn.0100292f
pop ecx
jmp 0x1003158
push ebx
push edi
lea eax, [ebp - 0x210]
push eax
call fcn.010023ea
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
or eax, 0xf003f
push eax
push esi
lea eax, [ebp - 0x20c]
push eax
mov ebx, 0x80000002
push ebx
call edi
cmp eax, esi
je 0x100306f
cmp eax, 5
jne 0x100305b
push 0x3f0
jmp 0x10030a9
lea eax, [ebp - 0x20c]
push eax
push 0x3f6
call fcn.0100292f
pop ecx
jmp 0x10030ae
push dword [ebp - 0x21c]
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
push dword [ebp - 0x21c]
lea eax, [ebp - 0x20c]
push 0x10012f4
push 0x104
push eax
call fcn.010028c8
add esp, 0x10
test eax, eax
jge 0x10030b4
push 0x408
call fcn.0100292f
pop ecx
jmp 0x1003156
lea eax, [ebp - 0x20c]
push eax
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
push esi
push esi
push esi
push esi
lea eax, [ebp - 0x214]
push eax
push esi
push esi
push esi
push esi
push esi
push esi
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x214], esi
mov dword [ebp - 0x210], esi
jne 0x1003156
lea eax, [ebp - 0x210]
push eax
call fcn.010023ea
or eax, 0xf003f
push eax
push esi
push 0x1001318
push ebx
call edi
cmp eax, esi
jne 0x1003132
push dword [ebp - 0x218]
push dword [ebp - 0x210]
call fcn.01002594
cmp eax, esi
je 0x100314a
push 0x1001318
push dword [ebp - 0x218]
push 0x3f7
call fcn.0100292f
add esp, 0xc
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop ebx
mov ecx, dword [ebp - 4]
pop esi
call fcn.01005b2e
leave
ret 8

Function at 0x100316a
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push 0
push 0
push dword [ebp + 8]
call edi
mov esi, eax
test esi, esi
je 0x10031c2
add esi, 4
lea eax, [esi + esi]
push eax
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
mov ebx, eax
test ebx, ebx
pop ecx
je 0x10031c2
push 0x100139c
push esi
push ebx
call fcn.010028a6
test eax, eax
jl 0x10031bb
add esi, 0xfffffffc
push esi
lea eax, [ebx + 8]
push eax
push dword [ebp + 8]
call edi
test eax, eax
jne 0x10031c6
push ebx
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
pop ecx
xor eax, eax
jmp 0x10031c8
mov eax, ebx
pop edi
pop esi
pop ebx
pop ebp
ret 4
Function at 0x10031d4
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push edi
push dword [ebp + 8]
xor edi, edi
call fcn.0100316a
mov esi, eax
cmp esi, edi
jne 0x10031fd
push dword [ebp + 8]
push 0x411
call fcn.0100292f
pop ecx
xor eax, eax
jmp 0x100325c
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x100321c
test al, 0x10
jne 0x100323f
push esi
push 0x40e
call fcn.0100292f
pop ecx
pop ecx
jmp 0x1003254
push edi
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x100323f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push 0x40f
call fcn.0100292f
add esp, 0xc
jmp 0x1003254
push esi
call fcn.010025e0
test eax, eax
je 0x1003251
push esi
push 0x410
jmp 0x1003213
xor edi, edi
inc edi
push esi
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
mov eax, edi
pop ecx
pop edi
pop esi
pop ebp
ret 4
Function at 0x1003808
Capabilities:
Delete registry value
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ebx
xor ebx, ebx
cmp dword [ebp + 0x10], ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 4], ebx
je 0x1003858
mov eax, dword [edi + 8]
push 8
lea esi, [eax + 0x60]
add eax, 8
push eax
push 0xb
push ebx
push esi
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
cmp eax, ebx
je 0x1003891
mov edi, dword [edi + 8]
push eax
push dword [edi + 0xc]
add edi, 0x60
push dword [edi - 0x58]
push edi
push 0x10017a0
call fcn.01002a73
add esp, 0x14
jmp 0x10038c6
mov esi, dword [edi + 8]
push 2
push 0x100179c
push 1
mov ebx, 0xe0
push 0
add esi, ebx
push esi
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x1003891
push eax
mov eax, dword [edi + 8]
add eax, ebx
push eax
push 0x1001758
call fcn.01002a73
add esp, 0xc
jmp 0x10038c6
add edi, 0xc
push esi
push edi
call dword [sym.imp.msvcrt.dll__wcsicmp]
test eax, eax
pop ecx
pop ecx
je 0x10038bf
push edi
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
test eax, eax
je 0x10038bf
push eax
push edi
push 0x100171c
call fcn.01002a73
add esp, 0xc
mov dword [ebp - 4], 1
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 0xc