joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1001e080
Capabilities:
Query or enumerate registry value

Disassembly:
push ecx
push ebx
push ebp
mov ebp, dword [esp + 0x14]
push esi
mov esi, dword [ecx]
push edi
push 0xffffffffffffffff
push 0
mov ecx, ebp
call fcn.10017bc0
test esi, esi
je 0x1001e16c
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x14]
push 0
push ecx
push 0
push edx
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x1001e16c
mov eax, dword [esp + 0x10]
cmp eax, 1
je 0x1001e0dc
cmp eax, 2
je 0x1001e0dc
cmp eax, 6
je 0x1001e0dc
cmp eax, 7
jne 0x1001e16c
mov eax, dword [esp + 0x1c]
add eax, 2
push eax
call fcn.10022ea6
mov ecx, dword [esp + 0x20]
mov ebx, eax
add ecx, 2
xor eax, eax
mov edx, ecx
mov edi, ebx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
add esp, 4
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x1c]
push eax
push ebx
push 0
push 0
push ecx
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x1001e163
mov al, byte [ebx]
mov esi, ebx
test al, al
je 0x1001e14d
mov edx, dword [ebp + 4]
push esi
push edx
mov ecx, ebp
call fcn.10018060
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov al, byte [esi + ecx + 1]
lea esi, [esi + ecx + 1]
test al, al
jne 0x1001e129
push ebx
call fcn.10022daf
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 8
push ebx
call fcn.10022daf
add esp, 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret 8
Function at 0x1001e7e0
Capabilities:
Set registry value

Disassembly:
mov edx, dword [ecx]
test edx, edx
je 0x1001e816
push esi
mov esi, dword [esp + 0xc]
push edi
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
push esi
push 1
push eax
mov eax, dword [esp + 0x1c]
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
pop edi
pop esi
test eax, eax
jne 0x1001e816
mov eax, 1
ret 8
xor eax, eax
ret 8

Function at 0x1001e850
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x100883c8
push eax
mov eax, dword [ebp + 0xc]
mov dword fs:[0], esp
push ebx
push esi
test eax, eax
push edi
je 0x1001e8a6
lea ecx, [ebp + 0x14]
lea edx, [ebp + 0xc]
push ecx
mov ecx, dword [ebp + 0x14]
push edx
mov edx, dword [ebp + 8]
or ecx, 0x20006
push 0
push ecx
push 0
push 0
push 0
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov esi, eax
mov eax, dword [ebp + 0xc]
neg esi
sbb esi, esi
not esi
and esi, eax
jmp 0x1001e8a9
mov esi, dword [ebp + 8]
test esi, esi
je 0x1001e993
call fcn.10021bb0
test eax, eax
je 0x1001e92e
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x1001e8f7
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ebx, eax
inc ebx
lea eax, [ebx + ebx]
add eax, 3
and al, 0xfc
call fcn.10023c70
mov edi, esp
test edi, edi
je 0x1001e8f7
mov eax, dword [ebp + 0x10]
push ebx
push edi
push 0xffffffffffffffff
push eax
push 0
push 0
mov word [edi], 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
jmp 0x1001e8f9
xor edi, edi
mov ebx, dword [ebp + 0x18]
push ebx
call fcn.10022e89
add esp, 4
lea ecx, [eax + eax + 2]
push ecx
push ebx
push 1
push 0
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x1001e987
cmp esi, dword [ebp + 8]
je 0x1001e927
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 1
jmp 0x1001e995
mov edx, dword [ebp + 0x18]
lea ecx, [ebp + 0x18]
push edx
call fcn.1000d2d0
mov eax, dword [ebp + 0x18]
mov ecx, dword [eax - 8]
inc ecx
push ecx
push eax
mov eax, dword [ebp + 0x10]
push 1
push 0
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x1001e978
cmp esi, dword [ebp + 8]
je 0x1001e962
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [ebp + 0x18]
mov dword [ebp - 4], 0xffffffff
call fcn.1000da40
mov eax, 1
jmp 0x1001e995
lea ecx, [ebp + 0x18]
mov dword [ebp - 4], 0xffffffff
call fcn.1000da40
cmp esi, dword [ebp + 8]
je 0x1001e993
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
mov ecx, dword [ebp - 0xc]
lea esp, [ebp - 0x18]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x1001eaa0
Capabilities:
Set registry value

Disassembly:
mov eax, dword [esp + 8]
sub esp, 8
test eax, eax
push ebx
push ebp
push esi
push edi
je 0x1001eaec
lea ecx, [esp + 0x28]
lea edx, [esp + 0x20]
push ecx
mov ecx, dword [esp + 0x2c]
push edx
mov edx, dword [esp + 0x24]
or ecx, 0x20006
push 0
push ecx
push 0
push 0
push 0
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov esi, eax
mov eax, dword [esp + 0x20]
neg esi
sbb esi, esi
not esi
and esi, eax
mov dword [esp + 0x10], esi
jmp 0x1001eaf6
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x10], eax
mov esi, eax
test esi, esi
je 0x1001ec38
mov ebp, dword [esp + 0x2c]
xor edi, edi
mov dword [esp + 0x20], 1
mov eax, dword [ebp + 4]
test eax, eax
jle 0x1001eb42
lea ecx, [esp + 0x28]
push edi
push ecx
mov ecx, ebp
call fcn.1001ec50
mov edx, dword [eax]
mov ecx, dword [esp + 0x20]
mov eax, dword [edx - 8]
lea edx, [ecx + eax + 1]
lea ecx, [esp + 0x28]
mov dword [esp + 0x20], edx
call fcn.1000da40
mov eax, dword [ebp + 4]
inc edi
cmp edi, eax
jl 0x1001eb13
mov eax, dword [esp + 0x20]
push eax
call fcn.10022ea6
mov ebx, eax
add esp, 4
test ebx, ebx
mov dword [esp + 0x14], ebx
je 0x1001ec38
mov ecx, dword [esp + 0x20]
xor eax, eax
mov edx, ecx
mov edi, ebx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
mov dword [esp + 0x28], 0
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [ebp + 4]
test eax, eax
jle 0x1001ebe3
mov eax, dword [esp + 0x28]
lea ecx, [esp + 0x2c]
push eax
push ecx
mov ecx, ebp
call fcn.1001ec50
mov edi, dword [eax]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x2c]
call fcn.1000da40
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x28]
not ecx
dec ecx
inc eax
mov dword [esp + 0x28], eax
lea ebx, [ebx + ecx + 1]
mov ecx, dword [ebp + 4]
cmp eax, ecx
jl 0x1001eb82
mov ebx, dword [esp + 0x14]
mov esi, dword [esp + 0x10]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
push eax
push ebx
push 7
push 0
push ecx
push esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x1001ec20
cmp esi, dword [esp + 0x1c]
je 0x1001ec0a
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ebx
call fcn.10022daf
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
push ebx
call fcn.10022daf
mov eax, dword [esp + 0x20]
add esp, 4
cmp esi, eax
je 0x1001ec38
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 8
ret
Function at 0x1001f690
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
sub esp, 8
lea eax, [esp + 0xc]
lea ecx, [esp]
push ebx
push ebp
push esi
push edi
push 0
push 0
mov ebx, dword [esp + 0x24]
push 0
push 0
push 0
push 0
push eax
push ecx
push 0
push 0
push 0
push ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
test eax, eax
jne 0x1001f808
mov eax, dword [esp + 0x10]
test eax, eax
je 0x1001f7e7
mov eax, dword [esp + 0x1c]
cmp eax, 0x104
jae 0x1001f6e6
mov eax, 0x104
mov dword [esp + 0x1c], eax
inc eax
push eax
call fcn.10022ea6
mov esi, eax
add esp, 4
test esi, esi
je 0x1001f808
mov edx, dword [esp + 0x1c]
xor eax, eax
mov edi, esi
lea ecx, [edx + 1]
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x1c]
inc eax
push eax
push esi
push 0
push ebx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
test eax, eax
jne 0x1001f7ff
mov ebp, dword [esp + 0x20]
mov eax, ebp
or eax, 0x2001f
mov dword [esp + 0x14], eax
lea ecx, [esp + 0x20]
push ecx
push eax
push 0
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x1001f7ff
mov edi, dword [esp + 0x20]
test edi, edi
je 0x1001f7ff
push ebp
push edi
call fcn.1001f690
add esp, 8
test eax, eax
je 0x1001f7f4
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [0x100aeb88]
test eax, eax
je 0x1001f791
test ebp, ebp
je 0x1001f791
push 0
push ebp
push esi
push ebx
call eax
test eax, eax
jne 0x1001f7ff
jmp 0x1001f79d
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
test eax, eax
jne 0x1001f7ff
mov eax, dword [esp + 0x10]
dec eax
mov dword [esp + 0x10], eax
je 0x1001f7de
mov edx, dword [esp + 0x1c]
xor eax, eax
mov edi, esi
lea ecx, [edx + 1]
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x1c]
inc eax
push eax
push esi
push 0
push ebx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
test eax, eax
jne 0x1001f7ff
mov eax, dword [esp + 0x14]
jmp 0x1001f73a
push esi
call fcn.10022daf
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 8
ret
test edi, edi
je 0x1001f7ff
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push esi
call fcn.10022daf
add esp, 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 8
ret

Function at 0x1001f820
Capabilities:
Delete registry key
Delete registry value

Disassembly:
push esi
mov esi, dword [ecx]
push edi
mov edi, dword [ecx + 4]
test esi, esi
je 0x1001f889
mov eax, dword [esp + 0xc]
test eax, eax
je 0x1001f849
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
test eax, eax
jne 0x1001f889
pop edi
mov eax, 1
pop esi
ret 4
push edi
push esi
call fcn.1001f690
add esp, 8
test eax, eax
je 0x1001f889
mov eax, dword [0x100aeb88]
test eax, eax
je 0x1001f876
test edi, edi
je 0x1001f876
push 0
push edi
push 0
push esi
call eax
neg eax
sbb eax, eax
pop edi
inc eax
pop esi
ret 4
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
neg eax
sbb eax, eax
pop edi
inc eax
pop esi
ret 4
pop edi
xor eax, eax
pop esi
ret 4
Function at 0x1001fa00
Capabilities:
Query or enumerate registry value

Disassembly:
mov edx, dword [esp + 4]
push ebx
test edx, edx
push esi
mov ebx, ecx
je 0x1001fa36
mov eax, dword [ebx + 4]
mov ecx, dword [ebx]
lea esi, [esp + 0xc]
or eax, 0x20019
push esi
push eax
push 0
push edx
push ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov esi, eax
mov eax, dword [esp + 0xc]
neg esi
sbb esi, esi
not esi
and esi, eax
jmp 0x1001fa38
mov esi, dword [ebx]
test esi, esi
je 0x1001fac3
mov edx, dword [esp + 0x10]
push edi
lea eax, [esp + 0x14]
xor edi, edi
push eax
lea ecx, [esp + 0x14]
push edi
push ecx
push edi
push edx
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne case.0x1001fa68.2
mov eax, dword [esp + 0x18]
cmp eax, 4
ja case.0x1001fa68.2
jmp dword [eax*4 + 0x1001facc]
mov edi, 1
jmp case.0x1001fa68.2
mov ecx, dword [esp + 0x10]
xor eax, eax
cmp ecx, 4
sete al
mov edi, eax
jmp case.0x1001fa68.2
mov eax, dword [esp + 0x10]
cmp eax, 1
je case.0x1001fa68.0
cmp eax, 2
je case.0x1001fa68.0
cmp eax, 6
je case.0x1001fa68.0
cmp eax, 7
je case.0x1001fa68.0
xor edi, edi
jmp case.0x1001fa68.2
mov eax, dword [esp + 0x10]
xor ecx, ecx
cmp eax, 3
sete cl
mov edi, ecx
cmp esi, dword [ebx]
je 0x1001fabb
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, edi
pop edi
pop esi
pop ebx
ret 0xc
pop esi
xor eax, eax
pop ebx
ret 0xc

Function at 0x100215b0
Capabilities:
Check os version
Get system information on windows

Disassembly:
mov eax, dword [0x100aed04]
test eax, eax
jne 0x1002169c
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExA]
push 0x100aeba0
mov dword [0x100aed04], 1
mov dword [0x100aeba0], 0x94
call esi
mov edx, dword [0x100aebb0]
xor eax, eax
cmp edx, 2
sete al
test eax, eax
mov dword [0x1009ea88], eax
je 0x1002167e
push edi
push 0x100aec38
mov dword [0x100aec38], 0x9c
call esi
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
push str.GetNativeSystemInfo
push esi
call edi
push str.GetProductInfo
push esi
mov dword [0x100aecfc], eax
call edi
mov dword [0x100aed00], eax
mov eax, dword [0x100aecfc]
pop edi
test eax, eax
push 0x100aecd8
je 0x1002164c
call eax
jmp 0x10021652
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [0x100aec3c]
cmp eax, 6
jae 0x1002166a
cmp eax, 5
jne 0x1002167e
cmp dword [0x100aec40], 2
jb 0x1002167e
cmp word [0x100aecd8], 9
jne 0x1002167e
mov dword [0x100aeb94], 1
push 0x100aeba8
push 0x100aeba4
call fcn.100219d0
add esp, 8
call fcn.100216b0
mov eax, 1
pop esi
ret
mov eax, 1
ret
Function at 0x100226b0
Capabilities:
Get common file path
Get file version info

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1008a7d0
push 0x10027020
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x22c
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
mov eax, dword [0x100aed08]
xor ebx, ebx
cmp eax, ebx
jne 0x10022810
mov byte [ebp - 0x11c], bl
mov ecx, 0x40
xor eax, eax
lea edi, [ebp - 0x11b]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0x104
lea eax, [ebp - 0x11c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x1002280b
mov byte [ebp - 0x224], bl
mov ecx, 0x40
xor eax, eax
lea edi, [ebp - 0x223]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push str.user32.dll
lea ecx, [ebp - 0x11c]
push ecx
push 0x1009e6e8
lea edx, [ebp - 0x224]
push edx
call fcn.10024756
add esp, 0x10
mov dword [ebp - 0x22c], ebx
lea eax, [ebp - 0x22c]
push eax
lea ecx, [ebp - 0x224]
push ecx
call sub.VERSION.dll_GetFileVersionInfoSizeA
mov dword [ebp - 0x120], eax
push eax
call fcn.10022ea6
add esp, 4
mov esi, eax
mov dword [ebp - 0x238], esi
cmp esi, ebx
je 0x1002280b
push esi
mov edx, dword [ebp - 0x120]
push edx
mov eax, dword [ebp - 0x22c]
push eax
lea ecx, [ebp - 0x224]
push ecx
call sub.VERSION.dll_GetFileVersionInfoA
test eax, eax
je 0x10022802
mov dword [ebp - 0x230], ebx
lea edx, [ebp - 0x120]
push edx
lea eax, [ebp - 0x230]
push eax
push str.VarFileInfoTranslation
push esi
call sub.VERSION.dll_VerQueryValueA
test eax, eax
je 0x10022802
mov dword [ebp - 4], ebx
mov eax, dword [ebp - 0x230]
mov dword [ebp - 0x234], eax
mov ecx, dword [eax]
mov dword [0x100aed08], ecx
mov dword [ebp - 4], 0xffffffff
jmp 0x10022802
push esi
call fcn.10022daf
add esp, 4
mov eax, dword [0x100aed08]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x10034dd0
Capabilities:
Get user security identifier

Disassembly:
sub esp, 8
push ebx
push ebp
mov ebp, dword [esp + 0x14]
lea eax, [esp + 0x18]
push edi
mov edi, dword [esp + 0x1c]
lea ecx, [esp + 0xc]
xor ebx, ebx
push eax
push ecx
lea edx, [esp + 0x18]
push ebx
push edx
push ebx
push ebp
push ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x28], ebx
mov dword [edi], ebx
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
test eax, eax
jne 0x10034e1b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x10034e1b
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 8
ret
mov eax, dword [esp + 0x10]
push esi
push eax
call fcn.10022ea6
mov ecx, dword [esp + 0x14]
mov dword [edi], eax
lea edx, [ecx + ecx]
push edx
call fcn.10022ea6
mov esi, eax
mov eax, dword [edi]
add esp, 8
test eax, eax
je 0x10034e60
test esi, esi
je 0x10034e71
lea ecx, [esp + 0x20]
lea edx, [esp + 0x10]
push ecx
push edx
lea ecx, [esp + 0x1c]
push esi
push ecx
push eax
push ebp
push 0
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
mov ebx, eax
test esi, esi
je 0x10034e6d
push esi
call fcn.10022daf
add esp, 4
test ebx, ebx
jne 0x10034e80
mov edi, dword [edi]
test edi, edi
je 0x10034e80
push edi
call fcn.10022daf
add esp, 4
pop esi
pop edi
mov eax, ebx
pop ebp
pop ebx
add esp, 8
ret
Function at 0x10039ad0
Capabilities:
Get common file path

Disassembly:
sub esp, 0x104
push ebx
push esi
push edi
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0xd]
mov byte [esp + 0xc], 0
push 0x104
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
jbe 0x10039ba3
lea ecx, [esp + 0xc]
push 0x5c
push ecx
call fcn.100241c0
add esp, 8
test eax, eax
je 0x10039b1c
mov byte [eax], 0
mov ebx, dword [esp + 0x114]
test ebx, ebx
je 0x10039b9c
mov esi, dword [esp + 0x118]
test esi, esi
je 0x10039b9c
lea edx, [esp + 0xc]
test edx, edx
je 0x10039b9c
mov eax, dword [esp + 0x11c]
mov edx, 0x7a
test eax, eax
je 0x10039b65
push eax
lea eax, [esp + 0x10]
push eax
push 0x1009e6e8
push esi
push ebx
call fcn.100248a8
add esp, 0x14
xor edx, edx
mov esi, edx
jmp 0x10039bab
lea edi, [esp + 0xc]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp esi, ecx
jbe 0x10039b98
lea edi, [esp + 0xc]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
xor edx, edx
rep movsb byte es:[edi], byte [esi]
mov esi, edx
jmp 0x10039bab
mov esi, 0x57
jmp 0x10039bab
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
mov dword [0x100af1a0], esi
je 0x10039bbc
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
test esi, esi
pop esi
pop ebx
sete al
add esp, 0x104
ret
Function at 0x1003ec30
Capabilities:
Query environment variable

Disassembly:
push 0xffffffffffffffff
push 0x10088da5
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x314
mov eax, dword [0x1008a6f0]
push ebx
xor ebx, ebx
push esi
push edi
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], eax
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x119]
mov byte [esp + 0x118], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x15]
mov byte [esp + 0x14], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x14]
push 0x104
push ecx
push 0x100a3090
mov dword [esp + 0x334], 1
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
cmp eax, ebx
jbe 0x1003edae
cmp eax, 0x104
jae 0x1003edae
lea edx, [esp + 0x14]
push edx
call fcn.10038d20
add esp, 4
test eax, eax
je 0x1003ed21
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x21d]
mov byte [esp + 0x21c], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x21c]
push 0x104
lea ecx, [esp + 0x18]
push eax
push ecx
call fcn.10038910
lea edx, [esp + 0x228]
push 0x103
lea eax, [esp + 0x24]
push edx
push eax
call fcn.100240c0
add esp, 0x18
mov byte [esp + 0x117], bl
lea ecx, [esp + 0x118]
test ecx, ecx
je 0x1003ed9d
lea edx, [esp + 0x14]
test edx, edx
je 0x1003ed9d
mov eax, dword [esp + 0x334]
cmp eax, ebx
je 0x1003ed61
push eax
lea eax, [esp + 0x18]
push eax
push 0x1009e6e8
lea ecx, [esp + 0x124]
push 0x104
push ecx
call fcn.100248a8
add esp, 0x14
jmp 0x1003ed9d
lea edi, [esp + 0x14]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 0x104
jae 0x1003ed9d
lea edi, [esp + 0x14]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x118]
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x118]
push ecx
lea ecx, [esp + 0x10]
call fcn.1000dca0
mov esi, dword [esp + 0x330]
lea edx, [esp + 0xc]
push edx
mov ecx, esi
call fcn.1000d000
mov dword [esp + 0x10], 1
lea ecx, [esp + 0xc]
mov byte [esp + 0x328], bl
call fcn.1000da40
mov ecx, dword [esp + 0x320]
mov eax, esi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x320
ret
Function at 0x100424b0
Capabilities:
Check if file exists
Create directory
Delete file
Get file attributes
Set file attributes

Disassembly:
sub esp, 0x104
push ebx
mov ebx, dword [esp + 0x10c]
test ebx, ebx
jne 0x100424cc
xor eax, eax
pop ebx
add esp, 0x104
ret
push ebp
push esi
push edi
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x11]
mov byte [esp + 0x10], 0
push 0x103
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x14]
push ebx
push eax
mov ebp, 1
call fcn.100240c0
lea ecx, [esp + 0x1c]
push 0x5c
push ecx
call fcn.10024200
mov esi, eax
lea edi, [esp + 0x24]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x14
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 2
jbe 0x10042550
cmp byte [esp + 0x10], 0x5c
jne 0x10042550
cmp byte [esp + 0x11], 0x5c
jne 0x10042550
lea edx, [esp + 0x12]
push 0x5c
push edx
call fcn.10024200
add esp, 8
test eax, eax
je 0x100425ce
inc eax
push 0x5c
push eax
call fcn.10024200
add esp, 8
mov esi, eax
test esi, esi
je 0x100425ce
lea eax, [esp + 0x10]
mov byte [esi], 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ebx, eax
mov edi, ebx
and edi, 0x10
jne 0x10042592
test bl, 1
je 0x10042581
mov ecx, ebx
lea edx, [esp + 0x10]
and ecx, 0xfffffffe
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ebp, eax
test ebp, ebp
je 0x10042604
cmp ebx, 0xffffffff
je 0x1004259b
test edi, edi
jne 0x100425aa
lea ecx, [esp + 0x10]
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov ebp, eax
test ebp, ebp
je 0x10042604
mov byte [esi], 0x5c
inc esi
push 0x5c
push esi
call fcn.10024200
mov esi, eax
add esp, 8
test esi, esi
jne 0x10042554
test ebp, ebp
je 0x10042604
mov ebx, dword [esp + 0x118]
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x100425f9
test al, 0x10
jne 0x10042604
test al, 1
je 0x100425ec
and al, 0xfe
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ebp, eax
test ebp, ebp
je 0x10042604
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov ebp, eax
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x104
ret
Function at 0x10042620
Capabilities:
Check if file exists
Create directory
Delete file
Get file attributes
Set file attributes

Disassembly:
sub esp, 0x208
push ebx
mov ebx, dword [esp + 0x210]
test ebx, ebx
jne 0x1004263c
xor eax, eax
pop ebx
add esp, 0x208
ret
push ebp
push esi
push edi
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x12]
mov word [esp + 0x10], 0
push 0x103
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0x14]
push ebx
push eax
mov ebp, 1
call fcn.10023328
mov edi, 0x5c
lea ecx, [esp + 0x1c]
push edi
push ecx
call fcn.10023854
lea edx, [esp + 0x24]
mov esi, eax
push edx
call fcn.10022e89
add esp, 0x18
cmp eax, 2
jbe 0x100426c1
cmp word [esp + 0x10], di
jne 0x100426c1
cmp word [esp + 0x12], di
jne 0x100426c1
lea eax, [esp + 0x14]
push edi
push eax
call fcn.10023854
add esp, 8
test eax, eax
je 0x10042749
add eax, 2
push edi
push eax
call fcn.10023854
add esp, 8
mov esi, eax
test esi, esi
je 0x10042749
lea ecx, [esp + 0x10]
mov word [esi], 0
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ebx, eax
mov edi, ebx
and edi, 0x10
jne 0x10042709
test bl, 1
je 0x100426f8
mov edx, ebx
lea eax, [esp + 0x10]
and edx, 0xfffffffe
push edx
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea ecx, [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ebp, eax
test ebp, ebp
je 0x1004277f
cmp ebx, 0xffffffff
je 0x10042712
test edi, edi
jne 0x10042721
lea edx, [esp + 0x10]
push 0
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov ebp, eax
test ebp, ebp
je 0x1004277f
mov word [esi], 0x5c
add esi, 2
push 0x5c
push esi
call fcn.10023854
mov esi, eax
add esp, 8
test esi, esi
jne 0x100426c9
test ebp, ebp
je 0x1004277f
mov ebx, dword [esp + 0x21c]
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x10042774
test al, 0x10
jne 0x1004277f
test al, 1
je 0x10042767
and al, 0xfe
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ebp, eax
test ebp, ebp
je 0x1004277f
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov ebp, eax
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x208
ret