joyce8/EMBER2024-capa huggingface dataset:
Function at 0x404d6c
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov edx, dword [ebp + 8]
push ebx
push esi
push edi
xor eax, eax
cmp edx, dword [eax*8 + 0x41db30]
je 0x404d8c
inc eax
cmp eax, 0x12
jb 0x404d7d
shl eax, 3
cmp edx, dword [eax + 0x41db30]
mov dword [ebp + 8], eax
jne 0x404f2a
mov ecx, dword [0x420780]
cmp ecx, 1
je 0x404eff
test ecx, ecx
jne 0x404dbe
cmp dword [0x41d7c4], 1
je 0x404eff
cmp edx, 0xfc
je 0x404f2a
and byte [ebp - 8], 0
push 0x104
lea eax, [ebp - 0x10c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x404df9
push 5
pop ecx
mov esi, str._program_name_unknown_
lea edi, [ebp - 0x10c]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea eax, [ebp - 0x10c]
lea ebx, [ebp - 0x10c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x404e08
sub eax, edx
inc eax
cmp eax, 0x3c
jbe 0x404e40
lea eax, [ebp - 0x10c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x404e20
sub eax, edx
push 3
lea ebx, [ebp + eax - 0x147]
push 0x418ce0
push ebx
call fcn.00407fe0
add esp, 0xc
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x404e45
sub eax, edx
mov ecx, eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x41db34]
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x404e5c
sub eax, esi
lea eax, [eax + ecx + 0x1c]
add eax, 3
and eax, 0xfffffffc
call fcn.00403950
mov edx, esp
push 6
pop ecx
mov esi, str.Runtime_Error__n_nProgram:
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov eax, ebx
movsw word es:[edi], word [esi]
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x404e88
mov edi, edx
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x404e94
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, edx
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x404ead
mov eax, dword [ebp + 8]
mov esi, 0x418cc0
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov eax, dword [eax + 0x41db34]
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x404ec8
mov edi, edx
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x404ed4
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push 0x12010
mov ecx, eax
and ecx, 3
push str.Microsoft_Visual_C_Runtime_Library
push edx
rep movsb byte es:[edi], byte [esi]
call fcn.00407ee4
add esp, 0xc
jmp 0x404f2a
mov ecx, dword [eax + 0x41db34]
mov eax, ecx
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x404f0a
push 0
lea edx, [ebp - 4]
push edx
sub eax, esi
push eax
push ecx
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea esp, [ebp - 0x118]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x407cca
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
push ebx
push esi
push edi
push 4
pop eax
call fcn.00403950
mov ebx, esp
push 0x1c
lea eax, [ebp - 0x24]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x407d5f
mov edi, dword [ebp - 0x20]
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [ebp - 0x44]
lea esi, [eax - 1]
not esi
and esi, ebx
sub esi, eax
mov dword [ebp - 4], eax
mov eax, dword [0x420788]
mov ecx, eax
dec ecx
neg ecx
sbb ecx, ecx
and ecx, 0xffff1000
add ecx, 0x11000
add ecx, edi
cmp esi, ecx
jb 0x407d5f
cmp eax, 1
je 0x407d77
mov ebx, edi
mov edi, 0x1000
push 0x1c
lea eax, [ebp - 0x24]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x407d5f
add ebx, dword [ebp - 0x18]
test dword [ebp - 0x14], edi
je 0x407d34
test byte [ebp - 0xf], 1
mov ebx, dword [ebp - 0x24]
je 0x407d5b
xor eax, eax
inc eax
jmp 0x407d93
cmp esi, ebx
jae 0x407d63
xor eax, eax
jmp 0x407d93
push 4
push edi
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x420788]
jmp 0x407d79
mov ebx, esi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 8]
push ecx
inc eax
push eax
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x54]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x407ee4
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x420b58], ebx
push esi
push edi
jne 0x407f64
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x407f9f
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x419408
push edi
call esi
test eax, eax
mov dword [0x420b58], eax
je 0x407f9f
push 0x4193f8
push edi
call esi
push 0x4193e4
push edi
mov dword [0x420b5c], eax
call esi
cmp dword [0x420788], 2
mov dword [0x420b60], eax
jne 0x407f64
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x420b68], eax
je 0x407f64
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x420b64], eax
mov eax, dword [0x420b64]
test eax, eax
je 0x407fa9
call eax
test eax, eax
je 0x407f90
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x420b68]
test eax, eax
je 0x407f90
test byte [ebp - 8], 1
jne 0x407fa9
cmp dword [0x420794], 4
jb 0x407fa3
or byte [ebp + 0x12], 0x20
jmp 0x407fc8
xor eax, eax
jmp 0x407fd8
or byte [ebp + 0x12], 4
jmp 0x407fc8
mov eax, dword [0x420b5c]
test eax, eax
je 0x407fc8
call eax
mov ebx, eax
test ebx, ebx
je 0x407fc8
mov eax, dword [0x420b60]
test eax, eax
je 0x407fc8
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x420b58]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4087a0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x41c
push edi
xor edi, edi
cmp dword [ebp + 0x10], edi
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x14], edi
jne 0x4087be
xor eax, eax
jmp 0x40892c
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 8]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x421c60]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x4087f1
push 2
push edi
push edi
push dword [ebp + 8]
call fcn.00409822
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x4088c3
cmp dword [ebp + 0x10], edi
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xc], eax
mov dword [ebp - 4], edi
jbe 0x4088fe
mov ecx, dword [ebp - 0xc]
sub ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x41c]
mov dword [ebp - 8], edi
cmp ecx, dword [ebp + 0x10]
jae 0x40884c
mov edx, dword [ebp - 0xc]
inc dword [ebp - 0xc]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x40883d
inc dword [ebp - 0x14]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 8]
mov byte [eax], dl
inc eax
inc dword [ebp - 8]
cmp dword [ebp - 8], 0x400
jl 0x408820
mov edi, eax
lea eax, [ebp - 0x41c]
sub edi, eax
push 0
lea eax, [ebp - 0x18]
push eax
push edi
lea eax, [ebp - 0x41c]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40888c
mov eax, dword [ebp - 0x18]
add dword [ebp - 0x10], eax
cmp eax, edi
jl 0x408895
mov eax, dword [ebp - 0xc]
sub eax, dword [ebp + 0xc]
xor edi, edi
cmp eax, dword [ebp + 0x10]
jb 0x408811
jmp 0x408897
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
xor edi, edi
mov eax, dword [ebp - 0x10]
cmp eax, edi
jne 0x408927
cmp dword [ebp - 4], edi
je 0x4088fe
push 5
pop esi
cmp dword [ebp - 4], esi
jne 0x4088f0
call fcn.00403fde
mov dword [eax], 9
call fcn.00403fe7
mov dword [eax], esi
jmp 0x4088f9
push edi
lea ecx, [ebp - 0x18]
push ecx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4088e5
mov eax, dword [ebp - 0x18]
mov dword [ebp - 4], edi
mov dword [ebp - 0x10], eax
jmp 0x408897
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
jmp 0x408897
push dword [ebp - 4]
call fcn.00403ff0
pop ecx
or eax, 0xffffffff
jmp 0x40892a
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x408913
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0x1a
jne 0x408913
xor eax, eax
jmp 0x40892a
call fcn.00403fde
mov dword [eax], 0x1c
call fcn.00403fe7
mov dword [eax], edi
jmp 0x4088f9
sub eax, dword [ebp - 0x14]
pop esi
pop ebx
pop edi
leave
ret
Function at 0x40d9b0
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
push edi
mov esi, dword [ebp + 0x10]
push 0xf00021
mov edx, dword [esi + 4]
mov ecx, dword [esi]
mov eax, dword [esi + 0xc]
sub eax, edx
push eax
mov eax, dword [esi + 8]
sub eax, ecx
push eax
push edx
push ecx
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.GDI32.dll_PatBlt]
mov edi, dword [ebp + 8]
push edi
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
mov ebx, eax
lea eax, [eax + 5]
add eax, 3
and eax, 0xfffffffc
call fcn.00403950
mov dword [ebp - 4], esp
cmp dword [ebp - 4], 0
je 0x40da7b
add ebx, 2
mov eax, dword [ebp - 4]
push ebx
push eax
push edi
call dword [sym.imp.USER32.dll_GetWindowTextA]
test eax, eax
je 0x40da7b
mov bx, 0x140
mov edi, dword [ebp + 0x14]
mov eax, edi
and al, 0xf
cmp al, 0xc
je 0x40da2e
mov ebx, edi
and bx, 0xf
or bx, 0x150
test edi, 0x80
je 0x40da39
or bh, 8
and edi, 0x8000000
je 0x40da54
mov eax, dword [0x42201c]
mov ecx, dword [ebp + 0xc]
push eax
push ecx
call dword [sym.imp.GDI32.dll_SetTextColor]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 0xc]
movzx eax, bx
push eax
push esi
push 0xffffffffffffffff
push ecx
push edx
call dword [sym.imp.USER32.dll_DrawTextA]
test edi, edi
je 0x40da7b
mov eax, dword [ebp - 8]
mov ecx, dword [ebp + 0xc]
push eax
push ecx
call dword [sym.imp.GDI32.dll_SetTextColor]
lea esp, [ebp - 0x14]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40de50
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, dword [esp + 8]
sub esp, 4
push ebx
push esi
mov esi, dword [esp + 0x10]
push edi
push ebp
push 2
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
test edi, edi
jne 0x40de7b
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebx, eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov esi, eax
test esi, esi
jne 0x40de9f
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
push ebx
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebp, eax
test ebp, ebp
jne 0x40deba
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
mov edi, ebp
mov ecx, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x20]
xor ecx, ecx
mov cl, ah
mov edx, eax
mov dword [esp + 0x10], 0
shl ecx, 8
shr edx, 0x10
mov byte [esp + 0x10], dl
xor edx, edx
or ecx, dword [esp + 0x10]
mov dl, al
shl edx, 0x10
mov eax, dword [esp + 0x28]
or ecx, edx
mov edx, eax
shr edx, 0x10
mov dword [ebp + 0x28], ecx
mov dword [esp + 0x10], 0
xor ecx, ecx
mov byte [esp + 0x10], dl
mov cl, ah
xor edx, edx
shl ecx, 8
mov dl, al
shl edx, 0x10
or ecx, dword [esp + 0x10]
or ecx, edx
mov eax, dword [esp + 0x24]
mov edx, eax
mov dword [ebp + 0x44], ecx
shr edx, 0x10
xor ecx, ecx
mov dword [esp + 0x10], 0
mov cl, ah
mov byte [esp + 0x10], dl
shl ecx, 8
xor edx, edx
or ecx, dword [esp + 0x10]
mov dl, al
shl edx, 0x10
mov eax, dword [esp + 0x2c]
or ecx, edx
xor edx, edx
mov dl, al
mov dword [ebp + 0x48], ecx
shl edx, 0x10
xor ecx, ecx
mov cl, ah
shl ecx, 8
shr eax, 0x10
or ecx, edx
xor edx, edx
mov dl, al
mov eax, dword [esp + 0x30]
or ecx, edx
xor edx, edx
mov dl, al
mov dword [ebp + 0x64], ecx
shl edx, 0x10
xor ecx, ecx
mov cl, ah
shl ecx, 8
shr eax, 0x10
or ecx, edx
xor edx, edx
mov dl, al
mov eax, dword [esp + 0x34]
or ecx, edx
xor edx, edx
mov dl, al
mov dword [ebp + 0x54], ecx
shl edx, 0x10
xor ecx, ecx
mov cl, ah
shl ecx, 8
push 0
shr eax, 0x10
or ecx, edx
xor edx, edx
mov dl, al
or ecx, edx
mov dword [ebp + 0x50], ecx
call dword [sym.imp.USER32.dll_GetDC]
mov edi, eax
push 0
push ebp
lea ecx, [ebp + 0x68]
push ecx
push 4
push ebp
push edi
call dword [sym.imp.GDI32.dll_CreateDIBitmap]
mov esi, eax
push edi
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
push ebp
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, esi
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
Function at 0x41236c
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x4123ae
call fcn.00414f74
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x4123ae
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x4123a5
xor eax, eax
jmp 0x4123b6
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.004123bc
pop edi
pop esi
pop ebx
ret 4

Function at 0x415650
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x41567e
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x41569c
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.004155b6
jmp 0x41569c
mov eax, dword [esi + 0x14]
test eax, eax
je 0x41569c
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.004155b6
test edi, edi
mov eax, edi
jne 0x415686
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x4011f0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x110
lea eax, [esp + 4]
push edi
push eax
push str.SoftwareKingsoftFastAit4.0Professional
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x4012dc
mov ecx, 0x41
lea edi, [esp + 0x10]
rep stosd dword es:[edi], eax
lea ecx, [esp + 4]
lea edx, [esp + 0x10]
push ecx
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x10]
push edx
push eax
push 0
push str.EnginePath
push ecx
mov dword [esp + 0x1c], 0x104
mov dword [esp + 0x24], 1
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4012d1
mov edx, dword [esp + 4]
mov eax, dword [esp + 0x11c]
cmp edx, eax
ja 0x4012d1
lea edi, [esp + 0x10]
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [esp + 0x118]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push esi
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
pop esi
mov dword [esp + 4], ecx
cmp byte [ecx + edx - 1], 0x5c
je 0x4012ba
mov byte [ecx + edx], 0x5c
mov ecx, dword [esp + 4]
mov byte [ecx + edx + 1], 0
mov eax, dword [esp + 4]
inc eax
mov dword [esp + 4], eax
mov edx, dword [esp + 8]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 4]
pop edi
add esp, 0x110
ret
mov eax, dword [esp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
pop edi
add esp, 0x110
ret

Function at 0x4012f0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x110
lea eax, [esp + 4]
push edi
push eax
push str.SoftwareKingsoftPowerword8.5Professional
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x4013dc
mov ecx, 0x41
lea edi, [esp + 0x10]
rep stosd dword es:[edi], eax
lea ecx, [esp + 4]
lea edx, [esp + 0x10]
push ecx
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x10]
push edx
push eax
push 0
push str.PathName
push ecx
mov dword [esp + 0x1c], 0x104
mov dword [esp + 0x24], 1
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4013d1
mov edx, dword [esp + 4]
mov eax, dword [esp + 0x11c]
cmp edx, eax
ja 0x4013d1
lea edi, [esp + 0x10]
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [esp + 0x118]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push esi
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
pop esi
mov dword [esp + 4], ecx
cmp byte [ecx + edx - 1], 0x5c
je 0x4013ba
mov byte [ecx + edx], 0x5c
mov ecx, dword [esp + 4]
mov byte [ecx + edx + 1], 0
mov eax, dword [esp + 4]
inc eax
mov dword [esp + 4], eax
mov edx, dword [esp + 8]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 4]
pop edi
add esp, 0x110
ret
mov eax, dword [esp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
pop edi
add esp, 0x110
ret
Function at 0x401460
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov edx, dword [esp + 4]
push edi
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
pop edi
je 0x401486
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x401486
mov eax, 1
ret
xor eax, eax
ret

Function at 0x401730
Capabilities:
Set registry value

Disassembly:
mov ecx, dword [esp + 8]
mov edx, dword [esp + 4]
lea eax, [esp + 8]
push eax
push 2
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x401779
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 8]
push esi
lea eax, [esp + 0x14]
push 4
push eax
push 4
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov esi, eax
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
ret

Function at 0x401780
Capabilities:
Copy file

Disassembly:
sub esp, 0x114
lea eax, [esp + 0x10]
push 0x104
push eax
call fcn.00401610
add esp, 8
test eax, eax
je 0x40188f
lea ecx, [esp + 0x10]
push 0x5c
push ecx
call fcn.00403535
add esp, 8
test eax, eax
je 0x40188f
push ebx
push esi
push edi
mov byte [eax + 1], 0
mov edi, str.plug_insxdict32.API
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x1c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x1c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.00401460
add esp, 4
test eax, eax
je 0x40183f
mov esi, dword [esp + 0x124]
lea ecx, [esp + 0xc]
push ecx
push esi
call fcn.004013f0
lea edx, [esp + 0x1c]
lea eax, [esp + 0x24]
push edx
push eax
call fcn.004013f0
add esp, 0x10
lea ecx, [esp + 0x14]
lea edx, [esp + 0xc]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_CompareFileTime]
test eax, eax
jle 0x401854
lea eax, [esp + 0x1c]
push 0
push eax
push esi
jmp 0x40184e
mov edx, dword [esp + 0x124]
lea ecx, [esp + 0x1c]
push 0
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
push 0
push str.TrustedMode
push str.SoftwareAdobeAcrobat_Reader5.0AdobeViewer
push 0x80000001
call fcn.00401730
push 0
push str.iTrustedMode
push str.SoftwareAdobeAcrobat_Reader6.0Originals
push 0x80000001
call fcn.00401730
add esp, 0x20
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x114
ret
mov eax, 2
add esp, 0x114
ret
Function at 0x402640
Capabilities:
Query or enumerate registry value

Disassembly:
mov ecx, dword [esp + 8]
mov edx, dword [esp + 4]
sub esp, 0x10c
lea eax, [esp]
push ebx
push eax
push 1
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov ebx, eax
test ebx, ebx
jne 0x4026c3
mov edx, dword [esp + 4]
push esi
lea eax, [esp + 0xc]
push edi
lea ecx, [esp + 0x14]
push eax
push ecx
push ebx
push edx
mov dword [esp + 0x20], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueA]
lea edi, [esp + 0x14]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x124]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov eax, ebx
pop esi
pop ebx
add esp, 0x10c
ret
mov eax, ebx
pop ebx
add esp, 0x10c
ret

Function at 0x406701
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x41ce30
cmp edx, dword [eax]
je 0x406723
add eax, 8
inc ecx
cmp eax, 0x41cec0
jl 0x406714
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x41ce30]
jne 0x406851
mov eax, dword [0x4214b0]
cmp eax, 1
je 0x40682b
test eax, eax
jne 0x406754
cmp dword [0x41c95c], 1
je 0x40682b
cmp edx, 0xfc
je 0x406851
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40678b
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.004068f0
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.00405b50
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x4067ce
lea eax, [ebp - 0x1a4]
push eax
call fcn.00405b50
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x41817c
push edi
call fcn.004085f0
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.004068f0
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.00406900
lea eax, [ebp - 0xa0]
push 0x41815c
push eax
call fcn.00406900
push dword [esi + 0x41ce34]
lea eax, [ebp - 0xa0]
push eax
call fcn.00406900
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.00408558
add esp, 0x2c
pop edi
jmp 0x406851
lea eax, [ebp + 8]
lea esi, [esi + 0x41ce34]
push 0
push eax
push dword [esi]
call fcn.00405b50
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
leave
ret
Function at 0x4104c7
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x410509
call fcn.0041461c
mov esi, dword [eax + 0xc]
push pe_nt_image_headers32
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x410509
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x410500
xor eax, eax
jmp 0x410511
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.00410517
pop edi
pop esi
pop ebx
ret 4

Function at 0x414b09
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x414b37
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x414b55
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.00414a6f
jmp 0x414b55
mov eax, dword [esi + 0x14]
test eax, eax
je 0x414b55
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.00414a6f
test edi, edi
mov eax, edi
jne 0x414b3f
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8