joyce8/EMBER2024-capa huggingface dataset:
Function at 0x48e1df
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 + 0x4dc1b8]
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 0x48e225
cmp word [ebx], dx
jne 0x48e225
or byte [eax + edi + 0x28], 4
jmp 0x48e22a
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 0x48e38d
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 0x48e36d
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x48e26b
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x48e2a1
cmp eax, edx
jae 0x48e2af
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 0x48e246
jmp 0x48e38d
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 0x48e368
cmp dword [ebp - 0x18], 0
je 0x48e368
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x4dc1b8]
test byte [eax + edi + 0x28], 0x48
je 0x48e33e
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 0x48e302
mov word [esi], cx
jmp 0x48e339
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x4dc1b8]
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 + 0x4dc1b8]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x4dc1b8]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x48e38d
pop eax
cmp word [ebp - 4], ax
jne 0x48e34e
cmp esi, ebx
jne 0x48e34e
mov word [esi], ax
jmp 0x48e38a
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.0048ec18
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x48e38d
push 0xd
pop eax
jmp 0x48e349
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x4dc1b8]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x48e387
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x48e38d
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 0x494cbd
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x4ab430
push 0x4ab428
push str.FlsAlloc
push 0x1f
call fcn.00494aa8
mov esi, eax
add esp, 0x10
test esi, esi
je 0x494cf1
push dword [ebp + 8]
mov ecx, esi
call dword [0x4a3610]
call esi
jmp 0x494cf7
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x494d3b
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x4ab440
push 0x4ab438
push str.FlsGetValue
push 0x21
call fcn.00494aa8
mov esi, eax
add esp, 0x10
test esi, esi
je 0x494d72
push dword [ebp + 8]
mov ecx, esi
call dword [0x4a3610]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x494d7a
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x4ab448
push 0x4ab440
push str.FlsSetValue
push 0x22
call fcn.00494aa8
mov esi, eax
add esp, 0x10
test esi, esi
je 0x494db4
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x4a3610]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]

Function at 0x4973ee
Capabilities:
Print debug messages

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00497370
Function at 0x499c80
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.00499bfc
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x499def
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x499def
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x499da4
jg 0x499cdc
test eax, eax
je 0x499d9a
push 1
push 0x1000
call fcn.0049410f
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x499cff
push 0xc
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x499d91
push 0x8000
push ebx
call fcn.004912a1
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x499d28
jg 0x499d23
cmp ecx, 0x1000
jb 0x499d28
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.0048813f
add esp, 0x10
cmp eax, 0xffffffff
je 0x499d6d
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 0x499d23
jl 0x499d54
test ecx, ecx
jne 0x499d15
push dword [ebp - 0xc]
push ebx
call fcn.004912a1
push esi
call fcn.00494795
add esp, 0xc
xor ebx, ebx
jmp 0x499dfd
cmp byte [edi + 0x24], 0
je 0x499d84
cmp dword [edi + 0x20], 5
jne 0x499d84
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x499d8f
mov ebx, dword [edi + 0x18]
jmp 0x499d91
xor ebx, ebx
push esi
call fcn.00494795
pop ecx
jmp 0x499dfd
test ecx, ecx
jg 0x499d66
jl 0x499da4
test eax, eax
jae 0x499d66
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.0048ec18
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x499dc4
cmp byte [edi + 0x1c], 0
je 0x499d66
jmp 0x499df5
push ebx
call fcn.0048def8
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x499d66
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 0x499dfd
cmp byte [edi + 0x1c], 0
je 0x499dfa
mov ebx, dword [edi + 0x18]
jmp 0x499dfd
push 0x16
pop ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.0048ec18
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x49b34d
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 0x49b3ea
push ebx
push esi
call fcn.0049b316
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.00498411
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x49b397
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x49b3e9
push edi
push eax
call fcn.004956a0
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x49b3b7
call fcn.00494795
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x49b3e8
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.00498411
add esp, 0x20
test eax, eax
jne 0x49b3d6
push edi
call fcn.00494795
jmp 0x49b3de
push ebx
call fcn.00494795
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 0x49b3ed
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x49b3fe
pop esi
ret
push ebx
push edi
push esi
call fcn.0049b316
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.004956a0
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x49b426
push ebx
push esi
push edi
call fcn.00476fc0
add esp, 0xc
push 0
call fcn.00494795
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x49bb80
Capabilities:
Set environment variable

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

Function at 0x49db10
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push esi
push edi
call fcn.004944aa
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 0x49db7f
cmp esi, dword [ebp - 4]
je 0x49db7a
cmp dword [ebp + 0xc], 0
je 0x49db7a
mov esi, dword [edi + 0x50]
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x49db57
push dword [edi + 0x50]
sub esi, ecx
sar esi, 1
call fcn.0049d662
pop ecx
xor ecx, ecx
cmp eax, esi
setne cl
mov eax, ecx
jmp 0x49db81
xor eax, eax
inc eax
jmp 0x49db81
xor eax, eax
pop edi
pop esi
leave
ret
Function at 0x49dbe6
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x4d8300]
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.004944aa
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.004944aa
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 0x49dc5d
cmp word [ecx], dx
je 0x49dc5d
mov eax, dword [0x4ac664]
push edi
dec eax
push eax
push 0x4ac550
call fcn.0049db85
mov eax, dword [ebp - 0x14]
add esp, 0xc
xor edx, edx
mov dword [ebp - 0x10], edx
mov eax, dword [eax]
test eax, eax
je 0x49dcd0
cmp word [eax], dx
je 0x49dcd0
mov eax, dword [edi]
test eax, eax
je 0x49dc81
cmp word [eax], dx
je 0x49dc81
lea eax, [ebp - 0x10]
push eax
call fcn.0049d568
jmp 0x49dc8a
lea eax, [ebp - 0x10]
push eax
call fcn.0049d603
cmp dword [ebp - 0x10], 0
pop ecx
jne 0x49dcfa
mov eax, dword [0x4ac54c]
push dword [ebp - 0x14]
dec eax
push eax
push 0x4ac240
call fcn.0049db85
add esp, 0xc
test al, al
je 0x49dcfa
mov eax, dword [edi]
xor edi, edi
test eax, eax
je 0x49dcc5
cmp word [eax], di
je 0x49dcc5
lea eax, [ebp - 0x10]
push eax
call fcn.0049d568
pop ecx
jmp 0x49dcfc
lea eax, [ebp - 0x10]
push eax
call fcn.0049d603
jmp 0x49dcc2
mov eax, dword [edi]
test eax, eax
je 0x49dce7
cmp word [eax], dx
je 0x49dce7
lea eax, [ebp - 0x10]
push eax
call fcn.0049d51d
pop ecx
jmp 0x49dcfa
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 0x49ddc5
lea eax, [ebp - 0x10]
push eax
lea eax, [esi + 0x100]
neg esi
sbb esi, esi
and esi, eax
push esi
call fcn.0049da0a
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x49ddc5
movzx ecx, si
push ecx
call dword [sym.imp.KERNEL32.dll_IsValidCodePage]
test eax, eax
je 0x49ddc5
push 1
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_IsValidLocale]
test eax, eax
je 0x49ddc5
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x49dd52
mov dword [eax], esi
mov eax, dword [ebp - 0x14]
push edi
push 0x55
add eax, 0x250
push eax
push dword [ebp - 0xc]
call fcn.00494eba
test ebx, ebx
je 0x49ddc0
push edi
push 0x55
lea eax, [ebx + 0x120]
push eax
push dword [ebp - 0xc]
call fcn.00494eba
push 0x40
push ebx
push 0x1001
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x49ddc5
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 0x49ddc5
push 0xa
push 0x10
lea ecx, [ebx + 0x100]
push ecx
push esi
call fcn.00496f92
add esp, 0x10
xor eax, eax
inc eax
jmp 0x49ddc7
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00475c80
leave
ret
Function at 0x4a0bae
Capabilities:
Get disk information

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x4d8300]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
cmp eax, 0x1a
jbe 0x4a0bf1
call fcn.0048cd4e
mov dword [eax], 0xf
call fcn.0048cd61
mov dword [eax], 0xd
call fcn.004939d3
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00475c80
leave
ret
test eax, eax
jne 0x4a0bf8
inc eax
jmp 0x4a0be5
add eax, 0x40
push 0x3a
mov word [ebp - 0xc], ax
pop eax
mov word [ebp - 0xa], ax
push 0x5c
pop eax
mov word [ebp - 8], ax
xor eax, eax
mov word [ebp - 6], ax
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
mov ecx, eax
test ecx, ecx
je 0x4a0be3
xor eax, eax
cmp ecx, 1
setne al
jmp 0x4a0be5

Function at 0x4a2500
Capabilities:
Parse pe header

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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
mov edx, dword [ebp + 0xc]
push ebx
mov ebx, ecx
push esi
push edi
test edx, edx
je 0x4049e4
xor eax, eax
mov edi, edx
mov dword [ebp - 4], eax
mov esi, eax
mov ecx, edi
lea eax, [ecx + 2]
mov dword [ebp - 8], eax
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 4]
jne 0x4049ae
sub ecx, dword [ebp - 8]
sar ecx, 1
inc ecx
lea edi, [edi + ecx*2]
lea esi, [esi + ecx*2]
cmp ecx, 1
jne 0x4049a6
push esi
push edx
push 7
xor eax, eax
push eax
push dword [ebp + 8]
push dword [ebx]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
pop edi
pop esi
pop ebx
leave
ret 8
mov ecx, 0x80004005
call fcn.00405d00
int3
Function at 0x40596d
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x410
mov eax, dword [0x412074]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 0xc]
push edi
push 2
pop edx
mov dword [ebp - 0x40c], ecx
xor ecx, ecx
push edx
push ecx
push eax
mov dword [ebp - 0x410], ecx
mov dword [ebp - 0x408], ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
jne 0x4059c0
call fcn.00404658
mov esi, eax
jmp 0x405a8f
push 0
push esi
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceExW]
mov esi, eax
test esi, esi
jne 0x4059db
call fcn.00404658
jmp 0x405a86
push esi
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebx, eax
test ebx, ebx
je 0x4059d1
push esi
push edi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
lea eax, [esi + 1]
cmp eax, esi
jae 0x405a04
mov esi, 0x8007000e
jmp 0x405a8f
push 2
pop ecx
mul ecx
test edx, edx
ja 0x405abb
jb 0x405a1c
cmp eax, 0xffffffff
ja 0x405abb
cmp eax, 0x400
jbe 0x405a37
push eax
lea ecx, [ebp - 0x408]
call fcn.0040462a
mov eax, dword [ebp - 0x408]
jmp 0x405a43
lea eax, [ebp - 0x404]
mov dword [ebp - 0x408], eax
test eax, eax
jne 0x405a4e
mov esi, 0x8007000e
jmp 0x405a88
push esi
push eax
push esi
push ebx
push 0
push 3
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ecx, eax
test ecx, ecx
je 0x4059d1
mov eax, dword [ebp - 0x408]
xor edx, edx
push dword [ebp + 0x14]
mov word [eax + ecx*2], dx
lea ecx, [ebp - 0x410]
push dword [ebp - 0x408]
call fcn.0040581e
mov esi, eax
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea eax, [ebp - 0x404]
cmp dword [ebp - 0x408], eax
je 0x405aa8
lea ecx, [ebp - 0x408]
call fcn.0040461a
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00410680
leave
ret 0x10
mov ecx, 0x80070057
call fcn.00405d00
int3
Function at 0x409a8d
Capabilities:
Check if file exists

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push esi
xor eax, eax
push edi
mov edi, dword [ebp + 8]
mov esi, eax
mov dword [ebp - 4], eax
test edi, edi
je 0x409af4
mov edx, edi
push ebx
lea ebx, [edx + 2]
mov ax, word [edx]
add edx, 2
cmp ax, word [ebp - 4]
jne 0x409aa9
sub edx, ebx
sar edx, 1
pop ebx
je 0x409af4
push edi
call fcn.00409c43
mov esi, eax
test esi, esi
js 0x409af4
push 1
push edi
xor eax, eax
push eax
call dword [sym.imp.mscms.dll_UninstallColorProfileW]
test eax, eax
jne 0x409af4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x409af4
test eax, eax
jg 0x409aeb
mov esi, eax
jmp 0x409af4
movzx esi, ax
or esi, 0x80070000
pop edi
mov eax, esi
pop esi
leave
ret 4

Function at 0x40a74b
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, ecx
push 0x38
pop ebx
push ebx
mov dword [edi + 0x58], eax
lea esi, [edi + 0x20]
xor eax, eax
push eax
push esi
mov dword [edi + 4], eax
mov dword [edi + 0x14], eax
mov dword [edi + 0x18], eax
mov dword [edi + 0x1c], eax
call sub.msvcrt.dll_memset
mov dword [esi], ebx
lea ecx, [edi + 0x6c]
mov dword [edi + 0x24], 0x80
add esp, 0xc
mov eax, dword [0x412030]
xor ebx, ebx
or dword [edi + 0x78], 0xffffffff
mov dword [edi + 0x28], eax
movzx eax, word [edi + 0x58]
push dword [ebp + 0xc]
mov dword [edi + 0x2c], eax
mov eax, dword [ebp + 0x14]
mov dword [edi + 0x38], 0x40add0
mov dword [edi + 0x40], 0x40ad90
mov dword [edi + 0x3c], edi
mov dword [edi], 0x401514
mov dword [edi + 0x60], eax
mov eax, dword [ebp + 0x10]
mov dword [edi + 0x64], eax
mov dword [ecx], 0x67727473
mov dword [ecx + 4], 0x4128c8
mov dword [edi + 0x7c], ebx
mov dword [edi + 0x80], ebx
mov dword [edi + 0x84], ebx
mov byte [edi + 0x98], 1
mov byte [edi + 0xa4], bl
push dword [0x412030]
call fcn.0040fe77
test eax, eax
js 0x40a806
mov eax, dword [edi + 0x70]
or dword [edi + 0x24], 0x1000
mov dword [edi + 0x48], eax
push 0xaaaaaa
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
mov dword [edi + 0x74], eax
mov eax, edi
mov dword [edi + 0x88], ebx
mov dword [edi + 0x8c], ebx
mov dword [edi + 0x90], 0x14a
mov dword [edi + 0x94], 0x91
pop edi
pop esi
pop ebx
pop ebp
ret 0x10
Function at 0x40e7a1
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
push esi
push edi
lea eax, [ebp - 4]
xor edi, edi
push eax
push 0x20019
push edi
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionICMDCCWSimulator
push SysReAllocString
mov dword [ebp - 4], edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov esi, eax
mov dword [ebp - 8], edi
mov dword [ebp - 0xc], edi
test esi, esi
jne 0x40e821
lea eax, [ebp - 0xc]
push eax
push edi
lea eax, [ebp - 8]
push eax
push edi
push dword [ebp + 8]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov esi, eax
test esi, esi
jne 0x40e821
mov eax, dword [ebp - 8]
cmp eax, dword [ebp + 0xc]
jne 0x40e81e
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp + 0x10]
jne 0x40e81e
lea eax, [ebp + 0x10]
push eax
push dword [ebp + 0x14]
lea eax, [ebp + 0xc]
push eax
push edi
push dword [ebp + 8]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov esi, eax
jmp 0x40e821
push 0xd
pop esi
cmp dword [ebp - 4], edi
je 0x40e82f
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
jle 0x40e83c
movzx esi, si
or esi, 0x80070000
pop edi
mov eax, esi
pop esi
leave
ret 0x10

Function at 0x40e84a
Capabilities:
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
and dword [ebp - 4], 0
lea eax, [ebp - 4]
push esi
push eax
push 0x20006
push 0
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionICMDCCWSimulator
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov esi, eax
test esi, esi
jne 0x40e88e
push dword [ebp + 0x10]
push dword [ebp + 0x14]
push dword [ebp + 0xc]
push eax
push dword [ebp + 8]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov esi, eax
cmp dword [ebp - 4], 0
je 0x40e89d
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
jle 0x40e8aa
movzx esi, si
or esi, 0x80070000
mov eax, esi
pop esi
leave
ret 0x10

Function at 0x40f064
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
push edi
push 4
pop edi
lea eax, [ebp - 4]
mov dword [ebp - 0xc], edi
push eax
xor esi, esi
push 0x20019
push esi
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionICMDCCWSimulator
push SysReAllocString
mov dword [ebp - 4], esi
mov dword [ebp - 8], esi
mov dword [ebp - 0x10], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov ebx, eax
test ebx, ebx
jne 0x40f0ce
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 8]
push eax
push esi
push str.UseSimulator
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov ebx, eax
test ebx, ebx
jne 0x40f0ce
cmp dword [ebp - 8], edi
jne 0x40f0cb
cmp dword [ebp - 0xc], edi
je 0x40f0ce
push 0xd
pop ebx
cmp dword [ebp - 4], esi
je 0x40f0dc
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x10], 1
pop edi
sete al
neg ebx
pop esi
sbb bl, bl
not bl
and al, bl
pop ebx
leave
ret
Function at 0x40f583
Capabilities:
Hide graphical window

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ebx
mov ebx, ecx
push esi
push edi
mov edi, dword [ebx + 0x60]
push dword [ebx + 4]
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x4133dc]
mov ecx, edi
call esi
test eax, eax
js 0x40f5f0
push dword [ebx + 4]
call dword [sym.imp.USER32.dll_GetParent]
push 3
push 0
push 0x470
push eax
call dword [sym.imp.USER32.dll_PostMessageW]
lea eax, [ebp - 4]
push eax
lea ecx, [ebx + 4]
call fcn.0040f489
push 3
push dword [eax]
call dword [sym.imp.USER32.dll_ShowWindow]
mov edi, dword [ebx + 0x64]
push 0x69
mov eax, dword [edi]
mov esi, dword [eax + 8]
mov ecx, esi
call dword [0x4133dc]
mov ecx, edi
call esi
jmp 0x40f602
push eax
mov ecx, eax
call fcn.0040ae4c
mov ecx, dword [ebx + 4]
mov edx, eax
call fcn.0040e9dc
pop edi
pop esi
pop ebx
leave
ret 0xc

Function at 0x40f711
Capabilities:
Allocate or change rwx memory

Disassembly:
mov eax, dword [0x4128c4]
push esi
push edi
test eax, eax
jne 0x40f72a
call fcn.0040f7ee
test eax, eax
je 0x40f772
mov eax, dword [0x4128c4]
cmp eax, 1
jne 0x40f742
push 0xd
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
jmp 0x40f7b8
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedPopEntrySList]
mov ecx, eax
test ecx, ecx
je 0x40f75b
xor eax, eax
mov edi, ecx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosb byte es:[edi], al
mov eax, ecx
jmp 0x40f7b8
push 0x40
mov eax, 0x1000
push eax
push eax
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov esi, eax
test esi, esi
jne 0x40f776
xor eax, eax
jmp 0x40f7b8
mov eax, dword [esi]
push dword [0x4128c4]
call dword [sym.imp.KERNEL32.dll_InterlockedPopEntrySList]
mov edi, eax
test edi, edi
je 0x40f79c
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, edi
jmp 0x40f7b8
lea edi, [esi + 0xff0]
push esi
push dword [0x4128c4]
call dword [sym.imp.KERNEL32.dll_InterlockedPushEntrySList]
add esi, 0x10
cmp esi, edi
jb 0x40f7a2
mov eax, esi
pop edi
pop esi
ret