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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100842de
mov eax, dword fs:[0]
push eax
sub esp, 0x21c
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x224], 0
xor eax, eax
mov dword [ebp - 4], 0
push 0x206
push eax
mov word [ebp - 0x218], ax
lea eax, [ebp - 0x216]
push eax
call fcn.1006df00
add esp, 0xc
lea eax, [ebp - 0x218]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push ecx
mov ecx, esp
mov dword [ebp - 0x228], esp
push 0x1008fa70
call fcn.10022bb0
push ecx
mov byte [ebp - 4], 1
mov esi, esp
mov ecx, dword [ebp + 8]
add ecx, 0xfffffff0
mov dword [ebp - 0x21c], esp
call fcn.100236e0
add eax, 0x10
mov dword [esi], eax
push ecx
lea eax, [ebp - 0x218]
mov byte [ebp - 4], 2
mov ecx, esp
push eax
call fcn.10022bb0
mov ecx, edi
mov byte [ebp - 4], 0
call fcn.1003a550
mov dword [ebp - 4], 0xffffffff
add esp, 0xc
mov esi, dword [ebp + 8]
or ecx, 0xffffffff
add esi, 0xfffffff0
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x1003a525
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1006abfd
mov esp, ebp
pop ebp
ret

Function at 0x1003aee0
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
push edi
push 0
push 0
push 3
push 0
push 1
push SysReAllocStringLen
push dword [ebp + 8]
mov dword [ebp - 4], edx
mov edi, ecx
or esi, 0xffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [edi], 0
mov eax, dword [ebp - 4]
mov dword [eax], 0
cmp ebx, 0xffffffff
je 0x1003af89
push 0
push ebx
mov dword [ebp - 8], 0
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, dword [ebp - 4]
mov dword [ecx], eax
test eax, eax
je 0x1003af86
cmp dword [ebp + 0xc], 0
je 0x1003af41
add eax, 2
push eax
call fcn.1006bba0
add esp, 4
mov dword [edi], eax
lea eax, [ebp - 8]
push 0
push eax
mov eax, dword [ebp - 4]
push dword [eax]
push dword [edi]
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1003af7d
cmp dword [ebp + 0xc], 0
mov esi, dword [ebp - 8]
je 0x1003af7d
mov eax, dword [edi]
mov byte [esi + eax], 0
mov ecx, dword [edi]
mov eax, dword [ebp - 8]
mov byte [ecx + eax + 1], 0
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1003af89
or esi, 0xffffffff
mov edi, dword [ebp + 8]
or ecx, 0xffffffff
add edi, 0xfffffff0
lea eax, [edi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x1003afa6
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x1003afb0
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10084450
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [section..data]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x18], ebx
push 0
push 0
push 3
push 0
push 0
push SysReAllocStringLen
mov dword [ebp - 4], 0
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
push 0
push 0x1008fa88
mov ecx, ebx
mov esi, eax
call fcn.10023530
or ebx, 0xffffffff
cmp esi, ebx
jne 0x1003b017
xor esi, esi
jmp 0x1003b094
push 0
push esi
mov dword [ebp - 0x10], 0
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
test edi, edi
je 0x1003b08f
push edi
call fcn.1006bba0
add esp, 4
mov dword [ebp - 0x14], eax
lea ecx, [ebp - 0x10]
push 0
push ecx
push edi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1003b088
mov edx, dword [ebp - 0x14]
lea ecx, [ebp - 0x14]
push edi
call fcn.1003ad00
add esp, 4
mov ecx, dword [ebp - 0x18]
push eax
mov byte [ebp - 4], 1
call fcn.100232f0
mov byte [ebp - 4], 0
mov ecx, ebx
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x1003b088
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, 1
mov dword [ebp - 4], 0xffffffff
mov edi, dword [ebp + 8]
add edi, 0xfffffff0
lea eax, [edi + 0xc]
lock xadd dword [eax], ebx
dec ebx
test ebx, ebx
jg 0x1003b0b5
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x1003b310
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100844c8
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push esi
push edi
mov eax, dword [section..data]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor ebx, ebx
mov dword [ebp - 4], 2
mov dword [ebp - 0x10], 0
mov esi, 0xf003f
test edx, edx
je 0x1003b35e
call fcn.1003c5a0
test eax, eax
mov ecx, 0xf013f
cmovne esi, ecx
push 0
lea eax, [ebp - 0x10]
push eax
push 0
push esi
push 0
push 0
push 0
push dword [ebp + 8]
push SysReAllocStringLen
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x1003b3f0
mov eax, dword [ebp + 0x10]
cmp dword [eax - 4], 1
mov esi, dword [eax - 0xc]
jle 0x1003b397
push esi
lea ecx, [ebp + 0x10]
call fcn.100235f0
mov eax, dword [ebp + 0x10]
lea ecx, [esi + esi]
push ecx
push eax
push 1
push 0
push dword [ebp + 0xc]
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
mov ecx, 1
mov eax, dword [ebp + 0x10]
cmove ebx, ecx
push dword [eax - 8]
push eax
call fcn.1006b17d
mov ecx, eax
add esp, 8
test ecx, ecx
js 0x1003b468
mov eax, dword [ebp + 0x10]
cmp ecx, dword [eax - 8]
jg 0x1003b468
mov dword [eax - 0xc], ecx
xor edx, edx
mov eax, dword [ebp + 0x10]
mov word [eax + ecx*2], dx
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov byte [ebp - 4], 1
or esi, 0xffffffff
mov edx, dword [ebp + 8]
mov eax, esi
add edx, 0xfffffff0
lea ecx, [edx + 0xc]
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x1003b413
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov ecx, esi
mov edx, dword [ebp + 0xc]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x1003b433
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edi, dword [ebp + 0x10]
add edi, 0xfffffff0
lea eax, [edi + 0xc]
lock xadd dword [eax], esi
dec esi
test esi, esi
jg 0x1003b454
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.10021340
int3
Function at 0x1003b480
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10084500
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push esi
push edi
mov eax, dword [section..data]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x14], edx
xor edi, edi
mov dword [ebp - 4], 1
mov esi, 0xf003f
mov dword [ebp - 0x10], 0
cmp dword [ebp + 0x10], edi
je 0x1003b4d4
call fcn.1003c5a0
test eax, eax
mov ecx, 0xf013f
cmovne esi, ecx
push 0
lea eax, [ebp - 0x10]
push eax
push 0
push esi
push 0
push 0
push 0
push dword [ebp + 8]
push SysReAllocStringLen
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x1003b51e
push 4
lea eax, [ebp - 0x14]
push eax
push 4
push 0
push dword [ebp + 0xc]
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp - 0x10]
test eax, eax
mov ecx, 1
cmove edi, ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov byte [ebp - 4], 0
or esi, 0xffffffff
mov edx, dword [ebp + 8]
mov eax, esi
add edx, 0xfffffff0
lea ecx, [edx + 0xc]
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x1003b541
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov ebx, dword [ebp + 0xc]
add ebx, 0xfffffff0
lea eax, [ebx + 0xc]
lock xadd dword [eax], esi
dec esi
test esi, esi
jg 0x1003b562
mov ecx, dword [ebx]
push ebx
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x1003b580
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10084530
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [section..data]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, edx
mov dword [ebp - 0x14], eax
xor edi, edi
mov dword [ebp - 4], 0
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x10], edi
lea esi, [edi + 9]
cmp dword [ebp + 0x10], edi
je 0x1003b5cb
mov ecx, eax
call fcn.1003f0a0
cmp dword [ebp + 0xc], edi
je 0x1003b5df
call fcn.1003c5a0
test eax, eax
mov ecx, 0x109
cmovne esi, ecx
lea eax, [ebp - 0x10]
push eax
push esi
push 0
push dword [ebp + 8]
push SysReAllocStringLen
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
or ecx, 0xffffffff
test eax, eax
jne 0x1003b704
call fcn.10021470
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x1003b61b
push 0x80004005
call fcn.10021340
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp + 0x10], esi
mov byte [ebp - 4], 1
xor ebx, ebx
mov edi, edi
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x514
or eax, ecx
jge 0x1003b654
push 0x514
lea ecx, [ebp + 0x10]
call fcn.10023670
mov esi, dword [ebp + 0x10]
push 0x514
push esi
push ebx
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
push dword [esi - 8]
mov dword [ebp + 0xc], eax
push esi
call fcn.1006b17d
add esp, 8
test eax, eax
js 0x1003b739
cmp eax, dword [esi - 8]
jg 0x1003b739
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
cmp dword [ebp + 0xc], ecx
jne 0x1003b6da
cmp dword [ebp + 0x14], ecx
je 0x1003b6c1
push ecx
lea ecx, [esi - 0x10]
mov edi, esp
call fcn.100236e0
mov ecx, dword [ebp - 0x14]
add eax, 0x10
xor edx, edx
mov dword [edi], eax
call fcn.1003c7f0
mov edi, dword [ebp - 0x18]
add esp, 4
inc edi
inc ebx
mov dword [ebp - 0x18], edi
jmp 0x1003b630
mov ecx, dword [ebp - 0x14]
lea eax, [ebp + 0x10]
push eax
call fcn.1003efd0
mov esi, dword [ebp + 0x10]
inc edi
mov dword [ebp - 0x18], edi
inc ebx
jmp 0x1003b630
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
add esi, 0xfffffff0
mov byte [ebp - 4], 0
or ecx, 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x1003b701
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
or ecx, 0xffffffff
mov dword [ebp - 4], 0xffffffff
mov esi, dword [ebp + 8]
add esi, 0xfffffff0
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x1003b725
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.10021340
int3
Function at 0x1003bb30
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov esi, dword [ebp + 8]
xor ebx, ebx
cmp eax, 0xffffffff
setne bl
add esi, 0xfffffff0
or ecx, 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x1003bb63
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
pop esi
mov eax, ebx
pop ebx
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1003bb8e
test al, 0x10
je 0x1003bb8e
mov esi, 1
jmp 0x1003bb90
xor esi, esi
mov edi, dword [ebp + 8]
or ecx, 0xffffffff
add edi, 0xfffffff0
lea eax, [edi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x1003bbad
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
pop edi
mov eax, esi
pop esi
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, ecx
mov edx, edi
lea ecx, [edx + 2]
mov edi, edi
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x1003bc20
sub edx, ecx
sar edx, 1
lea eax, [edx*2 + 2]
push eax
call fcn.1006bba0
lea ecx, [edi + 2]
mov dword [ebp - 4], eax
push 0x5c
push ecx
xor ebx, ebx
call fcn.1006ade1
mov esi, eax
add esp, 0xc
test esi, esi
je 0x1003bca1
sub esi, edi
sar esi, 1
test ebx, ebx
jle 0x1003bc8b
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x1003bc62
sub eax, edx
push esi
sar eax, 1
push edi
inc eax
push eax
push dword [ebp - 4]
call fcn.1006c4c6
add esp, 0x10
push 0
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
inc esi
inc ebx
push 0x5c
lea eax, [edi + esi*2]
push eax
call fcn.1006ade1
mov esi, eax
add esp, 8
test esi, esi
jne 0x1003bc55
push dword [ebp - 4]
call fcn.1006ac0c
add esp, 4
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xor ecx, ecx
cmp eax, 0xffffffff
pop edi
setne cl
pop esi
mov eax, ecx
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x1003c4e0
Capabilities:
Check if file exists
Delete file
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10083578
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push esi
push edi
mov eax, dword [section..data]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0
mov dword [ebp - 4], 0
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ecx, dword [ebp + 8]
lea ecx, [ecx - 0x10]
call fcn.100236e0
lea esi, [eax + 0x10]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
add esi, 0xfffffff0
or edi, 0xffffffff
mov dword [ebp - 0x10], ecx
mov eax, edi
lea ecx, [esi + 0xc]
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x1003c55d
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
xor ebx, ebx
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x10], ebx
mov esi, dword [ebp + 8]
sete bl
add esi, 0xfffffff0
lea eax, [esi + 0xc]
lock xadd dword [eax], edi
dec edi
test edi, edi
jg 0x1003c586
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x1003d800
Capabilities:
Get hostname

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10084819
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push esi
mov eax, dword [section..data]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x18], esi
mov dword [ebp - 4], 0
mov dword [ebp - 0x10], 0
call fcn.10021470
xor edx, edx
mov ecx, eax
test ecx, ecx
setne dl
test edx, edx
jne 0x1003d855
push 0x80004005
call fcn.10021340
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [esi], eax
mov dword [ebp - 4], 0
mov ecx, 1
mov dword [ebp - 0x14], 0x200
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, 0x200
mov dword [ebp - 0x10], 1
or ecx, eax
jge 0x1003d894
push 0x200
mov ecx, esi
call fcn.10023670
lea eax, [ebp - 0x14]
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_GetComputerNameW]
mov eax, dword [esi]
test eax, eax
jne 0x1003d8aa
xor ecx, ecx
jmp 0x1003d8bc
push dword [eax - 8]
push eax
call fcn.1006b17d
mov ecx, eax
add esp, 8
test ecx, ecx
js 0x1003d8e0
mov eax, dword [esi]
cmp ecx, dword [eax - 8]
jg 0x1003d8e0
mov dword [eax - 0xc], ecx
xor edx, edx
mov eax, dword [esi]
mov word [eax + ecx*2], dx
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.10021340
int3

Function at 0x1003d8f0
Capabilities:
Get session user name

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10084819
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push esi
mov eax, dword [section..data]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x18], esi
mov dword [ebp - 4], 0
push 0x1008fa88
mov dword [ebp - 0x10], 0
call fcn.10022bb0
mov dword [ebp - 4], 0
mov ecx, 1
mov eax, dword [esi]
mov dword [ebp - 0x14], 0x104
mov dword [ebp - 0x10], 1
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, 0x104
or ecx, eax
jge 0x1003d96a
push 0x104
mov ecx, esi
call fcn.10023670
lea eax, [ebp - 0x14]
push eax
push dword [esi]
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
mov eax, dword [esi]
test eax, eax
jne 0x1003d980
xor ecx, ecx
jmp 0x1003d992
push dword [eax - 8]
push eax
call fcn.1006b17d
mov ecx, eax
add esp, 8
test ecx, ecx
js 0x1003d9b6
mov eax, dword [esi]
cmp ecx, dword [eax - 8]
jg 0x1003d9b6
mov dword [eax - 0xc], ecx
xor edx, edx
mov eax, dword [esi]
mov word [eax + ecx*2], dx
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.10021340
int3
Function at 0x1003da80
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10084886
mov eax, dword fs:[0]
push eax
sub esp, 8
push esi
push edi
mov eax, dword [section..data]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [0x100b3204]
mov dword [ebp - 0x14], 0
test al, 1
jne 0x1003daeb
or eax, 1
mov dword [0x100b3204], eax
push 0x1008fa88
mov ecx, 0x100b3208
mov dword [ebp - 4], 0
call fcn.10022bb0
push 0x10088410
call fcn.1006ad6f
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov eax, dword [0x100b3208]
cmp dword [eax - 0xc], 0
jne 0x1003dbf4
mov ecx, dword [eax - 8]
mov edx, 1
sub edx, dword [eax - 4]
sub ecx, 0x514
or ecx, edx
jge 0x1003db23
push 0x514
mov ecx, 0x100b3208
call fcn.10023670
mov eax, dword [0x100b3208]
push 0x514
push eax
push str._USERPROFILE_
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov ecx, dword [0x100b3208]
mov edi, eax
push dword [ecx - 8]
push ecx
call fcn.1006b17d
mov edx, eax
add esp, 8
test edx, edx
js 0x1003dc14
mov ecx, dword [0x100b3208]
cmp edx, dword [ecx - 8]
jg 0x1003dc14
mov dword [ecx - 0xc], edx
xor ecx, ecx
mov eax, dword [0x100b3208]
mov word [eax + edx*2], cx
test edi, edi
je 0x1003dba6
mov eax, dword [0x100b3208]
cmp dword [eax - 0xc], ecx
jle 0x1003dbab
push 0x7e
push eax
call fcn.1006ade1
mov edx, eax
add esp, 8
test edx, edx
je 0x1003dba6
mov eax, dword [0x100b3208]
sub edx, eax
sar edx, 1
cmp edx, 0xffffffff
je 0x1003dbab
mov ecx, 0x100b3208
call fcn.1003bd80
mov eax, dword [0x100b3208]
push eax
lea eax, [ebp - 0x10]
push str.ReplaceUserProfile:_CurProfile_s
push eax
call fcn.1003a800
add esp, 0xc
mov dword [ebp - 4], 1
mov edx, dword [eax]
call fcn.100394f0
mov dword [ebp - 4], 0xffffffff
or ecx, 0xffffffff
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x1003dbef
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [0x100b3208]
lea ecx, [eax - 0x10]
call fcn.100236e0
add eax, 0x10
mov dword [esi], eax
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.10021340
int3
Function at 0x1003dc20
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10082980
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push esi
push edi
mov eax, dword [section..data]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, edx
mov ebx, ecx
mov dword [ebp - 0x14], 0
mov dword [ebp - 4], 0
call fcn.10021470
mov ecx, eax
xor eax, eax
test ecx, ecx
setne al
test eax, eax
jne 0x1003dc76
push 0x80004005
call fcn.10021340
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x10], esi
mov byte [ebp - 4], 1
test edi, edi
jns 0x1003dc93
push 0x80070057
call fcn.10021340
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edi
or eax, ecx
jge 0x1003dcb0
push edi
lea ecx, [ebp - 0x10]
call fcn.10023670
mov esi, dword [ebp - 0x10]
push edi
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push dword [esi - 8]
mov edi, eax
push esi
call fcn.1006b17d
add esp, 8
test eax, eax
js 0x1003dc89
cmp eax, dword [esi - 8]
jg 0x1003dc89
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
test edi, edi
jne 0x1003dd40
push 0x1008fa88
mov ecx, ebx
call fcn.10022bb0
lea edx, [esi - 0x10]
mov byte [ebp - 4], 0
or esi, 0xffffffff
lea ecx, [edx + 0xc]
mov eax, esi
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x1003dd0b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp + 8]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], esi
dec esi
test esi, esi
jg 0x1003dd2c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea edi, [esi - 0x10]
mov ecx, edi
call fcn.100236e0
add eax, 0x10
mov byte [ebp - 4], 0
or esi, 0xffffffff
mov dword [ebx], eax
lea ecx, [edi + 0xc]
mov eax, esi
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x1003dd0b
mov ecx, dword [edi]
push edi
jmp 0x1003dd06
Function at 0x10040770
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, ecx
push 0x40
mov ecx, dword [edi]
lea esi, [edi + 4]
push esi
push ebx
call fcn.100421e0
mov eax, 0x5a4d
cmp word [esi], ax
jne 0x10040806
mov eax, dword [edi + 0x40]
lea esi, [edi + 0x44]
mov ecx, dword [edi]
add eax, ebx
push 0xf8
push esi
push eax
mov dword [edi + 0x13c], eax
call fcn.100421e0
cmp dword [esi], 0x4550
jne 0x10040833
mov eax, 0x2000
test word [edi + 0x5a], ax
jne 0x10040860
mov ecx, dword [edi + 0xc4]
test ecx, ecx
je 0x1004088d
push ecx
lea eax, [ecx + ebx]
mov dword [edi + 0x140], eax
mov eax, esp
push ecx
push str.dwImportTableVA___.8lx
push eax
call fcn.1003a800
add esp, 0xc
call fcn.10021810
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
lea eax, [esp + 0x10]
mov dword [esp + 0x10], str.Error_while_setting_image_base_address:_no_DOS_signature_found
push eax
lea ecx, [esp + 0x18]
call fcn.1006cb0e
push 0x100ac114
lea eax, [esp + 0x18]
mov dword [esp + 0x18], vtable.std::runtime_error.0
push eax
call fcn.10070600
lea eax, [esp + 0x10]
mov dword [esp + 0x10], str.Error_while_setting_image_base_address:_no_NT_signature_found
push eax
lea ecx, [esp + 0x18]
call fcn.1006cb0e
push 0x100ac114
lea eax, [esp + 0x18]
mov dword [esp + 0x18], vtable.std::runtime_error.0
push eax
call fcn.10070600
lea eax, [esp + 0x10]
mov dword [esp + 0x10], str.Error_while_setting_image_base_address:_not_the_image_base_of_an_executable
push eax
lea ecx, [esp + 0x18]
call fcn.1006cb0e
push 0x100ac114
lea eax, [esp + 0x18]
mov dword [esp + 0x18], vtable.std::runtime_error.0
push eax
call fcn.10070600
lea eax, [esp + 0x10]
mov dword [esp + 0x10], str.Error_while_setting_image_base_address:_no_import_directory_existing
push eax
lea ecx, [esp + 0x18]
call fcn.1006cb0e
push 0x100ac114
lea eax, [esp + 0x18]
mov dword [esp + 0x18], vtable.std::runtime_error.0
push eax
call fcn.10070600
int3