joyce8/EMBER2024-capa huggingface dataset:
Function at 0x461160
Capabilities:
Parse pe header
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x4eccc8
push 0x47cc80
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
push ebx
push esi
push edi
mov eax, dword [0x4f0100]
xor dword [ebp - 8], eax
xor eax, ebp
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov dword [ebp - 0x34], edx
mov edx, ecx
mov dword [ebp - 0x1c], edx
test edx, edx
jne 0x4611ab
push ecx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov edx, eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 4], 0
mov eax, 0x5a4d
cmp word [edx], ax
je 0x4611c6
push 0xc1
jmp 0x4612f7
mov ecx, dword [edx + 0x3c]
add ecx, edx
cmp dword [ecx], 0x4550
je 0x4611dd
push 0xbf
jmp 0x4612f7
cmp word [ecx + 0x14], 0
je 0x4612f2
mov ebx, dword [ecx + 0x78]
lea eax, [ebx + edx]
neg ebx
sbb ebx, ebx
and ebx, eax
je 0x4612f2
mov eax, dword [ecx + 0x7c]
add eax, ebx
mov dword [ebp - 0x24], eax
mov esi, dword [ebx + 0x1c]
lea eax, [esi + edx]
neg esi
sbb esi, esi
and esi, eax
mov dword [ebp - 0x3c], esi
mov ecx, dword [ebx + 0x20]
lea eax, [ecx + edx]
neg ecx
sbb ecx, ecx
and ecx, eax
mov dword [ebp - 0x2c], ecx
mov ecx, dword [ebx + 0x24]
lea eax, [ecx + edx]
neg ecx
sbb ecx, ecx
and ecx, eax
mov dword [ebp - 0x20], ecx
xor edi, edi
mov dword [ebp - 0x38], edi
cmp edi, dword [ebx + 0x14]
jae 0x4612b4
test esi, esi
je 0x46124b
mov esi, dword [esi + edi*4]
lea eax, [edx + esi]
neg esi
sbb esi, esi
and esi, eax
jmp 0x46124d
xor esi, esi
mov dword [ebp - 0x28], esi
xor eax, eax
cmp esi, ebx
jbe 0x461261
xor edx, edx
cmp esi, dword [ebp - 0x24]
cmovb esi, edx
mov dword [ebp - 0x28], esi
xor edx, edx
mov dword [ebp - 0x30], edx
cmp edx, dword [ebx + 0x18]
jae 0x461288
movzx ecx, word [ecx + edx*2]
cmp ecx, edi
jne 0x4612ae
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x4612aa
mov eax, dword [eax + edx*4]
mov ecx, dword [ebp - 0x1c]
add ecx, eax
neg eax
sbb eax, eax
and eax, ecx
mov ecx, dword [ebx + 0x10]
add ecx, edi
push esi
push eax
push ecx
push dword [ebp - 0x34]
mov eax, 0x44aef0
call eax
test eax, eax
je 0x4612b4
inc edi
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x20]
mov esi, dword [ebp - 0x3c]
jmp 0x461231
xor eax, eax
jmp 0x461288
inc edx
mov ecx, dword [ebp - 0x20]
jmp 0x461263
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov dword [ebp - 4], 0xfffffffe
mov eax, 1
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push 0xc0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov dword [ebp - 4], 0xfffffffe
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x46343c
Capabilities:
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
push dword [ebp + 8]
push 0x105
call fcn.00462f80
mov edi, eax
test edi, edi
jne 0x463463
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
mov eax, esi
jmp 0x4634ac
push ebx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
or ebx, 0xffffffff
cmp eax, ebx
je 0x4634a7
test al, 0x10
je 0x4634a7
test eax, 0x400
je 0x4634a3
push 0x2000000
push 0x80
push dword [ebp + 8]
lea eax, [ebp - 4]
push eax
call fcn.004634b2
push dword [ebp - 4]
mov esi, eax
call fcn.00462feb
test esi, esi
jne 0x4634a7
xor edx, edx
jmp 0x4634a9
mov edx, ebx
mov eax, edi
pop ebx
pop edi
pop esi
leave
ret 4

Function at 0x463851
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
push ecx
push 2
lea eax, [ebp - 4]
push eax
push 0x20000001
push str._x_sys_default_locale
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoEx]
xor ecx, ecx
test eax, eax
jne 0x463878
mov eax, ecx
mov dword [ebp - 4], eax
jmp 0x46387b
mov eax, dword [ebp - 4]
push esi
mov esi, dword [ebp + 0xc]
push ecx
push ecx
push esi
push eax
push dword [ebp + 8]
push ecx
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push eax
push dword [esi]
call fcn.0046382d
pop esi
leave
ret 8

Function at 0x46d7ce
Capabilities:
Encode data using xor
Hash data using fnv

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 8]
xor edx, edx
push esi
mov esi, dword [ebp + 0xc]
cmp dword [ebp + 0x10], edx
jbe 0x46d7f1
movzx eax, byte [esi + edx]
xor eax, ecx
imul ecx, eax, 0x1000193
inc edx
cmp edx, dword [ebp + 0x10]
jb 0x46d7df
mov eax, ecx
pop esi
pop ebp
ret

Function at 0x47aef4
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
push ecx
call fcn.0048d0f2
mov eax, dword [eax + 0x14]
test eax, eax
je 0x47af37
and dword [ebp - 4], 0
lea ecx, [ebp - 4]
push 2
push ecx
push 0x22
push eax
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoEx]
movzx eax, word [ebp - 4]
sub eax, 0x30
je 0x47af37
sub eax, 1
je 0x47af32
sub eax, 1
je 0x47af2e
xor eax, eax
leave
ret
push 3
jmp 0x47af39
xor eax, eax
inc eax
leave
ret
push 2
pop eax
leave
ret

Function at 0x47c4a0
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x47c4df
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x47c4df
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x47c4df
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x47c4df
cmp dword [ecx + 0x74], 0xe
jbe 0x47c4df
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x48c1cf
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.0047c700
mov eax, dword [0x4f0100]
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.00492b82
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x48c211
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x48c36d
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.004a29e0
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 + 0x4f3f68]
push dword [edi + eax + 0x24]
push dword [edi + eax + 0x20]
push ebx
call fcn.004973eb
mov ecx, dword [esi*4 + 0x4f3f68]
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 0x48c366
cmp eax, dword [edi + ecx + 0x24]
jne 0x48c366
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 0x48c366
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.004973eb
add esp, 0x14
test edx, edx
jl 0x48c366
jg 0x48c2dc
test eax, eax
jb 0x48c366
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x48c366
jl 0x48c2f6
cmp dword [ebp - 0x1008], eax
ja 0x48c366
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x48c314
test ebx, ebx
je 0x48c34d
cmp ecx, edi
jae 0x48c34d
mov al, byte [ecx]
cmp al, 0xd
jne 0x48c32e
lea eax, [edi - 1]
cmp ecx, eax
jae 0x48c33a
cmp byte [ecx + 1], 0xa
jne 0x48c33a
inc ecx
jmp 0x48c33a
movzx eax, al
movsx eax, byte [eax + 0x4f03b8]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x48c314
cmp edx, ebx
jne 0x48c314
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x48c36b
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.0047b4e2
leave
ret
Function at 0x494f70
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x4d424c
push 0x4d4244
push 0x4d1cf4
push 0x1e
call fcn.00494d9d
mov esi, eax
add esp, 0x10
test esi, esi
je 0x494fa4
push dword [ebp + 8]
mov ecx, esi
call dword [0x4b2328]
call esi
jmp 0x494faa
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x494fef
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x4d425c
push 0x4d4254
push 0x4d1d18
push 0x20
call fcn.00494d9d
mov esi, eax
add esp, 0x10
test esi, esi
je 0x495026
push dword [ebp + 8]
mov ecx, esi
call dword [0x4b2328]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x4957a6
Capabilities:
Read file on windows

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

Function at 0x4957b1
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.004955d0
Function at 0x4968a3
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 + 0x4f3f68]
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 0x4968e3
cmp byte [ebx], 0xa
jne 0x4968e3
or byte [eax + edi + 0x28], 4
jmp 0x4968e8
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x4969e6
mov al, byte [edx]
cmp al, 0x1a
je 0x4969c8
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x496917
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x49693c
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x496946
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 0x4968f9
jmp 0x4969e6
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 0x4969c3
cmp dword [ebp - 0xc], 0
je 0x4969c3
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x4f3f68]
test byte [eax + edi + 0x28], 0x48
je 0x49699d
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x496988
mov byte [esi], dl
jmp 0x496999
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x4f3f68]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x4969e6
cmp byte [ebp - 1], 0xa
jne 0x4969ac
cmp esi, ebx
jne 0x4969ac
mov byte [esi], 0xa
jmp 0x4969e5
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00497409
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x4969e6
mov byte [esi], 0xd
jmp 0x4969e5
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x4f3f68]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x4969e2
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x4969e6
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x4969ef
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 + 0x4f3f68]
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 0x496a32
cmp word [esi], dx
jne 0x496a32
or byte [edi + eax + 0x28], 4
jmp 0x496a37
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 0x496b70
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 0x496b50
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x496a79
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x496aaf
cmp eax, edx
jae 0x496abb
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 0x496a51
jmp 0x496b70
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 0x496b4c
cmp dword [ebp - 0x14], 0
je 0x496b4c
mov eax, dword [ebx*4 + 0x4f3f68]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x496b24
mov cx, word [ebp - 4]
pop eax
cmp cx, ax
je 0x496b6a
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x4f3f68]
push 0xa
mov byte [edi + eax + 0x2a], cl
mov eax, dword [ebx*4 + 0x4f3f68]
shr cx, 8
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x4f3f68]
pop ecx
mov byte [edi + eax + 0x2c], cl
jmp 0x496b6d
pop ebx
cmp word [ebp - 4], bx
jne 0x496b35
cmp esi, dword [ebp + 0xc]
jne 0x496b35
mov word [esi], bx
jmp 0x496b6d
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.00497409
add esp, 0x10
cmp word [ebp - 4], bx
je 0x496b70
push 0xd
jmp 0x496b69
mov ecx, dword [ebx*4 + 0x4f3f68]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x496b67
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x496b70
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 0x499c8b
Capabilities:
Enumerate files on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x264
mov eax, dword [0x4f0100]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x25c], ecx
cmp edx, edi
je 0x499cd6
movzx eax, word [edx]
lea ecx, [ebp - 0x255]
push eax
call fcn.00499e2a
test al, al
jne 0x499cd0
sub edx, 2
cmp edx, edi
jne 0x499cb6
mov ecx, dword [ebp - 0x25c]
movzx esi, word [edx]
cmp esi, 0x3a
jne 0x499cf8
lea eax, [edi + 2]
cmp edx, eax
je 0x499cf8
push ecx
xor ebx, ebx
push ebx
push ebx
push edi
call fcn.00499bd7
add esp, 0x10
jmp 0x499df2
push esi
lea ecx, [ebp - 0x255]
call fcn.00499e2a
sub edx, edi
movzx eax, al
sar edx, 1
inc edx
neg eax
sbb eax, eax
xor ebx, ebx
push ebx
push ebx
and eax, edx
push ebx
mov dword [ebp - 0x260], eax
lea eax, [ebp - 0x254]
push eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileExW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x499d3b
push dword [ebp - 0x25c]
jmp 0x499ce8
mov ebx, dword [ebp - 0x25c]
push 0x2e
mov eax, dword [ebx + 4]
sub eax, dword [ebx]
sar eax, 2
mov dword [ebp - 0x25c], eax
pop eax
cmp word [ebp - 0x228], ax
jne 0x499d78
cmp word [ebp - 0x226], 0
je 0x499d99
cmp word [ebp - 0x226], ax
jne 0x499d78
cmp word [ebp - 0x224], 0
je 0x499d99
push ebx
push dword [ebp - 0x260]
lea eax, [ebp - 0x228]
push edi
push eax
call fcn.00499bd7
add esp, 0x10
mov dword [ebp - 0x264], eax
test eax, eax
jne 0x499de5
lea eax, [ebp - 0x254]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
push 0x2e
test eax, eax
pop eax
jne 0x499d52
mov eax, dword [ebx + 4]
mov edx, dword [ebx]
sub eax, edx
mov ecx, dword [ebp - 0x25c]
sar eax, 2
cmp ecx, eax
jne 0x499dcd
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x499df2
push 0x499a07
sub eax, ecx
push 4
push eax
lea eax, [edx + ecx*4]
push eax
call fcn.004a0a90
add esp, 0x10
jmp 0x499dc2
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0x264]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0047b4e2
leave
ret

Function at 0x49a716
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x49a727
pop esi
ret
push ebx
push edi
push esi
call fcn.0049a6df
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.0049598c
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x49a74f
push ebx
push esi
push edi
call fcn.0047ce50
add esp, 0xc
push 0
call fcn.004946bb
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x49ab13
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.0049a764
Function at 0x4a1745
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]
push dword [ebp + 0xc]
push ebx
call fcn.004a16c1
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x4a18bd
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x4a18bd
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x4a186c
jg 0x4a179e
test eax, eax
je 0x4a1862
push 1
push 0x1000
call fcn.00494a9f
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x4a17c4
mov eax, dword [ebp + 0x14]
push 0xc
pop edi
mov byte [eax + 0x1c], 1
mov dword [eax + 0x18], edi
jmp 0x4a1859
push 0x8000
push ebx
call fcn.004911a6
mov edi, dword [ebp + 0x14]
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x4a17f0
jg 0x4a17eb
cmp ecx, 0x1000
jb 0x4a17f0
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.004942be
add esp, 0x10
cmp eax, 0xffffffff
je 0x4a1835
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 0x4a17eb
jl 0x4a181c
test ecx, ecx
jne 0x4a17dd
push dword [ebp - 0xc]
push ebx
call fcn.004911a6
push esi
call fcn.004946bb
add esp, 0xc
xor edi, edi
jmp 0x4a18ce
cmp byte [edi + 0x24], 0
je 0x4a184c
cmp dword [edi + 0x20], 5
jne 0x4a184c
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x4a1857
mov edi, dword [edi + 0x18]
jmp 0x4a1859
xor edi, edi
push esi
call fcn.004946bb
pop ecx
jmp 0x4a18ce
test ecx, ecx
jg 0x4a182e
jl 0x4a186c
test eax, eax
jae 0x4a182e
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.00497409
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x4a188f
mov edi, dword [ebp + 0x14]
cmp byte [edi + 0x1c], 0
je 0x4a182e
jmp 0x4a18c6
push ebx
call fcn.0049b165
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x4a182e
mov esi, dword [ebp + 0x14]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xd
mov byte [esi + 0x24], 1
mov dword [esi + 0x20], eax
pop edi
mov byte [esi + 0x1c], 1
mov dword [esi + 0x18], edi
jmp 0x4a18ce
mov edi, dword [ebp + 0x14]
cmp byte [edi + 0x1c], 0
je 0x4a18cb
mov edi, dword [edi + 0x18]
jmp 0x4a18ce
push 0x16
pop edi
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.00497409
add esp, 0x10
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret

Function at 0x4a28c0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x4a28ed
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4a28ed
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x401b20
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x134
mov eax, dword [0x46946c]
push ebx
mov ebx, dword [0x46309c]
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [0x463098]
lea edx, [esp + 0x10]
push edx
push 0x20019
xor eax, ebp
push 0
mov dword [esp + 0x148], eax
mov eax, dword [0x463090]
mov dword [esp + 0x24], ecx
mov ecx, dword [0x463094]
push str.CLSIDCAA2D3B1_4BB5_4a45_A17A_122773379D99
push SysReAllocStringLen
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], edi
mov dword [esp + 0x40], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x401c14
mov byte [esp + 0x30], al
mov ecx, 0x40
lea edi, [esp + 0x31]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, dword [esp + 0x18]
lea eax, [esp + 0x1c]
push eax
mov eax, dword [edi + 0x10]
lea ecx, [esp + 0x34]
push ecx
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x1c]
push edx
push 0
push eax
push ecx
mov dword [esp + 0x34], 0x104
mov dword [esp + 0x2c], 0
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x401bee
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0x34]
push eax
mov ecx, edi
call fcn.004018e0
mov ebx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
mov edx, esi
mov dword [edx], eax
mov eax, dword [esp + 0x28]
mov dword [edx + 4], ecx
mov dword [edx + 8], eax
mov dword [edx + 0xc], ebx
jmp 0x401c29
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
mov ecx, esi
mov dword [ecx], edx
mov dword [ecx + 4], eax
mov dword [ecx + 8], edi
mov dword [ecx + 0xc], ebx
mov ecx, dword [esp + 0x13c]
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.00458c53
mov esp, ebp
pop ebp
ret 4
Function at 0x401c50
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x134
mov eax, dword [0x46946c]
push ebx
mov ebx, dword [ebp + 0x14]
xor eax, ebp
push esi
push edi
mov dword [esp + 0x13c], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x1c], eax
xor eax, eax
mov dword [esp + 0x14], ecx
mov edx, dword [ebp + 0x10]
mov byte [esp + 0x30], 0
mov ecx, 0x40
lea edi, [esp + 0x31]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov esi, dword [ebp + 8]
mov eax, ebx
shr eax, 0x10
movzx ecx, ah
push ecx
movzx eax, al
push eax
movzx ecx, bh
push ecx
movzx eax, bl
push eax
mov eax, edx
mov ecx, edx
shr ecx, 0x18
push ecx
shr eax, 0x10
movzx eax, al
push eax
movzx eax, word [esp + 0x36]
movzx ecx, dh
push ecx
movzx ecx, word [esp + 0x38]
mov dword [esp + 0x3c], edx
movzx edx, dl
push edx
push eax
push ecx
push esi
push str._08X__04X__04X__02X_02X__02X_02X_02X_02X_02X_02X
lea edx, [esp + 0x60]
push 0x104
push edx
mov dword [esp + 0x5c], ebx
call dword [sym.imp.MSVCR71.dll__snprintf]
add esp, 0x38
lea eax, [esp + 0x10]
push eax
push str.CLSIDCAA2D3B1_4BB5_4a45_A17A_122773379D99
push SysReAllocStringLen
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
je 0x401d3a
lea ecx, [esp + 0x10]
push ecx
push str.CLSIDCAA2D3B1_4BB5_4a45_A17A_122773379D99
push SysReAllocStringLen
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
je 0x401d3a
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x130]
xor ecx, ebp
call fcn.00458c53
mov esp, ebp
pop ebp
ret 0x10
lea eax, [esp + 0x30]
mov esi, 1
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401d46
sub eax, edx
inc eax
push eax
mov eax, dword [esp + 0x18]
mov ecx, dword [eax + 0x10]
lea edx, [esp + 0x34]
push edx
mov edx, dword [esp + 0x18]
push 1
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x401d73
xor esi, esi
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x13c]
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.00458c53
mov esp, ebp
pop ebp
ret 0x10

Function at 0x402010
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push edi
mov edi, dword [esp + 0x10]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x402029
pop edi
pop ebx
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
jne 0x40203d
pop esi
pop edi
xor eax, eax
pop ebx
ret
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [esp + 0x18]
add eax, esi
and ecx, 0xf
jbe 0x40205e
cmp esi, eax
jae 0x402037
dec ecx
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x402050
cmp esi, eax
jae 0x402037
mov ax, word [esi]
neg ax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebx
ret