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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
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 + 0x10030aa0]
mov dword [ebp - 0xc], ecx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x10018cbf
cmp byte [ebx], 0xa
jne 0x10018cbf
or byte [edi + eax + 0x28], 4
jmp 0x10018cc4
and byte [edi + eax + 0x28], 0xfb
add ecx, ebx
mov eax, ebx
mov dword [ebp - 0x10], ecx
mov esi, ebx
mov dword [ebp - 8], eax
cmp ebx, ecx
jae 0x10018dc3
mov dl, byte [eax]
cmp dl, 0x1a
je 0x10018da6
inc eax
cmp dl, 0xd
je 0x10018cf0
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x10018d16
cmp eax, ecx
jae 0x10018d24
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add dword [ebp - 8], eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
xor edx, edx
inc edx
add esi, edx
cmp eax, ecx
jb 0x10018cd8
jmp 0x10018dc3
push 0
lea eax, [ebp - 0x10]
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 0x10018da1
cmp dword [ebp - 0x10], 0
je 0x10018da1
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x10030aa0]
test byte [eax + edi + 0x28], 0x48
je 0x10018d7b
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x10018d66
mov byte [esi], dl
jmp 0x10018d77
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x10030aa0]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x10018dc3
cmp byte [ebp - 1], 0xa
jne 0x10018d8a
cmp esi, ebx
jne 0x10018d8a
mov byte [esi], 0xa
jmp 0x10018dc2
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.10019805
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x10018dc3
mov byte [esi], 0xd
jmp 0x10018dc2
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x10030aa0]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x10018dc0
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x10018dc3
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x10018dcc
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
push esi
sar ecx, 6
push edi
imul edi, eax, 0x38
mov dword [ebp - 8], ecx
mov eax, dword [ecx*4 + 0x10030aa0]
push 0xa
pop edx
mov dword [ebp - 0x18], edx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x10018e12
cmp word [ebx], dx
jne 0x10018e12
or byte [eax + edi + 0x28], 4
jmp 0x10018e17
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + ecx*2]
mov eax, ebx
mov dword [ebp - 0xc], edx
mov esi, ebx
mov dword [ebp - 4], eax
cmp ebx, edx
jae 0x10018f7a
mov dword [ebp - 0x10], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x14], edx
mov edx, dword [ebp - 0xc]
cmp ecx, 0x1a
je 0x10018f5a
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x10018e58
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x10018e8e
cmp eax, edx
jae 0x10018e9c
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x18]
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 - 0xc]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
push 2
pop ecx
add esi, ecx
cmp eax, edx
jb 0x10018e33
jmp 0x10018f7a
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10018f55
cmp dword [ebp - 0x18], 0
je 0x10018f55
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x10030aa0]
test byte [eax + edi + 0x28], 0x48
je 0x10018f2b
lea eax, [esi + 2]
mov dword [ebp - 0x1c], eax
mov ax, word [ebp - 4]
pop ecx
mov word [ebp - 2], ax
cmp ax, cx
jne 0x10018eef
mov word [esi], cx
jmp 0x10018f26
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x10030aa0]
mov dx, word [ebp - 2]
shr ecx, 8
push 0xa
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x10030aa0]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x10030aa0]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x10018f7a
pop eax
cmp word [ebp - 4], ax
jne 0x10018f3b
cmp esi, ebx
jne 0x10018f3b
mov word [esi], ax
jmp 0x10018f77
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.10019805
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x10018f7a
push 0xd
pop eax
jmp 0x10018f36
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x10030aa0]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x10018f74
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x10018f7a
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x1001db21
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 0x1001dbbe
push ebx
push esi
call fcn.1001daea
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.1001a892
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x1001db6b
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x1001dbbd
push edi
push eax
call fcn.1001a6f2
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x1001db8b
call fcn.100166ff
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x1001dbbc
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.1001a892
add esp, 0x20
test eax, eax
jne 0x1001dbaa
push edi
call fcn.100166ff
jmp 0x1001dbb2
push ebx
call fcn.100166ff
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 0x1001dbc1
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x1001dbd2
pop esi
ret
push ebx
push edi
push esi
call fcn.1001daea
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.1001a6f2
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x1001dbfa
push ebx
push esi
push edi
call fcn.1000c650
add esp, 0xc
push 0
call fcn.100166ff
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x1001dfca
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.1001dc0f

Function at 0x1002024f
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push esi
push edi
call fcn.10014d4c
mov esi, dword [ebp + 8]
mov edi, eax
push 2
lea eax, [ebp - 4]
mov ecx, esi
push eax
and ecx, 0x3ff
push 0x20000001
or ecx, 0x400
push ecx
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x100202be
cmp esi, dword [ebp - 4]
je 0x100202b9
cmp dword [ebp + 0xc], 0
je 0x100202b9
mov esi, dword [edi + 0x50]
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x10020296
push dword [edi + 0x50]
sub esi, ecx
sar esi, 1
call fcn.1001fda1
pop ecx
xor ecx, ecx
cmp eax, esi
setne cl
mov eax, ecx
jmp 0x100202c0
xor eax, eax
inc eax
jmp 0x100202c0
xor eax, eax
pop edi
pop esi
leave
ret
Function at 0x10020325
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x1002f080]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 0x18], eax
call fcn.10014d4c
add eax, 0x50
lea edi, [ebp - 0x10]
mov dword [ebp - 0x14], eax
xor eax, eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
call fcn.10014d4c
lea ecx, [ebp - 0x10]
xor edx, edx
mov dword [eax + 0x34c], ecx
lea ecx, [esi + 0x80]
mov eax, dword [ebp - 0x14]
mov dword [eax], esi
lea edi, [eax + 4]
mov dword [edi], ecx
test ecx, ecx
je 0x1002039c
cmp word [ecx], dx
je 0x1002039c
mov eax, dword [0x100290a4]
push edi
dec eax
push eax
push 0x10028f90
call fcn.100202c4
mov eax, dword [ebp - 0x14]
add esp, 0xc
xor edx, edx
mov dword [ebp - 0x10], edx
mov eax, dword [eax]
test eax, eax
je 0x1002040f
cmp word [eax], dx
je 0x1002040f
mov eax, dword [edi]
test eax, eax
je 0x100203c0
cmp word [eax], dx
je 0x100203c0
lea eax, [ebp - 0x10]
push eax
call fcn.1001fca7
jmp 0x100203c9
lea eax, [ebp - 0x10]
push eax
call fcn.1001fd42
cmp dword [ebp - 0x10], 0
pop ecx
jne 0x10020439
mov eax, dword [0x10028f8c]
push dword [ebp - 0x14]
dec eax
push eax
push 0x10028c80
call fcn.100202c4
add esp, 0xc
test al, al
je 0x10020439
mov eax, dword [edi]
xor edi, edi
test eax, eax
je 0x10020404
cmp word [eax], di
je 0x10020404
lea eax, [ebp - 0x10]
push eax
call fcn.1001fca7
pop ecx
jmp 0x1002043b
lea eax, [ebp - 0x10]
push eax
call fcn.1001fd42
jmp 0x10020401
mov eax, dword [edi]
test eax, eax
je 0x10020426
cmp word [eax], dx
je 0x10020426
lea eax, [ebp - 0x10]
push eax
call fcn.1001fc5c
pop ecx
jmp 0x10020439
mov dword [ebp - 0x10], 0x104
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLCID]
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], eax
xor edi, edi
cmp dword [ebp - 0x10], 0
je 0x10020504
lea eax, [ebp - 0x10]
push eax
lea eax, [esi + 0x100]
neg esi
sbb esi, esi
and esi, eax
push esi
call fcn.10020149
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x10020504
movzx ecx, si
push ecx
call dword [sym.imp.KERNEL32.dll_IsValidCodePage]
test eax, eax
je 0x10020504
push 1
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_IsValidLocale]
test eax, eax
je 0x10020504
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x10020491
mov dword [eax], esi
mov eax, dword [ebp - 0x14]
push edi
push 0x55
add eax, 0x250
push eax
push dword [ebp - 0xc]
call fcn.10016e69
test ebx, ebx
je 0x100204ff
push edi
push 0x55
lea eax, [ebx + 0x120]
push eax
push dword [ebp - 0xc]
call fcn.10016e69
push 0x40
push ebx
push 0x1001
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x10020504
push 0x40
lea eax, [ebx + 0x80]
push eax
push 0x1002
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x10020504
push 0xa
push 0x10
lea ecx, [ebx + 0x100]
push ecx
push esi
call fcn.10022881
add esp, 0x10
xor eax, eax
inc eax
jmp 0x10020506
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10009f17
leave
ret
Function at 0x10022da1
Capabilities:
Clear file content

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 0x2c]
push esi
push edi
push dword [ebp + 0x10]
mov edi, dword [ebp + 0x14]
push dword [ebp + 0xc]
push ebx
call fcn.10022d1d
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x10022f10
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x10022f10
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x10022ec5
jg 0x10022dfd
test eax, eax
je 0x10022ebb
push 1
push 0x1000
call fcn.10016739
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x10022e20
push 0xc
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x10022eb2
push 0x8000
push ebx
call fcn.10022c4e
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x10022e49
jg 0x10022e44
cmp ecx, 0x1000
jb 0x10022e49
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.10018039
add esp, 0x10
cmp eax, 0xffffffff
je 0x10022e8e
mov ecx, dword [ebp - 4]
cdq
sub ecx, eax
mov eax, dword [ebp - 8]
mov dword [ebp - 4], ecx
sbb eax, edx
mov dword [ebp - 8], eax
test eax, eax
jg 0x10022e44
jl 0x10022e75
test ecx, ecx
jne 0x10022e36
push dword [ebp - 0xc]
push ebx
call fcn.10022c4e
push esi
call fcn.100166ff
add esp, 0xc
xor ebx, ebx
jmp 0x10022f1e
cmp byte [edi + 0x24], 0
je 0x10022ea5
cmp dword [edi + 0x20], 5
jne 0x10022ea5
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x10022eb0
mov ebx, dword [edi + 0x18]
jmp 0x10022eb2
xor ebx, ebx
push esi
call fcn.100166ff
pop ecx
jmp 0x10022f1e
test ecx, ecx
jg 0x10022e87
jl 0x10022ec5
test eax, eax
jae 0x10022e87
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.10019805
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x10022ee5
cmp byte [edi + 0x1c], 0
je 0x10022e87
jmp 0x10022f16
push ebx
call fcn.10020a05
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x10022e87
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xd
mov byte [edi + 0x24], 1
mov dword [edi + 0x20], eax
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x10022f1e
cmp byte [edi + 0x1c], 0
je 0x10022f1b
mov ebx, dword [edi + 0x18]
jmp 0x10022f1e
push 0x16
pop ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.10019805
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x10024280
Capabilities:
Parse pe header

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

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [0x418760]
sub esp, 0x904
push ebx
xor ebx, ebx
cmp eax, ebx
push esi
push edi
je 0x401036
cmp word [0x418762], bx
je 0x401027
call eax
mov dword [0x418760], eax
push eax
call fcn.004021b3
push eax
call fcn.00408cee
pop ecx
jmp 0x4010a4
push 0x27
call fcn.004021b3
mov esi, dword [ebp + 8]
push dword [esi + 0xc]
mov edi, dword [sym.imp.USER32.dll_wsprintfW]
push dword [esi]
push eax
lea eax, [ebp - 0x904]
push eax
call edi
add esp, 0x14
cmp dword [esi + 0x10], ebx
mov dword [ebp - 4], ebx
jbe 0x401098
lea ebx, [esi + 0x14]
push dword [ebx]
lea eax, [ebp - 0x104]
push str._t0x_p_n
push eax
call edi
add esp, 0xc
lea eax, [ebp - 0x104]
push eax
lea eax, [ebp - 0x904]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
inc dword [ebp - 4]
mov eax, dword [ebp - 4]
add ebx, 4
cmp eax, dword [esi + 0x10]
jb 0x401063
lea eax, [ebp - 0x904]
push eax
call fcn.00408cee
pop ecx
call fcn.004044dc
push 0xa
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x40163d
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
push dword [ebp + 8]
mov esi, ecx
lea ecx, [esi + 8]
call fcn.0040114b
push dword [ebp + 0xc]
lea edi, [esi + 0xc]
mov ecx, edi
call fcn.0040139c
push 0x5c
mov ecx, edi
call fcn.00401552
xor edi, edi
lea eax, [ebp - 4]
push eax
push edi
push esi
push 0x40130f
push edi
push edi
mov dword [0x418764], esi
mov dword [0x41876c], edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp dword [0x4187ac], 2
mov dword [0x418768], eax
je 0x40169a
call fcn.00408532
push 0xffffffffffffffff
push dword [0x418768]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [0x41876c]
cmp eax, edi
mov dword [0x418840], edi
je 0x4016e9
cmp eax, 1
je 0x4016dd
cmp eax, 2
je 0x4016d9
cmp eax, 3
je 0x4016d5
cmp eax, 0x67
jle 0x4016d0
cmp eax, 0x6a
jle 0x40174d
push eax
push 0x14
jmp 0x401720
push 0x12
jmp 0x4016df
push 0x13
jmp 0x4016df
push 0x11
push edi
call fcn.00408dd2
pop ecx
pop ecx
jmp 0x40174d
cmp dword [0x418848], edi
jne 0x40174d
lea eax, [ebp + 8]
push eax
push dword [0x418768]
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
mov ecx, dword [ebp + 8]
je 0x401710
cmp ecx, edi
jne 0x401710
xor eax, eax
jmp 0x401752
mov eax, 0x80070000
mov edx, ecx
and edx, eax
cmp edx, eax
je 0x401723
push ecx
push 0x21
push edi
jmp 0x401745
and ecx, 0xffff
cmp ecx, 0xe
jne 0x401737
cmp dword [0x4187b0], 0xffffffff
je 0x40174d
push ecx
call dword [sym.imp.KERNEL32.dll_SetLastError]
push dword [ebp + 8]
push 0x22
push 1
call fcn.00408dd2
add esp, 0xc
mov eax, 0x80004005
pop edi
pop esi
leave
ret 8
Function at 0x401ba1
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push esi
push 0
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x401be2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, 0xb7
cmp eax, esi
je 0x401bcc
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop esi
ret
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x401be2
test al, 0x10
jne 0x401be2
push esi
jmp 0x401bc2
xor eax, eax
inc eax
pop esi
ret

Function at 0x401df5
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
push ebx
push esi
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov esi, dword [sym.imp.KERNEL32.dll_FindResourceExA]
mov ebx, eax
movzx eax, word [0x418770]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call esi
mov edi, eax
test edi, edi
jne 0x401e39
push 0x409
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call esi
mov edi, eax
test edi, edi
je 0x401e5f
mov esi, dword [ebp + 0x10]
test esi, esi
je 0x401e4a
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [esi], eax
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x401e5f
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
jmp 0x401ed9
cmp dword [0x418780], 0
jne 0x401ed7
mov esi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push str.SetProcessPreferredUILanguages
mov ebx, str.kernel32
push ebx
mov dword [0x418780], 1
call esi
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call edi
push 0
mov dword [ebp - 4], eax
movzx eax, word [0x418770]
push 0x409
push 0
push eax
lea eax, [ebp - 0x44]
push str._04X_c_04X_c
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x18
cmp dword [ebp - 4], 0
jne 0x401ecc
push str.SetThreadPreferredUILanguages
push ebx
call esi
push eax
call edi
test eax, eax
mov dword [ebp - 4], eax
je 0x401ed7
push 0
lea eax, [ebp - 0x44]
push eax
push 4
call dword [ebp - 4]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4021b3
Capabilities:
Get geographical location
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa8
push ebx
push esi
xor ebx, ebx
xor esi, esi
cmp dword [0x418080], ebx
je 0x4021e6
mov eax, 0x418080
mov ecx, dword [ebp + 8]
cmp dword [eax], ecx
je 0x4021e6
inc esi
mov eax, esi
shl eax, 4
lea eax, [eax + 0x418080]
cmp dword [eax], ebx
jne 0x4021cf
shl esi, 4
cmp dword [esi + 0x418080], ebx
jne 0x4021fb
mov eax, 0x4144c8
jmp 0x40236d
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
push dword [ebp + 8]
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x68]
push str.7zSfxString_d
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push ebx
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea eax, [ebp - 0x68]
push eax
call ebx
mov dword [ebp - 4], eax
call edi
test eax, eax
jne 0x4022ab
mov eax, dword [ebp - 4]
xor ecx, ecx
push 2
add eax, 2
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov ecx, dword [ebp - 4]
inc ecx
push ecx
push eax
mov dword [ebp - 8], eax
lea eax, [ebp - 0x68]
push eax
call ebx
cmp eax, dword [ebp - 4]
ja 0x4022a2
call edi
test eax, eax
jne 0x4022a2
mov eax, dword [esi + 0x41808c]
test eax, eax
je 0x402297
mov edi, dword [ebp - 8]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x402294
push dword [esi + 0x41808c]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
mov dword [esi + 0x41808c], edi
jmp 0x4022aa
push edi
jmp 0x4022a5
mov eax, dword [ebp - 8]
mov dword [esi + 0x41808c], eax
jmp 0x4022ab
push dword [ebp - 8]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [esi + 0x41808c]
test eax, eax
jne 0x40236c
mov ebx, dword [esi + 0x418084]
lea edi, [esi + 0x418088]
cmp dword [edi], eax
je 0x4022e1
call fcn.0040215d
cmp eax, dword [0x4152f0]
jne 0x4022e1
mov ebx, dword [edi]
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, eax
inc edi
xor ecx, ecx
push 2
pop edx
lea eax, [edi + 2]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
cmp dword [0x418054], 0xffffffff
pop ecx
mov dword [esi + 0x41808c], eax
jne 0x40234c
and dword [0x418054], 0
push 0x1f
lea eax, [ebp - 0xa8]
push eax
movzx eax, word [0x418770]
push 0x1004
push eax
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
jle 0x40234c
lea eax, [ebp - 0xa8]
push eax
call dword [sym.imp.MSVCRT.dll__wtol]
pop ecx
mov dword [0x418054], eax
lea eax, [edi + 1]
push eax
push dword [esi + 0x41808c]
push edi
push ebx
push 0
push dword [0x418054]
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov eax, dword [esi + 0x41808c]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40247a
Capabilities:
Get token membership

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
lea eax, [ebp - 4]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x220
push 0x20
push 2
lea eax, [ebp - 0x10]
push eax
mov dword [ebp - 8], ebx
mov dword [ebp - 4], ebx
mov byte [ebp - 0x10], bl
mov byte [ebp - 0xf], bl
mov byte [ebp - 0xe], bl
mov byte [ebp - 0xd], bl
mov byte [ebp - 0xc], bl
mov byte [ebp - 0xb], 5
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x4024d7
lea eax, [ebp - 8]
push eax
push dword [ebp - 4]
push ebx
call dword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov eax, dword [ebp - 8]
pop ebx
leave
ret

Function at 0x4026fb
Capabilities:
Get memory capacity

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
cmp dword [ebp + 8], 0
jne 0x40270b
xor eax, eax
leave
ret
test byte [0x4187b0], 2
mov dword [ebp - 0x40], 0x40
jne 0x402760
lea eax, [ebp - 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalMemoryStatusEx]
test eax, eax
je 0x402760
mov ecx, dword [ebp - 0x2c]
xor eax, eax
cmp ecx, eax
ja 0x402760
jb 0x40273c
mov eax, dword [ebp - 0x30]
cmp eax, dword [ebp + 8]
jae 0x402760
push 0x2b
call fcn.004021b3
push eax
call fcn.00408d65
cmp eax, 1
pop ecx
pop ecx
je 0x402759
or dword [0x4187b0], 0xffffffff
jmp 0x402707
or dword [0x4187b0], 2
xor eax, eax
inc eax
leave
ret

Function at 0x402b9d
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
lea ecx, [ebp - 0xc]
call fcn.00401484
cmp dword [ebp - 4], 1
jg 0x402bbb
push 1
lea ecx, [ebp - 0xc]
call fcn.0040119e
push esi
mov esi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push edi
mov edi, dword [ebp + 8]
mov eax, dword [edi]
push 1
push dword [ebp - 0xc]
push eax
call esi
test eax, eax
jne 0x402bdf
push dword [ebp - 0xc]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
jmp 0x402c16
push ebx
mov ebx, dword [edi]
inc eax
push eax
push eax
lea ecx, [ebp - 0xc]
call fcn.004027d6
push eax
push ebx
call esi
mov esi, dword [ebp - 0xc]
push esi
call fcn.0040118a
and word [esi + eax*2], 0
pop ecx
mov dword [ebp - 8], eax
lea eax, [ebp - 0xc]
push eax
mov ecx, edi
call fcn.004013d5
push esi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
pop ebx
pop edi
pop esi
leave
ret