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

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x47ac20]
mov ecx, dword [ebp + 0x94]
push ebx
push esi
mov dword [ebp + 0x88], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x47ad10]
je 0x4592a4
inc eax
cmp eax, 0x13
jb 0x459295
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x47ad10]
jne 0x4593ca
mov eax, dword [0x47e194]
cmp eax, 1
je 0x4593a2
cmp eax, edx
jne 0x4592d4
cmp dword [0x47ac14], 1
je 0x4593a2
cmp ecx, 0xfc
je 0x4593ca
push 0x104
lea eax, [ebp - 0x80]
push eax
push edx
mov byte [ebp + 0x84], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x45930a
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.00453c70
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.00451fa0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x45933e
mov eax, edi
push eax
call fcn.00451fa0
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x4773d0
push edi
call fcn.00454a30
add esp, 0x10
push edi
call fcn.00451fa0
push dword [esi + 0x47ad14]
mov ebx, eax
call fcn.00451fa0
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00454980
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00453c70
push edi
push ebx
call fcn.00453c80
push 0x4773cc
push ebx
call fcn.00453c80
push dword [esi + 0x47ad14]
push ebx
call fcn.00453c80
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.004556b5
add esp, 0x2c
jmp 0x4593ca
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x47ad14]
push dword [esi]
call fcn.00451fa0
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]
lea esp, [ebp - 0x8c]
mov ecx, dword [ebp + 0x88]
call fcn.00455986
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x45941f
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
mov esi, dword [ebp + 8]
cmp esi, dword [0x47e7e4]
push edi
jae 0x4595f4
mov eax, esi
sar eax, 5
lea edi, [eax*4 + 0x47e800]
mov eax, dword [edi]
and esi, 0x1f
shl esi, 3
add eax, esi
mov dl, byte [eax + 4]
test dl, 1
je 0x4595f4
and dword [ebp - 0xc], 0
cmp dword [ebp + 0x10], 0
mov ebx, dword [ebp + 0xc]
mov ecx, ebx
je 0x4594ca
test dl, 2
jne 0x4594ca
test dl, 0x48
je 0x459494
cmp byte [eax + 5], 0xa
je 0x459494
mov eax, dword [edi]
mov al, byte [eax + esi + 5]
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea ecx, [ebx + 1]
mov dword [ebp - 0xc], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push ecx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4594dd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop ecx
cmp eax, ecx
jne 0x4594c5
mov dword [0x47e140], ecx
jmp 0x4595fb
cmp eax, 0x6d
jne 0x4594d1
xor eax, eax
jmp 0x459608
push eax
call fcn.00459e9d
pop ecx
jmp 0x459605
mov eax, dword [ebp - 0x10]
mov ecx, dword [edi]
add dword [ebp - 0xc], eax
test byte [ecx + esi + 4], 0x80
je 0x4595ef
test eax, eax
je 0x459504
cmp byte [ebx], 0xa
jne 0x459504
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x45950d
mov eax, dword [edi]
lea eax, [eax + esi + 4]
and byte [eax], 0xfb
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0xc]
add ecx, eax
cmp eax, ecx
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], ecx
jae 0x4595e9
mov eax, dword [ebp - 8]
mov al, byte [eax]
cmp al, 0x1a
je 0x4595d9
cmp al, 0xd
je 0x45953f
mov byte [ebx], al
inc ebx
inc dword [ebp - 8]
jmp 0x4595cb
dec ecx
cmp dword [ebp - 8], ecx
jae 0x459559
mov eax, dword [ebp - 8]
inc eax
cmp byte [eax], 0xa
jne 0x459554
add dword [ebp - 8], 2
jmp 0x4595ad
mov dword [ebp - 8], eax
jmp 0x4595c7
inc dword [ebp - 8]
push 0
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [edi]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x459581
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4595c7
cmp dword [ebp - 0x10], 0
je 0x4595c7
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x4595a2
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x4595ad
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x4595ca
cmp ebx, dword [ebp + 0xc]
jne 0x4595b2
cmp byte [ebp - 1], 0xa
jne 0x4595b2
mov byte [ebx], 0xa
jmp 0x4595ca
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0045b151
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x4595cb
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 0xc]
cmp dword [ebp - 8], ecx
jb 0x459523
jmp 0x4595e9
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x4595e9
lea esi, [eax + esi + 4]
or byte [esi], 2
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 0xc], ebx
mov eax, dword [ebp - 0xc]
jmp 0x459608
and dword [0x47e140], 0
mov dword [0x47e13c], 9
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x45b91a
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi + 8]
test bl, 3
jne 0x45b948
mov eax, dword fs:[0x18]
mov dword [ebp + 8], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
cmp ebx, ecx
mov dword [ebp - 4], ecx
jb 0x45b94f
cmp ebx, dword [eax + 4]
jae 0x45b94f
xor eax, eax
jmp 0x45bb3f
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x45b960
xor eax, eax
inc eax
jmp 0x45bb3e
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x45b976
cmp ecx, edx
jae 0x45babb
cmp dword [eax + 4], 0
je 0x45b97f
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x45b967
cmp dword [ebp + 8], 0
je 0x45b9a1
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x45babb
cmp eax, esi
jae 0x45babb
mov eax, dword [0x47e430]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x45b9c6
cmp dword [esi*4 + 0x47e438], edi
je 0x45babf
inc esi
cmp esi, eax
jl 0x45b9b4
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x45bb3b
cmp dword [ebp - 8], 0x1000000
jne 0x45bb3b
test byte [ebp - 0xc], 0xcc
je 0x45ba44
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x45bb3b
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x45bb3b
cmp word [eax + 0x18], 0x10b
jne 0x45bb3b
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x45bb3b
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x45ba44
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x45ba44
test byte [ecx + 0x27], 0x80
jne 0x45babb
push 1
push 0x47e478
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x45b958
mov ecx, dword [0x47e430]
test ecx, ecx
mov edx, ecx
jle 0x45ba78
lea eax, [ecx*4 + 0x47e434]
cmp dword [eax], edi
je 0x45ba78
dec edx
sub eax, 4
test edx, edx
jg 0x45ba6c
test edx, edx
jne 0x45baa9
push 0xf
pop ebx
cmp ecx, ebx
jg 0x45ba85
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x45ba9d
lea eax, [edx*4 + 0x47e438]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x45ba8b
cmp ecx, 0x10
jge 0x45baa9
inc ecx
mov dword [0x47e430], ecx
push 0
push 0x47e478
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x45b958
xor eax, eax
jmp 0x45bb3e
test esi, esi
jle 0x45b958
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x47e478
call ebx
test eax, eax
jne 0x45b958
cmp dword [esi*4 + 0x47e438], edi
je 0x45bb15
mov eax, dword [0x47e430]
lea esi, [eax - 1]
test esi, esi
jl 0x45bb03
cmp dword [esi*4 + 0x47e438], edi
je 0x45baff
dec esi
jns 0x45baf3
test esi, esi
jge 0x45bb13
cmp eax, 0x10
jge 0x45bb0e
inc eax
mov dword [0x47e430], eax
lea esi, [eax - 1]
jmp 0x45bb15
je 0x45bb2d
xor ecx, ecx
test esi, esi
jl 0x45bb2d
lea eax, [ecx*4 + 0x47e438]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x45bb1b
push 0
push 0x47e478
call ebx
jmp 0x45b958
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x45c0ba
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
cmp eax, ebx
push edi
mov dword [ebp - 0x10], ebx
jne 0x45c0d3
or eax, 0xffffffff
jmp 0x45c134
push esi
mov esi, dword [eax]
cmp esi, ebx
mov dword [ebp - 4], esi
je 0x45c130
push 0x3d
push esi
call fcn.0045cb58
cmp eax, ebx
pop ecx
pop ecx
mov dword [ebp - 0xc], eax
je 0x45c130
cmp esi, eax
je 0x45c130
xor ecx, ecx
cmp byte [eax + 1], bl
mov eax, dword [0x47e168]
sete cl
cmp eax, dword [0x47e16c]
mov dword [ebp - 8], ecx
jne 0x45c116
mov edi, eax
call fcn.0045c059
mov dword [0x47e168], eax
cmp eax, ebx
jne 0x45c16f
cmp dword [ebp + 0xc], ebx
je 0x45c138
cmp dword [0x47e170], ebx
je 0x45c138
call fcn.004597d4
test eax, eax
je 0x45c16f
or eax, 0xffffffff
pop esi
pop edi
pop ebx
leave
ret
cmp dword [ebp - 8], ebx
je 0x45c141
xor eax, eax
jmp 0x45c133
push 4
call fcn.00453fb5
cmp eax, ebx
pop ecx
mov dword [0x47e168], eax
je 0x45c130
mov dword [eax], ebx
cmp dword [0x47e170], ebx
jne 0x45c16f
push 4
call fcn.00453fb5
cmp eax, ebx
pop ecx
mov dword [0x47e170], eax
je 0x45c130
mov dword [eax], ebx
mov edi, dword [ebp - 0xc]
sub edi, dword [ebp - 4]
push dword [ebp - 4]
mov esi, dword [0x47e168]
call fcn.0045c00c
mov edi, eax
cmp edi, ebx
pop ecx
jl 0x45c1d0
cmp dword [esi], ebx
je 0x45c1d0
lea esi, [esi + edi*4]
push dword [esi]
call fcn.00454129
cmp dword [ebp - 8], ebx
pop ecx
jne 0x45c1b3
mov eax, dword [ebp - 4]
mov dword [esi], eax
mov eax, dword [ebp + 8]
mov dword [eax], ebx
jmp 0x45c211
mov eax, dword [esi + 4]
mov dword [esi], eax
inc edi
add esi, 4
cmp dword [esi], ebx
jne 0x45c1aa
mov eax, edi
shl eax, 2
push eax
push dword [0x47e168]
call fcn.00453fc7
cmp eax, ebx
pop ecx
pop ecx
je 0x45c211
jmp 0x45c20c
cmp dword [ebp - 8], ebx
jne 0x45c27c
cmp edi, ebx
jge 0x45c1df
neg edi
lea eax, [edi*4 + 8]
push eax
push dword [0x47e168]
call fcn.00453fc7
cmp eax, ebx
pop ecx
pop ecx
je 0x45c130
mov edx, dword [ebp - 4]
lea ecx, [eax + edi*4]
mov dword [ecx], edx
mov dword [ecx + 4], ebx
mov ecx, dword [ebp + 8]
mov dword [ecx], ebx
mov dword [0x47e168], eax
cmp dword [ebp + 0xc], ebx
je 0x45c266
push dword [ebp - 4]
call fcn.00451fa0
inc eax
inc eax
push eax
call fcn.00453fb5
mov esi, eax
cmp esi, ebx
pop ecx
pop ecx
je 0x45c266
push dword [ebp - 4]
push esi
call fcn.00453c70
mov eax, esi
sub eax, dword [ebp - 4]
pop ecx
add eax, dword [ebp - 0xc]
pop ecx
mov ecx, dword [ebp - 8]
mov byte [eax], bl
inc eax
neg ecx
sbb ecx, ecx
not ecx
and ecx, eax
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
test eax, eax
jne 0x45c25f
or dword [ebp - 0x10], 0xffffffff
push esi
call fcn.00454129
pop ecx
cmp dword [ebp - 8], ebx
je 0x45c274
push dword [ebp - 4]
call fcn.00454129
pop ecx
mov eax, dword [ebp - 0x10]
jmp 0x45c133
push dword [ebp - 4]
call fcn.00454129
mov eax, dword [ebp + 8]
pop ecx
mov dword [eax], ebx
jmp 0x45c13d
Function at 0x45c2d3
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1008
call fcn.00454980
mov eax, dword [0x47ac20]
push ebx
mov ebx, dword [ebp + 8]
push esi
xor esi, esi
cmp ebx, dword [0x47e7e4]
mov dword [ebp - 4], eax
jae 0x45c416
mov eax, ebx
sar eax, 5
mov eax, dword [eax*4 + 0x47e800]
mov ecx, ebx
and ecx, 0x1f
test byte [eax + ecx*8 + 4], 1
je 0x45c416
push 1
push esi
push ebx
call fcn.0045b151
add esp, 0xc
cmp eax, 0xffffffff
mov dword [ebp - 0x1008], eax
je 0x45c420
push 2
push esi
push ebx
call fcn.0045b151
add esp, 0xc
cmp eax, 0xffffffff
je 0x45c420
push edi
mov edi, dword [ebp + 0xc]
sub edi, eax
test edi, edi
jle 0x45c3c0
push 0x1000
lea eax, [ebp - 0x1004]
push esi
push eax
call fcn.00452c10
push 0x8000
push ebx
call fcn.0045cbbf
add esp, 0x14
mov dword [ebp + 8], eax
mov eax, 0x1000
cmp edi, eax
jge 0x45c37f
mov eax, edi
push eax
lea eax, [ebp - 0x1004]
push eax
push ebx
call fcn.004569df
add esp, 0xc
cmp eax, 0xffffffff
je 0x45c39d
sub edi, eax
test edi, edi
jg 0x45c374
jmp 0x45c3b3
cmp dword [0x47e140], 5
jne 0x45c3b0
mov dword [0x47e13c], 0xd
or esi, 0xffffffff
push dword [ebp + 8]
push ebx
call fcn.0045cbbf
pop ecx
pop ecx
jmp 0x45c400
jge 0x45c400
push 0
push dword [ebp + 0xc]
push ebx
call fcn.0045b151
push ebx
call fcn.0045a08a
add esp, 0x10
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov esi, eax
neg esi
sbb esi, esi
neg esi
dec esi
cmp esi, 0xffffffff
jne 0x45c400
mov dword [0x47e13c], 0xd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x47e140], eax
push 0
push dword [ebp - 0x1008]
push ebx
call fcn.0045b151
add esp, 0xc
mov eax, esi
pop edi
jmp 0x45c423
mov dword [0x47e13c], 9
or eax, 0xffffffff
mov ecx, dword [ebp - 4]
pop esi
pop ebx
call fcn.00455986
leave
ret
Function at 0x402e60
Capabilities:
Identify system language via api
Terminate process

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x268
mov dword [ebp - 0x1c], ecx
push 0x4056ff
call dword [sym.imp.kernel32.dll_GetModuleHandleA]
mov edi, eax
mov word [ebp - 0x274], 0
lea esi, [ebp - 0x274]
push 0x104
push esi
push eax
call dword [sym.imp.kernel32.dll_GetModuleFileNameW]
test eax, eax
jne 0x402eda
test byte [section..data], 2
je 0x402eda
mov eax, dword fs:[0x18]
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp - 0x6c]
mov eax, dword [eax + 0x34]
sub esp, 0x14
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.GetModuleFileName_failed:__ld_n
mov dword [esp + 8], str.ShowUsage
mov dword [esp], 1
call sym._wine_dbg_log
add esp, 0x14
mov dword [ebp - 0x10], 0x28
mov word [ebp - 0x6c], 0
lea eax, [ebp - 0x10]
lea ecx, [ebp - 0x6c]
push 0
push 0
push eax
push ecx
push esi
call sub.msi.dll_MsiGetFileVersionW
test eax, eax
je 0x402f2c
test byte [section..data], 2
je 0x402f2c
sub esp, 0x14
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.MsiGetFileVersion_failed_with__ld_n
mov dword [esp + 8], str.ShowUsage
mov dword [esp], 1
call sym._wine_dbg_log
add esp, 0x14
lea eax, [ebp - 0x14]
push 0
push eax
push 0xa
mov dword [ebp - 0x18], edi
push edi
call dword [sym.imp.user32.dll_LoadStringW]
mov edi, eax
mov dword [ebp - 0x10], eax
add eax, eax
add eax, 2
mov ebx, dword [sym.imp.ucrtbase.dll_malloc]
push eax
call ebx
add esp, 4
mov esi, eax
mov dword [ebp - 0x14], eax
lea eax, [edi + edi]
add eax, 0x52
push eax
call ebx
add esp, 4
mov ebx, eax
test esi, esi
je 0x402fb4
test ebx, ebx
je 0x402fb4
mov word [esi], 0
inc edi
push edi
push esi
push 0xa
push dword [ebp - 0x18]
call dword [sym.imp.user32.dll_LoadStringW]
mov eax, dword [ebp - 0x10]
add eax, 0x29
lea ecx, [ebp - 0x6c]
push ecx
push dword [ebp - 0x14]
push eax
push ebx
call sym._swprintf
add esp, 0x10
call dword [sym.imp.kernel32.dll_GetUserDefaultLangID]
movzx eax, ax
push 0
push eax
push 0
push 0
push ebx
push 0
call sub.msi.dll_MsiMessageBoxW
mov esi, dword [ebp - 0x14]
mov edi, dword [sym.imp.ucrtbase.dll_free]
push esi
call edi
add esp, 4
push ebx
call edi
add esp, 4
push dword [ebp - 0x1c]
call dword [sym.imp.kernel32.dll_ExitProcess]

Function at 0x402fd0
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
sub esp, 0x10
mov edi, edx
mov esi, ecx
mov dword [esp], edx
call dword [sym.imp.ucrtbase.dll_wcslen]
add eax, eax
add eax, 6
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
test eax, eax
je 0x403031
mov ecx, 4
nop dword [eax]
movzx edx, word [edi + ecx - 4]
mov word [eax + ecx], dx
add ecx, 2
test dx, dx
jne 0x403000
mov dword [eax], 0
nop word [eax + eax]
mov ecx, esi
mov esi, dword [esi]
test esi, esi
jne 0x403020
mov dword [ecx], eax
add esp, 0x10
pop esi
pop edi
pop ebp
ret
test byte [section..data], 2
je 0x403056
mov dword [esp + 0xc], str.Out_of_memory__n
mov dword [esp + 8], str.StringListAppend
mov dword [esp], 1
call sym._wine_dbg_log
mov dword [esp], 1
call dword [sym.imp.kernel32.dll_ExitProcess]
Function at 0x4033e0
Capabilities:
Create service
Get common file path

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
sub esp, 0x224
push 2
push str.ServicesActive
push 0
call dword [sym.imp.advapi32.dll_OpenSCManagerW]
test eax, eax
je 0x40347d
mov esi, eax
lea edi, [ebp - 0x22c]
push 0x104
push edi
call dword [sym.imp.kernel32.dll_GetSystemDirectoryW]
movups xmm0, xmmword [str.msiexec__V]
movups xmmword [ebp + eax*2 - 0x22c], xmm0
movsd xmm0, qword [0x4058f6]
movsd qword [ebp + eax*2 - 0x21c], xmm0
sub esp, 0x34
xorps xmm0, xmm0
movups xmmword [esp + 0x20], xmm0
mov dword [esp + 0x1c], edi
movaps xmm0, xmmword [0x405300]
movups xmmword [esp + 0xc], xmm0
mov dword [esp], esi
mov dword [esp + 0x30], 0
mov dword [esp + 8], 0x4058fe
mov dword [esp + 4], 0x4058fe
call dword [sym.imp.advapi32.dll_CreateServiceW]
test eax, eax
je 0x40349d
push eax
call dword [sym.imp.advapi32.dll_CloseServiceHandle]
xor edi, edi
jmp 0x4034d2
push 2
call dword [sym.imp.ucrtbase.dll___acrt_iob_func]
add esp, 4
push str.Failed_to_open_the_service_control_manager._n
push eax
call sym._fprintf
add esp, 8
mov edi, 1
jmp 0x4034d9
mov eax, dword fs:[0x18]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
xor edi, edi
cmp dword [eax + 0x34], 0x431
je 0x4034d2
push 2
call dword [sym.imp.ucrtbase.dll___acrt_iob_func]
add esp, 4
push str.Failed_to_create_MSI_service_n
push eax
call sym._fprintf
add esp, 8
mov edi, 1
push esi
call dword [sym.imp.advapi32.dll_CloseServiceHandle]
mov eax, edi
add esp, 0x224
pop esi
pop edi
pop ebp
ret

Function at 0x4034f0
Capabilities:
Delete service

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
push eax
push 1
push str.ServicesActive
push 0
call dword [sym.imp.advapi32.dll_OpenSCManagerW]
test eax, eax
je 0x403557
mov esi, eax
push 0x10000
push 0x4058fe
push eax
call dword [sym.imp.advapi32.dll_OpenServiceW]
test eax, eax
je 0x403577
mov ebx, eax
push eax
call dword [sym.imp.advapi32.dll_DeleteService]
xor edi, edi
test eax, eax
jne 0x40354e
push 2
call dword [sym.imp.ucrtbase.dll___acrt_iob_func]
add esp, 4
push str.Failed_to_delete_MSI_service_n
push eax
call sym._fprintf
add esp, 8
mov edi, 1
push ebx
call dword [sym.imp.advapi32.dll_CloseServiceHandle]
jmp 0x4035ac
push 2
call dword [sym.imp.ucrtbase.dll___acrt_iob_func]
add esp, 4
push str.Failed_to_open_service_control_manager_n
push eax
call sym._fprintf
add esp, 8
mov edi, 1
jmp 0x4035b3
mov eax, dword fs:[0x18]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
xor edi, edi
cmp dword [eax + 0x34], 0x424
je 0x4035ac
push 2
call dword [sym.imp.ucrtbase.dll___acrt_iob_func]
add esp, 4
push str.Failed_to_open_MSI_service_n
push eax
call sym._fprintf
add esp, 8
mov edi, 1
push esi
call dword [sym.imp.advapi32.dll_CloseServiceHandle]
mov eax, edi
add esp, 4
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x403850
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
mov esi, edx
mov edi, ecx
mov ebx, dword [ebp + 8]
push 8
push 0
push ecx
call dword [sym.imp.kernel32.dll_LoadLibraryExW]
mov dword [ebx], eax
test eax, eax
je 0x40387f
push esi
push eax
call dword [sym.imp.kernel32.dll_GetProcAddress]
test eax, eax
je 0x4038aa
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, edi
call sym._wine_dbgstr_w
mov esi, eax
push 2
call dword [sym.imp.ucrtbase.dll___acrt_iob_func]
add esp, 4
push esi
push str.Unable_to_load_dll__s_n
push eax
call sym._fprintf
add esp, 0xc
push 1
call dword [sym.imp.kernel32.dll_ExitProcess]
mov ecx, edi
call sym._wine_dbgstr_w
mov edi, eax
push 2
call dword [sym.imp.ucrtbase.dll___acrt_iob_func]
add esp, 4
push esi
push edi
push str.Dll__s_does_not_implement_function__s_n
push eax
call sym._fprintf
add esp, 0x10
push dword [ebx]
call dword [sym.imp.kernel32.dll_FreeLibrary]
push 1
call dword [sym.imp.kernel32.dll_ExitProcess]

Function at 0x403910
Capabilities:
Contain obfuscated stackstrings

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov word [ebp - 4], 0x72
mov dword [ebp - 8], 0x65767265
mov dword [ebp - 0xc], 0x5349534d
lea eax, [ebp - 0xc]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], sym._ServiceMain_8
xorps xmm0, xmm0
movlps qword [ebp - 0x14], xmm0
test byte [0x407010], 8
je 0x40395c
mov dword [esp + 0xc], str.Starting_MSIServer_service_n
mov dword [esp + 8], str.DoService
call sym._wine_dbg_log_1
lea eax, [ebp - 0x1c]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_StartServiceCtrlDispatcherA]
sub esp, 4
mov ecx, eax
xor eax, eax
test ecx, ecx
jne 0x403995
mov dword [esp], 2
call dword [sym.imp.ucrtbase.dll___acrt_iob_func]
mov dword [esp], eax
mov dword [esp + 4], str.Failed_to_start_MSIServer_service_n
call sym._fprintf_1
mov eax, 1
add esp, 0x2c
pop ebp
ret
Function at 0x4039a0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push eax
push sym._ServiceCtrlHandler_4
push str.MSIServer
call dword [sym.imp.advapi32.dll_RegisterServiceCtrlHandlerA]
mov dword [0x40704c], eax
test eax, eax
je 0x403a1e
mov ecx, 2
call sym._UpdateSCMStatus
sub esp, 0x10
movaps xmm0, xmmword [0x4059a0]
movups xmmword [esp], xmm0
call dword [sym.imp.kernel32.dll_CreateEventW]
mov dword [0x407050], eax
test eax, eax
je 0x403a3b
lea eax, [ebp - 4]
push eax
push 0
push 0
push sym._ServiceExecutionThread_4
push 0
push 0
call dword [sym.imp.kernel32.dll_CreateThread]
mov dword [0x407054], eax
test eax, eax
je 0x403a4d
mov ecx, 4
call sym._UpdateSCMStatus
push 0xffffffffffffffff
push dword [0x407054]
call dword [sym.imp.kernel32.dll_WaitForSingleObject]
jmp 0x403a96
push 2
call dword [sym.imp.ucrtbase.dll___acrt_iob_func]
add esp, 4
push str.Failed_to_register_service_ctrl_handler_n
push eax
call sym._fprintf_1
add esp, 0xc
pop ebp
ret 8
push 2
call dword [sym.imp.ucrtbase.dll___acrt_iob_func]
add esp, 4
push str.Failed_to_create_event_n
jmp 0x403a5d
push 2
call dword [sym.imp.ucrtbase.dll___acrt_iob_func]
add esp, 4
push str.Failed_to_create_thread_n
push eax
call sym._fprintf_1
add esp, 8
test byte [0x407010], 8
je 0x403a8a
sub esp, 0x10
mov dword [esp + 0xc], str.Killing_service_n
mov dword [esp + 8], str.KillService
call sym._wine_dbg_log_1
add esp, 0x10
push dword [0x407050]
call dword [sym.imp.kernel32.dll_SetEvent]
mov ecx, 1
call sym._UpdateSCMStatus
add esp, 4
pop ebp
ret 8

Function at 0x403de0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push eax
mov edi, dword [ebp + 8]
push edi
call dword [sym.imp.ucrtbase.dll_strlen]
add esp, 4
test eax, eax
je 0x403e32
mov esi, eax
xor eax, eax
cmp byte [esi + edi - 1], 0xa
je 0x403e11
mov eax, dword fs:[0x18]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x24]
xchg dword [0x4070ec], eax
push 2
call dword [sym.imp.ucrtbase.dll___acrt_iob_func]
add esp, 4
push eax
push esi
push 1
push edi
call dword [sym.imp.ucrtbase.dll_fwrite]
add esp, 0x10
jmp 0x403e34
xor eax, eax
add esp, 4
pop esi
pop edi
pop ebp
ret