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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.004106f4

Function at 0x410c7d
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.004052c0
mov eax, dword [0x427040]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
push dword [ebp + 8]
mov dword [ebp - 0x100c], eax
call fcn.0040f8e9
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x410cbf
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x410e1b
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.0041ad00
push dword [ebp - 0x100c]
mov ecx, ebx
mov dword [ebp - 0x1008], eax
mov esi, ebx
mov dword [ebp - 0x1018], edx
and ecx, 0x3f
sar esi, 6
imul edi, ecx, 0x38
push 0
mov eax, dword [esi*4 + 0x45ae50]
push dword [edi + eax + 0x24]
push dword [edi + eax + 0x20]
push ebx
call fcn.00411c74
mov ecx, dword [esi*4 + 0x45ae50]
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov eax, edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0x101c], eax
cmp edx, dword [edi + ecx + 0x20]
jne 0x410e14
cmp eax, dword [edi + ecx + 0x24]
jne 0x410e14
push 0
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push dword [edi + ecx + 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x410e14
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.00411c74
add esp, 0x14
test edx, edx
jl 0x410e14
jg 0x410d8a
test eax, eax
jb 0x410e14
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x410e14
jl 0x410da4
cmp dword [ebp - 0x1008], eax
ja 0x410e14
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x410dc2
test ebx, ebx
je 0x410dfb
cmp ecx, edi
jae 0x410dfb
mov al, byte [ecx]
cmp al, 0xd
jne 0x410ddc
lea eax, [edi - 1]
cmp ecx, eax
jae 0x410de8
cmp byte [ecx + 1], 0xa
jne 0x410de8
inc ecx
jmp 0x410de8
movzx eax, al
movsx eax, byte [eax + 0x4272f8]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x410dc2
cmp edx, ebx
jne 0x410dc2
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x410e19
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.00404791
leave
ret
Function at 0x411112
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
sar ecx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0x45ae50]
mov dword [ebp - 0x10], ecx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x411152
cmp byte [ebx], 0xa
jne 0x411152
or byte [eax + edi + 0x28], 4
jmp 0x411157
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x411255
mov al, byte [edx]
cmp al, 0x1a
je 0x411237
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x411186
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x4111ab
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x4111b5
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add edx, eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov ecx, dword [ebp - 0xc]
inc esi
cmp edx, ecx
jb 0x411168
jmp 0x411255
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x411232
cmp dword [ebp - 0xc], 0
je 0x411232
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x45ae50]
test byte [eax + edi + 0x28], 0x48
je 0x41120c
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x4111f7
mov byte [esi], dl
jmp 0x411208
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x45ae50]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x411255
cmp byte [ebp - 1], 0xa
jne 0x41121b
cmp esi, ebx
jne 0x41121b
mov byte [esi], 0xa
jmp 0x411254
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00411c92
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x411255
mov byte [esi], 0xd
jmp 0x411254
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x45ae50]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x411251
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x411255
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x41125e
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, eax
and eax, 0x3f
sar ebx, 6
push edi
imul edi, eax, 0x38
push 0xa
mov eax, dword [ebx*4 + 0x45ae50]
pop edx
mov dword [ebp - 0x14], edx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x4112a1
cmp word [esi], dx
jne 0x4112a1
or byte [edi + eax + 0x28], 4
jmp 0x4112a6
and byte [edi + eax + 0x28], 0xfb
lea edx, [esi + ecx*2]
mov eax, esi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
cmp eax, edx
jae 0x4113f9
mov dword [ebp - 0xc], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x10], edx
push 0x1a
pop edx
cmp cx, dx
mov edx, dword [ebp - 8]
je 0x4113d9
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x4112e8
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x41131e
cmp eax, edx
jae 0x41132a
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x14]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 8]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
add esi, 2
cmp eax, edx
jb 0x4112c0
jmp 0x4113f9
push 0
lea eax, [ebp - 0x14]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4113d5
cmp dword [ebp - 0x14], 0
je 0x4113d5
mov eax, dword [ebx*4 + 0x45ae50]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x4113ad
mov dx, word [ebp - 4]
lea eax, [esi + 2]
pop ecx
mov dword [ebp - 0x18], eax
cmp dx, cx
jne 0x411376
mov word [esi], cx
jmp 0x4113a9
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x45ae50]
movzx ecx, dx
shr ecx, 8
push 0xa
mov byte [edi + eax + 0x2a], dl
mov eax, dword [ebx*4 + 0x45ae50]
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x45ae50]
pop ecx
mov byte [edi + eax + 0x2c], cl
mov eax, dword [ebp - 0x18]
mov esi, eax
jmp 0x4113f9
pop ebx
cmp word [ebp - 4], bx
jne 0x4113be
cmp esi, dword [ebp + 0xc]
jne 0x4113be
mov word [esi], bx
jmp 0x4113f6
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.00411c92
add esp, 0x10
cmp word [ebp - 4], bx
je 0x4113f9
push 0xd
jmp 0x4113f2
mov ecx, dword [ebx*4 + 0x45ae50]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x4113f0
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x4113f9
push 0x1a
pop eax
mov word [esi], ax
add esi, 2
sub esi, dword [ebp + 0xc]
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x415056
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x4150f3
push ebx
push esi
call fcn.0041501f
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.00413ca4
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x4150a0
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x4150f2
push edi
push eax
call fcn.00411e71
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x4150c0
call fcn.0040ee48
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x4150f1
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.00413ca4
add esp, 0x20
test eax, eax
jne 0x4150df
push edi
call fcn.0040ee48
jmp 0x4150e7
push ebx
call fcn.0040ee48
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret

Function at 0x41acc0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x41aced
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x41aced
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret

Function at 0x41c217
Capabilities:
Allocate or change rwx memory
Create thread
Execute shellcode via indirect call
Spawn thread to rwx shellcode

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x427040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
call fcn.0040172b
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push str.Free
lea ecx, [ebp - 0x1c]
mov esi, eax
call fcn.004015b7
mov edi, str.Cons
push edi
call fcn.00408c70
pop ecx
push eax
push edi
lea ecx, [ebp - 0x1c]
call fcn.0040166a
mov edi, 0x423ea8
push edi
call fcn.00408c70
pop ecx
push eax
push edi
lea ecx, [ebp - 0x1c]
call fcn.0040166a
cmp dword [ebp - 8], 0xf
lea eax, [ebp - 0x1c]
cmova eax, dword [ebp - 0x1c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
call eax
mov edi, 0x4ac
xor ebx, ebx
push 0x40
push 0x1000
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov esi, eax
call section..bss
push edi
push 0x459ac0
push esi
call fcn.00405370
pop ecx
call fcn.0041c0a0
pop ecx
pop ecx
push ebx
push ebx
push 0x427ac0
lea eax, [esi + 0x188]
push eax
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
push ebx
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObjectEx]
lea ecx, [ebp - 0x1c]
call fcn.00401644
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00404791
leave
ret
Function at 0x965220
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, 0x788015
lea edi, [esi - 0x387015]
push edi
or ebp, 0xffffffff
jmp 0x965242
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x965249
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x965238
mov eax, 1
add ebx, ebx
jne 0x96525b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x96526c
jne 0x96528b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x96528b
dec eax
add ebx, ebx
jne 0x965278
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
jmp 0x965250
add ebx, ebx
jne 0x965287
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jmp 0x9652dd
xor ecx, ecx
sub eax, 3
jb 0x9652a3
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x965312
sar eax, 1
mov ebp, eax
jmp 0x9652ae
add ebx, ebx
jne 0x9652ae
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x96527c
inc ecx
add ebx, ebx
jne 0x9652bc
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x96527c
add ebx, ebx
jne 0x9652c9
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x9652be
jne 0x9652da
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x9652be
add ecx, 2
cmp ebp, 0xfffffb00
adc ecx, 2
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x9652fc
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x9652ee
jmp 0x96523e
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x9652fc
add edi, ecx
jmp 0x96523e
pop esi
mov edi, esi
mov ecx, 0xcda6
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x96531a
cmp byte [edi], 0x2f
jne 0x96531a
mov eax, dword [edi]
mov bl, byte [edi + 4]
shr ax, 8
rol eax, 0x10
xchg ah, al
sub eax, edi
sub bl, 0xe8
add eax, esi
mov dword [edi], eax
add edi, 5
mov al, bl
loop 0x96531f
lea edi, [esi + 0x555000]
mov eax, dword [edi]
or eax, eax
je 0x96538e
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x565000]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x565028]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x96534c
mov ecx, edi
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x565030]
or eax, eax
je 0x965388
mov dword [ebx], eax
add ebx, 4
jmp 0x965369
call dword [esi + 0x56502c]
add edi, 4
lea ebx, [esi - 4]
xor eax, eax
mov al, byte [edi]
inc edi
or eax, eax
je 0x9653c8
cmp al, 0xef
ja 0x9653b2
add ebx, eax
mov eax, dword [ebx]
xchg ah, al
rol eax, 0x10
xchg ah, al
add eax, esi
mov dword [ebx], eax
jmp 0x965394
and al, 0xf
shl eax, 0x10
mov ax, word [edi]
add edi, 2
or eax, eax
jne 0x9653a1
mov eax, dword [edi]
add edi, 4
jmp 0x9653a1
mov ebp, dword [esi + 0x565034]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x19f]
and byte [eax], 0x7f
and byte [eax + 0x28], 0x7f
pop eax
push eax
push esp
push eax
push ebx
push edi
call ebp
pop eax
popal
lea eax, [esp - 0x80]
push 0
cmp esp, eax
jne 0x9653fc
sub esp, 0xffffff80
jmp 0x469390
Function at 0x409ec4
Capabilities:
Create process on windows
Create process suspended

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffa8
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 4], ebx
mov edi, ecx
mov esi, edx
mov ebx, eax
xor eax, eax
push ebp
push 0x409f97
push dword fs:[eax]
mov dword fs:[eax], esp
push 0x409fb0
push ebx
push 0x409fbc
push esi
lea eax, [ebp - 4]
mov edx, 4
call fcn.004033b4
lea eax, [ebp - 0x48]
xor ecx, ecx
mov edx, 0x44
call fcn.0040277c
mov dword [ebp - 0x48], 0x44
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x48]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
mov eax, dword [ebp - 4]
call fcn.00403414
push eax
push 0
call sub.kernel32.dll_CreateProcessA
test eax, eax
jne 0x409f44
mov al, 0x6a
call fcn.00409b20
mov eax, dword [ebp - 0x54]
push eax
call sub.kernel32.dll_CloseHandle_1
call fcn.00409e98
push 0xff
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x58]
push eax
push 1
call sub.user32.dll_MsgWaitForMultipleObjects
dec eax
je 0x409f4d
call fcn.00409e98
push edi
mov eax, dword [ebp - 0x58]
push eax
call sub.kernel32.dll_GetExitCodeProcess
mov eax, dword [ebp - 0x58]
push eax
call sub.kernel32.dll_CloseHandle_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x409f9e
lea eax, [ebp - 4]
call fcn.00403198
ret

Function at 0x40a050
Capabilities:
Allocate or change rwx memory
Get system information on windows

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffffbc
mov edi, eax
lea esi, [esp + 0x28]
lea eax, [esp + 4]
push eax
call sub.kernel32.dll_GetSystemInfo
mov ebx, edi
push 0x1c
push esi
push ebx
call sub.kernel32.dll_VirtualQuery
test eax, eax
je 0x40a104
jmp 0x40a0f9
cmp dword [esi + 0x10], 0x1000
jne 0x40a0e5
test byte [esi + 0x15], 1
jne 0x40a0e5
xor ebx, ebx
mov eax, dword [esi + 0x14]
cmp eax, 1
je 0x40a0a4
cmp eax, 2
je 0x40a0a4
cmp eax, 0x10
je 0x40a0a4
cmp eax, 0x20
jne 0x40a0b9
push esp
push 0x40
mov eax, dword [esi + 0xc]
push eax
mov eax, dword [esi]
push eax
call sub.kernel32.dll_VirtualProtect
test eax, eax
je 0x40a0b9
mov bl, 1
xor ebp, ebp
jmp 0x40a0ca
mov eax, dword [esi]
add eax, ebp
call fcn.0040a048
add ebp, dword [esp + 8]
cmp ebp, dword [esi + 0xc]
jb 0x40a0bd
test bl, bl
je 0x40a0e5
push esp
mov eax, dword [esp + 4]
push eax
mov eax, dword [esi + 0xc]
push eax
mov eax, dword [esi]
push eax
call sub.kernel32.dll_VirtualProtect
mov eax, dword [esi]
add eax, dword [esi + 0xc]
mov ebx, eax
push 0x1c
push esi
push ebx
call sub.kernel32.dll_VirtualQuery
test eax, eax
je 0x40a104
mov eax, dword [esi + 4]
cmp eax, edi
je 0x40a07c
add esp, 0x44
pop ebp
pop edi
pop esi
pop ebx
ret

Function at 0x5623e2
Capabilities:
Decompress data using aplib

Disassembly:
push ebp
mov ebp, esp
pushal
push ebp
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
cld
mov dl, 0x80
Function at 0x401f40
Capabilities:
Check os version

Disassembly:
sub esp, 0x114
push edi
mov ecx, 0x44
xor eax, eax
lea edi, [esp + 8]
rep stosd dword es:[edi], eax
lea eax, [esp + 4]
mov dword [esp + 4], 0x114
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
mov eax, dword [esp + 8]
pop edi
cmp eax, 5
jne 0x401f85
mov eax, dword [esp + 8]
test eax, eax
jne 0x401f85
mov eax, 1
add esp, 0x114
ret
xor eax, eax
add esp, 0x114
ret
Function at 0x404450
Capabilities:
Get common file path
Set environment variable
Set registry value

Disassembly:
sub esp, 0x544
push ebx
push edi
xor ebx, ebx
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x2a]
mov word [esp + 0x28], bx
push str.ntdll.dll
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
cmp eax, ebx
jne 0x4044b9
lea eax, [esp + 0x344]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea ecx, [esp + 0x344]
push str.ntdll.dll
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea edx, [esp + 0x344]
push edx
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
cmp eax, ebx
je 0x40453b
push str.RtlGetVersion
push eax
mov dword [esp + 0x238], 0x114
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x40453b
lea ecx, [esp + 0x230]
push ecx
call eax
test eax, eax
jl 0x40453b
mov eax, dword [esp + 0x234]
cmp eax, 5
jne 0x404500
mov ecx, dword [esp + 0x238]
mov eax, 1
cmp ecx, eax
jne 0x40453b
jmp switch.0x0040453d
cmp eax, 6
jne 0x40453b
mov eax, dword [esp + 0x238]
cmp eax, ebx
jne 0x404517
mov eax, 2
jmp switch.0x0040453d
cmp eax, 1
jne 0x404523
mov eax, 3
jmp switch.0x0040453d
cmp eax, 2
jne 0x40452f
mov eax, 4
jmp switch.0x0040453d
cmp eax, 3
jne 0x40453b
mov eax, 5
jmp switch.0x0040453d
xor eax, eax
jmp dword [eax*4 + 0x4046a4]
push ebx
lea edx, [esp + 0x2c]
push 0x28
push edx
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x404699
push str.Local_SettingsTemp
jmp 0x404597
push ebx
lea ecx, [esp + 0x2c]
push 0x1a
push ecx
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x404699
lea edx, [esp + 0x28]
push str.LocalTemp
push edx
jmp 0x40459c
mov ecx, 0x82
xor eax, eax
lea edi, [esp + 0x28]
push str.C:Temp
rep stosd dword es:[edi], eax
lea eax, [esp + 0x2c]
push eax
call fcn.004419ec
add esp, 8
lea ecx, [esp + 0x28]
push ecx
push 0x4603d8
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
test eax, eax
je 0x404699
mov edx, 0x4603d8
test edx, edx
je 0x404699
lea eax, [esp + 0x28]
test eax, eax
je 0x404699
cmp word [0x4603d8], bx
je 0x404699
cmp word [esp + 0x28], bx
je 0x404699
lea ecx, [esp + 8]
push ebp
push ecx
push 0xf003f
push ebx
push str.Environment
push 0x80000001
mov dword [esp + 0x20], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov ecx, dword [esp + 0xc]
neg eax
sbb eax, eax
not eax
and eax, ecx
mov ebp, eax
je 0x40468d
lea edx, [esp + 0x2c]
push edx
call fcn.00441905
add esp, 4
lea eax, [eax + eax + 2]
push eax
lea eax, [esp + 0x30]
push eax
push 2
push ebx
push 0x4603d8
push ebp
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ebx, eax
neg ebx
sbb ebx, ebx
inc ebx
je 0x404686
push esi
mov ecx, 6
mov esi, str.Environment
lea edi, [esp + 0x18]
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x14]
lea edx, [esp + 0x18]
push ecx
push 0xbb8
push 1
push edx
push 0
push 0x1a
push 0xffff
mov dword [esp + 0x30], 0
call dword [sym.imp.USER32.dll_SendMessageTimeoutW]
pop esi
push ebp
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop ebp
mov eax, ebx
pop edi
pop ebx
add esp, 0x544
ret
pop edi
xor eax, eax
pop ebx
add esp, 0x544
ret
Function at 0x4046c0
Capabilities:
Allocate or change rwx memory

Disassembly:
push 0xffffffffffffffff
push 0x454042
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
push esi
push edi
mov esi, ecx
xor edi, edi
mov dword [esp + 0xc], esi
mov dword [esi + 4], edi
mov dword [esi + 0x18], edi
lea eax, [esi + 0x1c]
mov dword [esp + 0x18], edi
cmp eax, edi
je 0x4046f8
lea ecx, [eax - 0x1c]
jmp 0x4046fa
xor ecx, ecx
push eax
add ecx, 8
push 0x40
push 0xd
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov dword [esi + 0x24], edi
mov dword [esi + 0x28], edi
mov dword [esi + 0x2c], edi
mov dword [esi + 0x30], edi
mov dword [esi + 0x34], edi
mov dword [esi + 0x38], edi
lea ecx, [esi + 0x3c]
mov byte [esp + 0x18], 3
call fcn.0040d830
mov dword [esi + 0x88], edi
lea ecx, [esi + 0x8c]
mov byte [esp + 0x18], 5
call fcn.0040f1b0
mov al, byte [esp + 0xb]
mov ecx, dword [esp + 0x10]
mov dword [esi + 0xd4], edi
mov byte [esi + 0xd8], al
mov dword [esi + 0xdc], edi
mov dword [esi + 0xe0], edi
mov dword [esi + 0xe4], edi
mov dword [esi + 0xec], edi
mov dword [esi], 0x4585a0
mov eax, esi
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x14
ret
Function at 0x405030
Capabilities:
Get disk information

Disassembly:
sub esp, 0x808
push esi
mov esi, dword [esp + 0x810]
push edi
mov edx, dword [esi + 8]
mov ecx, dword [esi + 4]
mov eax, edx
cmp eax, edx
je 0x40505b
mov di, word [eax]
add eax, 2
mov word [ecx], di
add ecx, 2
cmp eax, edx
jne 0x40504b
mov eax, dword [esi + 8]
mov dword [esi + 8], ecx
mov dword [esp + 0xc], eax
mov ecx, 0x200
xor eax, eax
lea edi, [esp + 0x10]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x10]
push ecx
push 0x400
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsW]
test eax, eax
jne 0x405091
pop edi
pop esi
add esp, 0x808
ret 4
cmp word [esp + 0x10], 0
push ebx
lea ebx, [esp + 0x14]
mov dword [esp + 0xc], ebx
je 0x405227
push ebp
jmp 0x4050ad
mov ebx, dword [esp + 0x10]
push ebx
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 3
jne 0x40520b
mov eax, dword [esi + 8]
mov edx, dword [esi + 0xc]
sub edx, eax
mov edi, eax
sar edx, 1
cmp edx, 1
jae 0x40517b
mov edx, dword [esi + 4]
test edx, edx
je 0x4050e4
mov ecx, eax
sub ecx, edx
sar ecx, 1
cmp ecx, 1
ja 0x4050e9
mov ecx, 1
test edx, edx
jne 0x4050f1
xor eax, eax
jmp 0x4050f5
sub eax, edx
sar eax, 1
add eax, ecx
test eax, eax
mov dword [esp + 0x14], eax
jge 0x405101
xor eax, eax
add eax, eax
push eax
call fcn.00440c16
mov ecx, dword [esi + 4]
add esp, 4
mov ebx, eax
push ebx
push edi
push ecx
mov ecx, esi
call fcn.00407410
mov edx, dword [esp + 0x10]
mov ebp, eax
push edx
push 1
push ebp
mov ecx, esi
call fcn.00407440
mov eax, dword [esi + 8]
add ebp, 2
push ebp
push eax
push edi
mov ecx, esi
call fcn.00407410
mov ecx, dword [esi + 8]
mov edx, dword [esi + 4]
push ecx
push edx
mov ecx, esi
call fcn.00406d80
mov eax, dword [esi + 4]
push eax
call fcn.00439890
mov ecx, dword [esp + 0x18]
add esp, 4
lea edx, [ebx + ecx*2]
mov ecx, esi
mov dword [esi + 0xc], edx
call fcn.00406a30
lea eax, [ebx + eax*2 + 2]
mov dword [esi + 4], ebx
mov ebx, dword [esp + 0x10]
mov dword [esi + 8], eax
jmp 0x40520b
mov ecx, eax
sub ecx, edi
sar ecx, 1
cmp ecx, 1
jae 0x4051c5
lea ecx, [edi + 2]
push ecx
push eax
push edi
mov ecx, esi
call fcn.00407410
mov eax, dword [esi + 8]
mov ecx, 1
mov edx, eax
push ebx
sub edx, edi
sar edx, 1
sub ecx, edx
push ecx
push eax
mov ecx, esi
call fcn.00407440
mov ecx, dword [esi + 8]
mov eax, edi
cmp edi, ecx
je 0x405207
mov dx, word [ebx]
mov word [eax], dx
add eax, 2
cmp eax, ecx
jne 0x4051b6
jmp 0x405207
lea ecx, [eax - 2]
push eax
push eax
mov dword [esp + 0x1c], ecx
push ecx
mov ecx, esi
call fcn.00407410
mov ecx, dword [esi + 8]
lea eax, [ecx - 2]
cmp edi, eax
je 0x4051f1
mov dx, word [eax - 2]
sub eax, 2
sub ecx, 2
cmp eax, edi
mov word [ecx], dx
jne 0x4051e0
lea ecx, [edi + 2]
mov eax, edi
cmp edi, ecx
je 0x405207
mov dx, word [ebx]
mov word [eax], dx
add eax, 2
cmp eax, ecx
jne 0x4051fa
add dword [esi + 8], 2
push ebx
call fcn.00441905
lea eax, [ebx + eax*2 + 2]
add esp, 4
mov dword [esp + 0x10], eax
cmp word [eax], 0
jne 0x4050a9
pop ebp
pop ebx
pop edi
mov eax, 1
pop esi
add esp, 0x808
ret 4