joyce8/EMBER2024-capa huggingface dataset:
Function at 0x407ce0
Capabilities:
Extract resource via kernel32 functions
Move file

Disassembly:
sub esp, 0x260
push ebx
push ebp
push esi
push edi
push 0x4313b4
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov esi, eax
xor ebx, ebx
cmp esi, ebx
je 0x407f08
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.CreateProcessA
push esi
call edi
push str.CreateFileA
push esi
mov dword [0x431478], eax
call edi
push 0x43138c
push esi
mov dword [0x431458], eax
call edi
push 0x431380
push esi
mov dword [0x431460], eax
call edi
mov ecx, dword [0x431478]
mov dword [0x43144c], eax
cmp ecx, ebx
je 0x407f08
cmp dword [0x431458], ebx
je 0x407f08
cmp dword [0x431460], ebx
je 0x407f08
cmp eax, ebx
je 0x407f08
push 0x43137c
push 0x727
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
cmp esi, ebx
je 0x407f08
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, ebx
je 0x407f08
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
cmp eax, ebx
mov dword [esp + 0x10], eax
je 0x407f08
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebp, eax
cmp ebp, ebx
je 0x407f08
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x69]
mov byte [esp + 0x68], 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 + 0x16d]
mov byte [esp + 0x16c], bl
rep stosd dword es:[edi], eax
mov esi, dword [sym.imp.MSVCRT.dll_sprintf]
push 0x43136c
stosw word es:[edi], ax
stosb byte es:[edi], al
push str.WINDOWS
lea eax, [esp + 0x70]
push str.C:_s_s
push eax
call esi
add esp, 0x10
lea ecx, [esp + 0x16c]
push str.WINDOWS
push str.C:_sqeriuwjhrf
push ecx
call esi
add esp, 0xc
lea edx, [esp + 0x16c]
lea eax, [esp + 0x68]
push 1
push edx
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
push ebx
push 4
push 2
push ebx
push ebx
lea ecx, [esp + 0x7c]
push 0x40000000
push ecx
call dword [0x431458]
mov esi, eax
cmp esi, 0xffffffff
je 0x407f08
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x10]
push ebx
push edx
push ebp
push eax
push esi
call dword [0x431460]
push esi
call dword [0x43144c]
xor ecx, ecx
xor eax, eax
mov dword [esp + 0x18], ecx
lea edi, [esp + 0x28]
mov dword [esp + 0x1c], ecx
lea edx, [esp + 0x68]
mov dword [esp + 0x20], ecx
mov ecx, 0x10
rep stosd dword es:[edi], eax
mov edi, 0x431340
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [esp + 0x14], ebx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
lea eax, [esp + 0x14]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x28]
lea edx, [esp + 0x6c]
push ecx
push ebx
push ebx
push 0x8000000
push ebx
push ebx
push ebx
push edx
push ebx
mov dword [esp + 0x4c], 0x44
mov word [esp + 0x7c], bx
mov dword [esp + 0x78], 0x81
call dword [0x431478]
test eax, eax
je 0x407f08
mov eax, dword [esp + 0x18]
push eax
call dword [0x43144c]
mov ecx, dword [esp + 0x14]
push ecx
call dword [0x43144c]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x260
ret
Function at 0x1001e05
Capabilities:
Query environment variable
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
or dword [ebp - 4], 0xffffffff
push ebx
push esi
mov esi, 0x105
push edi
push esi
mov dword [ebp - 0xc], esi
call fcn.01002169
push esi
mov edi, eax
call fcn.01002169
test edi, edi
pop ecx
pop ecx
mov ebx, eax
je 0x1001ef7
test ebx, ebx
je 0x1001eec
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x1001160
push 0x80000000
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x1001eec
lea eax, [ebp - 0xc]
push eax
push edi
lea eax, [ebp - 8]
push eax
push 0
push 0
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x1001eec
cmp dword [ebp - 8], 2
jne 0x1001e93
push esi
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
test eax, eax
je 0x1001eec
cmp dword [ebp - 8], 2
mov eax, ebx
je 0x1001e95
mov eax, edi
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push edi
mov esi, eax
call fcn.01002159
push ebx
call fcn.01002159
pop ecx
xor ebx, ebx
xor edi, edi
cmp dword [ebp - 4], 0xffffffff
pop ecx
je 0x1001ec3
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
or dword [ebp - 4], 0xffffffff
test esi, esi
je 0x1001f02
push 0x100114c
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x1001ee5
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call eax
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
test edi, edi
je 0x1001ef7
push edi
call fcn.01002159
pop ecx
test ebx, ebx
je 0x1001f02
push ebx
call fcn.01002159
pop ecx
cmp dword [ebp - 4], 0xffffffff
pop edi
pop esi
pop ebx
je 0x1001f14
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
leave
ret 0x10
Function at 0x1001f7c
Capabilities:
Accept command line arguments
Parse pe header

Disassembly:
push 0x60
push 0x10011a0
call fcn.01002f08
mov edi, 0x94
mov eax, edi
call fcn.01003070
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [esi], edi
push esi
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ecx, dword [esi + 0x10]
mov dword [0x10078d4], ecx
mov eax, dword [esi + 4]
mov dword [0x10078e0], eax
mov edx, dword [esi + 8]
mov dword [0x10078e4], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x10078d8], esi
cmp ecx, 2
je 0x1001fdc
or esi, 0x8000
mov dword [0x10078d8], esi
shl eax, 8
add eax, edx
mov dword [0x10078dc], eax
cmp word [0x1000000], 0x5a4d
jne 0x1002019
mov eax, dword [0x100003c]
cmp dword [eax + 0x1000000], 0x4550
jne 0x1002019
movzx ecx, word [eax + 0x1000018]
cmp ecx, 0x10b
je 0x1002032
cmp ecx, 0x20b
je 0x100201f
and dword [ebp - 0x1c], 0
jmp 0x1002049
cmp dword [eax + 0x1000084], 0xe
jbe 0x1002019
xor ecx, ecx
cmp dword [eax + 0x10000f8], ecx
jmp 0x1002043
cmp dword [eax + 0x1000074], 0xe
jbe 0x1002019
xor ecx, ecx
cmp dword [eax + 0x10000e8], ecx
setne cl
mov dword [ebp - 0x1c], ecx
push 1
call fcn.01002eab
pop ecx
test eax, eax
jne 0x100205d
push 0x1c
call fcn.01001f4e
pop ecx
call fcn.01002e1d
test eax, eax
jne 0x100206e
push 0x10
call fcn.01001f4e
pop ecx
and dword [ebp - 4], 0
call fcn.01002b67
test eax, eax
jge 0x1002083
push 0x1b
call fcn.01001f1f
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x10080d4], eax
call fcn.01002a3a
mov dword [0x10078c4], eax
call fcn.01002991
test eax, eax
jge 0x10020a9
push 8
call fcn.01001f1f
pop ecx
call fcn.01002737
test eax, eax
jge 0x10020ba
push 9
call fcn.01001f1f
pop ecx
call fcn.010021db
mov dword [ebp - 0x28], eax
test eax, eax
je 0x10020cd
push eax
call fcn.01001f1f
pop ecx
and dword [ebp - 0x44], 0
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.010026c9
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x10020ef
movzx eax, word [ebp - 0x40]
jmp 0x10020f2
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push 0
push 0x1000000
call fcn.01001e05
mov esi, eax
mov dword [ebp - 0x2c], esi
cmp dword [ebp - 0x1c], 0
jne 0x1002113
push esi
call fcn.010022cc
call fcn.01002304
jmp 0x1002145
or dword [ebp - 4], 0xffffffff
mov eax, esi
lea esp, [ebp - 0x7c]
call fcn.01002f43
ret
Function at 0x1002333
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x114
mov eax, dword [0x1007270]
mov ecx, dword [ebp + 8]
push ebx
push esi
mov dword [ebp - 4], eax
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x1007008]
je 0x100235d
inc eax
cmp eax, 0x12
jb 0x100234e
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x1007008]
mov dword [ebp - 0x110], esi
jne 0x1002508
mov eax, dword [0x10078cc]
cmp eax, 1
je 0x10024d6
test eax, eax
jne 0x1002393
cmp dword [0x1007004], 1
je 0x10024d6
cmp ecx, 0xfc
je 0x1002508
push 0x104
lea eax, [ebp - 0x10c]
push eax
push 0
mov byte [ebp - 8], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x10023ce
push 5
pop ecx
mov esi, 0x1001514
lea edi, [ebp - 0x10c]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea ebx, [ebp - 0x10c]
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10023d9
sub eax, edx
inc eax
cmp eax, 0x3c
jbe 0x1002411
lea eax, [ebp - 0x10c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10023f1
sub eax, edx
push 3
lea ebx, [ebp + eax - 0x147]
push 0x1001510
push ebx
call fcn.01003480
add esp, 0xc
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1002416
sub eax, edx
mov ecx, eax
mov eax, dword [ebp - 0x110]
mov eax, dword [eax + 0x100700c]
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x1002430
sub eax, esi
lea eax, [eax + ecx + 0x1c]
add eax, 3
and eax, 0xfffffffc
call fcn.01003070
mov edx, esp
push 6
pop ecx
mov esi, 0x10014f4
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov eax, ebx
movsw word es:[edi], word [esi]
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x100245c
mov edi, edx
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x1002468
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, edx
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x1002481
mov eax, dword [ebp - 0x110]
mov esi, 0x10014f0
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov eax, dword [eax + 0x100700c]
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x100249f
mov edi, edx
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x10024ab
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push 0x12010
mov ecx, eax
and ecx, 3
push 0x10014c8
push edx
rep movsb byte es:[edi], byte [esi]
call fcn.0100337d
add esp, 0xc
jmp 0x1002508
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
test eax, eax
je 0x1002508
mov esi, dword [esi + 0x100700c]
mov ecx, esi
lea edx, [ecx + 1]
mov bl, byte [ecx]
inc ecx
test bl, bl
jne 0x10024ed
push 0
sub ecx, edx
lea edx, [ebp - 0x114]
push edx
push ecx
push esi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea esp, [ebp - 0x120]
mov ecx, dword [ebp - 4]
call fcn.01005d2d
pop edi
pop esi
pop ebx
leave
ret
Function at 0x1002a3a
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x1007a28]
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
push edi
xor ebx, ebx
xor edi, edi
cmp eax, ebx
jne 0x1002a86
call esi
mov edi, eax
cmp edi, ebx
je 0x1002a6c
mov dword [0x1007a28], 1
jmp 0x1002a8b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x1002a81
push 2
pop eax
mov dword [0x1007a28], eax
jmp 0x1002a86
mov eax, dword [0x1007a28]
cmp eax, 1
jne 0x1002b03
cmp edi, ebx
jne 0x1002a97
call esi
mov edi, eax
cmp edi, ebx
je 0x1002b0c
cmp word [edi], bx
mov eax, edi
je 0x1002aac
inc eax
inc eax
cmp word [eax], bx
jne 0x1002a9e
inc eax
inc eax
cmp word [eax], bx
jne 0x1002a9e
mov esi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push ebx
push ebx
push ebx
sub eax, edi
push ebx
sar eax, 1
inc eax
push eax
push edi
push ebx
push ebx
mov dword [ebp - 0xc], eax
call esi
cmp eax, ebx
mov dword [ebp - 8], eax
je 0x1002afa
push eax
call fcn.010031db
cmp eax, ebx
pop ecx
mov dword [ebp - 4], eax
je 0x1002afa
push ebx
push ebx
push dword [ebp - 8]
push eax
push dword [ebp - 0xc]
push edi
push ebx
push ebx
call esi
test eax, eax
jne 0x1002af7
push dword [ebp - 4]
call fcn.010030b2
pop ecx
mov dword [ebp - 4], ebx
mov ebx, dword [ebp - 4]
push edi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
jmp 0x1002b5b
cmp eax, 2
je 0x1002b10
cmp eax, ebx
je 0x1002b10
xor eax, eax
jmp 0x1002b5d
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov esi, eax
cmp esi, ebx
mov dword [ebp - 4], esi
je 0x1002b0c
cmp byte [esi], bl
je 0x1002b2d
inc eax
cmp byte [eax], bl
jne 0x1002b23
inc eax
cmp byte [eax], bl
jne 0x1002b23
sub eax, esi
inc eax
mov edi, eax
push edi
call fcn.010031db
cmp eax, ebx
pop ecx
je 0x1002b54
mov ecx, edi
mov edx, ecx
shr ecx, 2
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp - 4]
mov ebx, eax
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret

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

Disassembly:
mov edi, edi
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [0x1007144]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x1002e0c
push 0x88
push 1
call fcn.01003b90
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x1002e04
push esi
push dword [0x1007144]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x1002e04
push esi
call fcn.01002d8d
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
or dword [esi + 4], 0xffffffff
mov dword [esi], eax
jmp 0x1002e0c
push 0x10
call fcn.01001f1f
pop ecx
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
mov eax, esi
pop esi
ret
Function at 0x1002e1d
Capabilities:
Allocate thread local storage
Set thread local storage value

Disassembly:
call fcn.010031f7
test eax, eax
je 0x1002e36
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [0x1007144], eax
jne 0x1002e3e
call fcn.01002d6a
xor eax, eax
ret
push esi
push 0x88
push 1
call fcn.01003b90
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x1002e7e
push esi
push dword [0x1007144]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x1002e7e
push esi
call fcn.01002d8d
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
or dword [esi + 4], 0xffffffff
mov dword [esi], eax
xor eax, eax
inc eax
pop esi
ret
call fcn.01002d6a
xor eax, eax
pop esi
ret

Function at 0x100337d
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x1007b80], ebx
push esi
push edi
jne 0x10033ff
push 0x10015b0
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x100343a
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x10015a4
push edi
call esi
test eax, eax
mov dword [0x1007b80], eax
je 0x100343a
push 0x1001594
push edi
call esi
push 0x1001580
push edi
mov dword [0x1007b84], eax
call esi
cmp dword [0x10078d4], 2
mov dword [0x1007b88], eax
jne 0x10033ff
push 0x1001564
push edi
call esi
test eax, eax
mov dword [0x1007b90], eax
je 0x10033ff
push 0x100154c
push edi
call esi
mov dword [0x1007b8c], eax
mov eax, dword [0x1007b8c]
test eax, eax
je 0x1003444
call eax
test eax, eax
je 0x100342b
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x1007b90]
test eax, eax
je 0x100342b
test byte [ebp - 8], 1
jne 0x1003444
cmp dword [0x10078e0], 4
jb 0x100343e
or byte [ebp + 0x12], 0x20
jmp 0x1003463
xor eax, eax
jmp 0x1003473
or byte [ebp + 0x12], 4
jmp 0x1003463
mov eax, dword [0x1007b84]
test eax, eax
je 0x1003463
call eax
mov ebx, eax
test ebx, ebx
je 0x1003463
mov eax, dword [0x1007b88]
test eax, eax
je 0x1003463
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x1007b80]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x10047de
Capabilities:
Parse pe header

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi + 8]
test bl, 3
jne 0x100480f
mov eax, dword fs:[4]
mov dword [ebp + 8], eax
mov eax, dword fs:[8]
mov dword [ebp - 4], eax
cmp ebx, dword [ebp - 4]
jb 0x1004816
cmp ebx, dword [ebp + 8]
jae 0x1004816
xor eax, eax
jmp 0x1004a06
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x1004827
xor eax, eax
inc eax
jmp 0x1004a05
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x100483d
cmp ecx, edx
jae 0x1004982
cmp dword [eax + 4], 0
je 0x1004846
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x100482e
cmp dword [ebp + 8], 0
je 0x1004868
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x1004982
cmp eax, esi
jae 0x1004982
mov eax, dword [0x1007ba8]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x100488d
cmp dword [esi*4 + 0x1007bb0], edi
je 0x1004986
inc esi
cmp esi, eax
jl 0x100487b
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x1004a02
cmp dword [ebp - 8], 0x1000000
jne 0x1004a02
test byte [ebp - 0xc], 0xcc
je 0x100490b
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x1004a02
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x1004a02
cmp word [eax + 0x18], 0x10b
jne 0x1004a02
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x1004a02
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x100490b
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x100490b
test byte [ecx + 0x27], 0x80
jne 0x1004982
push 1
push 0x1007bf0
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x100481f
mov ecx, dword [0x1007ba8]
test ecx, ecx
mov edx, ecx
jle 0x100493f
lea eax, [ecx*4 + 0x1007bac]
cmp dword [eax], edi
je 0x100493f
dec edx
sub eax, 4
test edx, edx
jg 0x1004933
test edx, edx
jne 0x1004970
push 0xf
pop ebx
cmp ecx, ebx
jg 0x100494c
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x1004964
lea eax, [edx*4 + 0x1007bb0]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x1004952
cmp ecx, 0x10
jge 0x1004970
inc ecx
mov dword [0x1007ba8], ecx
push 0
push 0x1007bf0
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x100481f
xor eax, eax
jmp 0x1004a05
test esi, esi
jle 0x100481f
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x1007bf0
call ebx
test eax, eax
jne 0x100481f
cmp dword [esi*4 + 0x1007bb0], edi
je 0x10049dc
mov eax, dword [0x1007ba8]
lea esi, [eax - 1]
test esi, esi
jl 0x10049ca
cmp dword [esi*4 + 0x1007bb0], edi
je 0x10049c6
dec esi
jns 0x10049ba
test esi, esi
jge 0x10049da
cmp eax, 0x10
jge 0x10049d5
inc eax
mov dword [0x1007ba8], eax
lea esi, [eax - 1]
jmp 0x10049dc
je 0x10049f4
xor ecx, ecx
test esi, esi
jl 0x10049f4
lea eax, [ecx*4 + 0x1007bb0]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x10049e2
push 0
push 0x1007bf0
call ebx
jmp 0x100481f
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x1005913
Capabilities:
Get system information on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x44
push ebx
push esi
push edi
push 4
pop eax
call fcn.01003070
mov ebx, esp
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x1005979
mov edi, dword [ebp - 0x1c]
lea eax, [ebp - 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [0x10078d4]
mov esi, dword [ebp - 0x40]
mov ecx, eax
dec ecx
neg ecx
sbb ecx, ecx
lea edx, [esi - 1]
and ecx, 0x103
not edx
and edx, ebx
inc ecx
sub edx, esi
dec eax
neg eax
sbb eax, eax
and eax, 0xfffffff1
add eax, 0x11
imul eax, esi
add eax, edi
cmp edx, eax
jae 0x100597d
xor eax, eax
jmp 0x100598a
lea eax, [ebp - 4]
push eax
push ecx
push esi
push edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x50]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x401f6e
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8c
mov eax, dword [0x415008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, ecx
mov esi, edi
xor ebx, ebx
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
cmp ax, bx
jne 0x401f8d
sub esi, ecx
mov ecx, edx
sar esi, 1
neg ecx
push 0x3f
sbb ecx, ecx
and ecx, 8
pop eax
sub eax, ecx
cmp esi, eax
ja 0x402001
test edx, edx
je 0x402052
cmp dword [0x4150cc], ebx
jne 0x403f03
push 0x402014
lea eax, [ebp - 0x84]
push 0x40
push eax
call dword [sym.imp.MSVCR120_CLR0400.dll_wcscpy_s]
add esp, 0xc
push edi
lea eax, [ebp - 0x84]
push 0x40
push eax
call dword [sym.imp.MSVCR120_CLR0400.dll_wcscat_s]
add esp, 0xc
lea eax, [ebp - 0x84]
push ebx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov edi, eax
test edi, edi
jne 0x402026
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00401f60
mov esp, ebp
pop ebp
ret
xor ecx, ecx
push 2
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
call fcn.004024e5
mov esi, eax
test esi, esi
je 0x40204e
push edi
push esi
lea eax, [ebp - 0x84]
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov eax, esi
jmp 0x402003
xor eax, eax
mov word [ebp - 0x84], ax
jmp 0x401fd9
lea eax, [ebp - 0x8c]
push eax
lea eax, [ebp - 0x88]
push eax
push ecx
push edi
call fcn.0040d596
mov eax, dword [ebp - 0x88]
mov ecx, dword [ebp - 0x8c]
test dword [eax*4 + 0x415900], ecx
jne 0x401fc2
jmp 0x402001
Function at 0x4024fb
Capabilities:
Query or enumerate registry value

Disassembly:
lea eax, [ebp - 0x10]
push eax
push 0x20019
push ebx
push 0x402470
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
inc ebx
test eax, eax
jne 0x4025ca
mov eax, dword [ebp - 0x10]
lea ecx, [ebp - 0x18]
push ecx
lea ecx, [ebp - 0x28]
push ecx
lea ecx, [ebp - 8]
push ecx
push 0
push edi
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cdq
mov edi, eax
mov eax, edx
mov dword [ebp - 0x20], eax
test ebx, ebx
jne 0x403fe2
or edi, eax
jne 0x4025ca
jmp 0x403ff3
push ebp
mov ebp, esp
sub esp, 0x28
push ebx
push esi
push edi
mov edi, ecx
mov esi, edx
mov dword [ebp - 4], edi
jmp 0x403f36
mov edi, dword [ebp - 4]
jmp 0x4025c1
mov edx, dword [ebp + 0x18]
call fcn.00401f6e
mov edi, eax
test edi, edi
jne 0x403f59
mov edi, dword [ebp - 4]
test bl, 0xe
je 0x4025ca
mov ecx, edi
call fcn.004010a7
test eax, eax
je 0x4025ca
test bl, 2
je 0x4025c1
mov eax, dword [0x41502c]
and dword [ebp - 0x14], 0
mov dword [ebp - 0xc], eax
cmp eax, 0xffffffff
jne 0x402584
lea eax, [ebp - 0xc]
push eax
push 0x20019
push 0
push 0x402470
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov dword [ebp - 0x14], 1
test eax, eax
jne 0x4025c1
mov eax, dword [ebp - 0xc]
lea ecx, [ebp - 0x18]
push ecx
lea ecx, [ebp - 0x28]
push ecx
lea ecx, [ebp - 8]
push ecx
push 0
push edi
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp dword [ebp - 0x14], 0
cdq
mov edi, eax
mov eax, edx
mov dword [ebp - 0x20], eax
je 0x4025b4
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x20]
or edi, eax
je 0x403fb3
jmp 0x402510
test bl, 4
jne 0x403fca
mov eax, dword [ebp + 8]
mov dword [esi], eax
mov eax, dword [ebp + 0xc]
mov dword [esi + 4], eax
mov eax, 0x80004005
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov ebx, dword [ebp + 0x14]
xor eax, eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 8], eax
mov dword [ebp - 0x18], 4
test bl, 1
jne 0x402518
jmp 0x40252d
call dword [sym.imp.MSVCR120_CLR0400.dll__errno]
push 0x10
and dword [eax], 0
lea eax, [ebp - 0x1c]
push eax
push edi
call dword [sym.imp.MSVCR120_CLR0400.dll_wcstoul]
add esp, 0xc
mov dword [ebp - 0x20], eax
call dword [sym.imp.MSVCR120_CLR0400.dll__errno]
cmp dword [eax], 0x22
je 0x403f8e
cmp dword [ebp - 0x1c], edi
je 0x403f8e
mov dword [ebp - 0x14], 1
jmp 0x403f92
and dword [ebp - 0x14], 0
mov edx, edi
call fcn.00402093
cmp dword [ebp - 0x14], 0
je 0x40252a
mov eax, dword [ebp - 0x20]
and dword [esi + 4], 0
mov dword [esi], eax
xor eax, eax
jmp 0x4025da
cmp dword [ebp - 8], 4
jne 0x402510
mov eax, dword [ebp - 0x28]
mov dword [esi], eax
mov eax, dword [ebp - 0x24]
mov dword [esi + 4], eax
jmp 0x403fac
mov eax, dword [0x415030]
xor ebx, ebx
mov dword [ebp - 0x10], eax
cmp eax, 0xffffffff
je 0x4010c4
jmp 0x4010ea
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x20]
jmp 0x401110
cmp dword [ebp - 8], 4
jne 0x4025ca
jmp 0x403fbd