joyce8/EMBER2024-capa huggingface dataset:
Function at 0x5556fb
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 0x555798
push ebx
push esi
call fcn.005556c4
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.00551dfb
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x555745
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x555797
push edi
push eax
call fcn.0054b926
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x555765
call fcn.0054b8ec
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x555796
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.00551dfb
add esp, 0x20
test eax, eax
jne 0x555784
push edi
call fcn.0054b8ec
jmp 0x55578c
push ebx
call fcn.0054b8ec
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 0x55579b
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x5557ac
pop esi
ret
push ebx
push edi
push esi
call fcn.005556c4
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.0054b926
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x5557d4
push ebx
push esi
push edi
call fcn.00533a40
add esp, 0xc
push 0
call fcn.0054b8ec
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x555f2e
Capabilities:
Set environment variable

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

Function at 0x557e9a
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push esi
push edi
call fcn.0054b601
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 0x557f09
cmp esi, dword [ebp - 4]
je 0x557f04
cmp dword [ebp + 0xc], 0
je 0x557f04
mov esi, dword [edi + 0x50]
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x557ee1
push dword [edi + 0x50]
sub esi, ecx
sar esi, 1
call fcn.005579ec
pop ecx
xor ecx, ecx
cmp eax, esi
setne cl
mov eax, ecx
jmp 0x557f0b
xor eax, eax
inc eax
jmp 0x557f0b
xor eax, eax
pop edi
pop esi
leave
ret
Function at 0x557f70
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x59e060]
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.0054b601
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.0054b601
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 0x557fe7
cmp word [ecx], dx
je 0x557fe7
mov eax, dword [0x56ef6c]
push edi
dec eax
push eax
push 0x56ee58
call fcn.00557f0f
mov eax, dword [ebp - 0x14]
add esp, 0xc
xor edx, edx
mov dword [ebp - 0x10], edx
mov eax, dword [eax]
test eax, eax
je 0x55805a
cmp word [eax], dx
je 0x55805a
mov eax, dword [edi]
test eax, eax
je 0x55800b
cmp word [eax], dx
je 0x55800b
lea eax, [ebp - 0x10]
push eax
call fcn.005578f2
jmp 0x558014
lea eax, [ebp - 0x10]
push eax
call fcn.0055798d
cmp dword [ebp - 0x10], 0
pop ecx
jne 0x558084
mov eax, dword [0x56ee54]
push dword [ebp - 0x14]
dec eax
push eax
push 0x56eb48
call fcn.00557f0f
add esp, 0xc
test al, al
je 0x558084
mov eax, dword [edi]
xor edi, edi
test eax, eax
je 0x55804f
cmp word [eax], di
je 0x55804f
lea eax, [ebp - 0x10]
push eax
call fcn.005578f2
pop ecx
jmp 0x558086
lea eax, [ebp - 0x10]
push eax
call fcn.0055798d
jmp 0x55804c
mov eax, dword [edi]
test eax, eax
je 0x558071
cmp word [eax], dx
je 0x558071
lea eax, [ebp - 0x10]
push eax
call fcn.005578a7
pop ecx
jmp 0x558084
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 0x55814f
lea eax, [ebp - 0x10]
push eax
lea eax, [esi + 0x100]
neg esi
sbb esi, esi
and esi, eax
push esi
call fcn.00557d94
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x55814f
movzx ecx, si
push ecx
call dword [sym.imp.KERNEL32.dll_IsValidCodePage]
test eax, eax
je 0x55814f
push 1
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_IsValidLocale]
test eax, eax
je 0x55814f
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x5580dc
mov dword [eax], esi
mov eax, dword [ebp - 0x14]
push edi
push 0x55
add eax, 0x250
push eax
push dword [ebp - 0xc]
call fcn.0054ded8
test ebx, ebx
je 0x55814a
push edi
push 0x55
lea eax, [ebx + 0x120]
push eax
push dword [ebp - 0xc]
call fcn.0054ded8
push 0x40
push ebx
push 0x1001
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x55814f
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 0x55814f
push 0xa
push 0x10
lea ecx, [ebx + 0x100]
push ecx
push esi
call fcn.0055c48d
add esp, 0x10
xor eax, eax
inc eax
jmp 0x558151
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005325b3
leave
ret
Function at 0x55ca85
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.0055ca01
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x55cbf4
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x55cbf4
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x55cba9
jg 0x55cae1
test eax, eax
je 0x55cb9f
push 1
push 0x1000
call fcn.0054d768
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x55cb04
push 0xc
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x55cb96
push 0x8000
push ebx
call fcn.005452cb
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x55cb2d
jg 0x55cb28
cmp ecx, 0x1000
jb 0x55cb2d
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.0054eb4e
add esp, 0x10
cmp eax, 0xffffffff
je 0x55cb72
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 0x55cb28
jl 0x55cb59
test ecx, ecx
jne 0x55cb1a
push dword [ebp - 0xc]
push ebx
call fcn.005452cb
push esi
call fcn.0054b8ec
add esp, 0xc
xor ebx, ebx
jmp 0x55cc02
cmp byte [edi + 0x24], 0
je 0x55cb89
cmp dword [edi + 0x20], 5
jne 0x55cb89
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x55cb94
mov ebx, dword [edi + 0x18]
jmp 0x55cb96
xor ebx, ebx
push esi
call fcn.0054b8ec
pop ecx
jmp 0x55cc02
test ecx, ecx
jg 0x55cb6b
jl 0x55cba9
test eax, eax
jae 0x55cb6b
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.0054ef70
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x55cbc9
cmp byte [edi + 0x1c], 0
je 0x55cb6b
jmp 0x55cbfa
push ebx
call fcn.005528a7
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x55cb6b
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 0x55cc02
cmp byte [edi + 0x1c], 0
je 0x55cbff
mov ebx, dword [edi + 0x18]
jmp 0x55cc02
push 0x16
pop ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.0054ef70
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x55d1d0
Capabilities:
Parse pe header

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

Disassembly:
cmp ecx, dword [0x410284]
jne 0x401eac
repz ret
jmp fcn.00403e53

Function at 0x408a51
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
pushal
call 0x408a60
pop dword [ebp - 0x40]
mov eax, 0x747ea94
add eax, 0xf8f89fcc
sub dword [ebp - 0x40], eax
mov dword [ebp - 0x50], 0x51b7be58
add dword [ebp - 0x50], 0xfc9a86f3
mov dword [ebp - 0x4c], 0xfb72f767
add dword [ebp - 0x4c], 0x36c054de
mov dword [ebp - 0x48], 0xbf5144c0
sub dword [ebp - 0x48], 0x73050092
mov dword [ebp - 0x44], 0x97692382
sub dword [ebp - 0x44], 0x97692382
lea eax, [ebp - 0x50]
push eax
mov eax, sym.imp.kernel32.dll_LoadLibraryA
add eax, dword [ebp - 0x40]
call dword [eax]
mov dword [ebp - 0x50], 0x4b013851
sub dword [ebp - 0x50], 0xd68ecefb
mov dword [ebp - 0x4c], 0x156d01b8
add dword [ebp - 0x4c], 0x2bff5fbd
mov dword [ebp - 0x48], 0x26824848
add dword [ebp - 0x48], 0x3ced2424
mov dword [ebp - 0x44], 0xeaf2d7c
add dword [ebp - 0x44], 0xf150d284
lea ebx, [ebp - 0x50]
push ebx
push eax
mov eax, 0xd89195d8
add eax, 0x27af3a74
add eax, dword [ebp - 0x40]
call dword [eax]
push 0x40
push 0x1000
push 0x3aa77
push 0
call eax
mov ecx, 0xee96cd28
add ecx, 0x11697f67
xor esi, esi
add esi, eax
mov edi, 0x40ed8f34
add edi, 0xbf5420cc
add edi, dword [ebp - 0x40]
mov ebx, 0xa48a8375
add ebx, 0x5a13154
mov edx, dword [edi]
sub dword [ebp - 0x28], 0x757193a6
add edx, ebx
sub dword [ebp - 0x10], 0xad734562
mov dword [esi], edx
xor dword [ebp - 0x24], esi
add esi, 0xb739b803
sub esi, 0xb739b7ff
add edi, 0x88578702
sub edi, 0x885786fe
loop 0x408b7f
add eax, 0x6b3856f3
add eax, 0x94c8ce1c
mov ebx, eax
add eax, 0xe7b3d4d4
sub eax, 0xe7b3d4cf
mov ecx, 0x4291da58
add ecx, 0xbdae25a8
add ecx, dword [ebp - 0x40]
call ebx
leave
ret
Function at 0x401890
Capabilities:
Read file on windows

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push ebx
push ecx
lea ebx, [ebp - 0xc]
sub esp, 0x30
mov eax, dword [ecx]
mov edx, dword [ecx + 4]
mov ecx, dword [ecx + 8]
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], 0
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_ReadFile]
sub esp, 0x14
test eax, eax
mov eax, 0
cmovne eax, dword [ebp - 0xc]
lea esp, [ebp - 8]
pop ecx
pop ebx
pop ebp
lea esp, [ecx - 4]
ret

Function at 0x401930
Capabilities:
Write file on windows

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push ebx
push ecx
lea ebx, [ebp - 0xc]
sub esp, 0x30
mov eax, dword [ecx]
mov edx, dword [ecx + 4]
mov ecx, dword [ecx + 8]
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], 0
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_WriteFile]
sub esp, 0x14
test eax, eax
mov eax, 0
cmovne eax, dword [ebp - 0xc]
lea esp, [ebp - 8]
pop ecx
pop ebx
pop ebp
lea esp, [ecx - 4]
ret

Function at 0x401b20
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, eax
sub esp, 0x14
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetFileAttributesW]
sub esp, 4
cmp eax, 0xffffffff
je 0x401b50
test al, 0x10
je 0x401b50
mov ebx, dword [ebp - 4]
mov eax, 1
leave
ret
mov dword [esp + 4], 0
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_CreateDirectoryW]
sub esp, 8
test eax, eax
jne 0x401b3e
mov eax, dword fs:[0x18]
cmp dword [eax + 0x34], 0xb7
mov ebx, dword [ebp - 4]
leave
sete al
movzx eax, al
ret

Function at 0x401b80
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
xor ebx, ebx
sub esp, 0x10
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll__wcsdup]
test eax, eax
je 0x401bb4
mov dword [esp], eax
mov esi, eax
call dword [sym.imp.shlwapi.dll_PathRemoveFileSpecW]
sub esp, 4
test eax, eax
jne 0x401bc0
xor ebx, ebx
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_free]
lea esp, [ebp - 8]
mov eax, ebx
pop ebx
pop esi
pop ebp
ret
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_GetFileAttributesW]
sub esp, 4
cmp eax, 0xffffffff
je 0x401bda
mov ebx, 1
test al, 0x10
jne 0x401bab
movzx eax, word [esi]
mov ebx, esi
test ax, ax
jne 0x401bfc
jmp 0x401c26
movzx eax, word [ebx + 2]
add ebx, 2
test ax, ax
je 0x401c26
cmp ax, 0x5c
jne 0x401bf0
xor edx, edx
mov eax, esi
mov word [ebx], dx
call sym._create_directory
test eax, eax
je 0x401ba9
mov eax, 0x5c
add ebx, 2
mov word [ebx - 2], ax
movzx eax, word [ebx]
test ax, ax
jne 0x401bfc
mov eax, esi
call sym._create_directory
mov ebx, eax
jmp 0x401bab
Function at 0x401c40
Capabilities:
Create directory
Get common file path

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
lea esi, [ebp - 0x220]
push ebx
sub esp, 0x23c
mov dword [ebp - 0x22c], eax
mov dword [esp + 4], esi
mov dword [esp], 0x104
call dword [sym.imp.kernel32.dll_GetTempPathW]
sub esp, 8
test eax, eax
je 0x401d08
mov dword [esp], 0xc
mov edi, dword [sym.imp.ucrtbase.dll_malloc]
call edi
mov ebx, eax
test eax, eax
je 0x401d08
mov dword [esp], 0x230
call edi
mov dword [ebx + 8], eax
mov edx, eax
test eax, eax
je 0x401d3b
mov edi, dword [sym.imp.kernel32.dll_GetTempFileNameW]
jmp 0x401cce
mov eax, dword [ebx + 8]
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CreateDirectoryW]
sub esp, 8
test eax, eax
jne 0x401d18
mov edx, dword [ebx + 8]
mov eax, dword [0x40a060]
mov dword [esp + 0xc], edx
mov dword [esp + 4], 0x40b000
inc eax
mov dword [esp], esi
mov dword [0x40a060], eax
mov dword [esp + 8], eax
call edi
sub esp, 0x10
test eax, eax
jne 0x401cb0
mov eax, dword [ebx + 8]
mov esi, dword [sym.imp.ucrtbase.dll_free]
mov dword [esp], eax
call esi
mov dword [esp], ebx
call esi
xor edx, edx
lea esp, [ebp - 0xc]
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [ebp - 0x22c]
lea eax, [ecx + 8]
mov dword [ebx], eax
mov eax, dword [ecx + 0xc]
mov dword [ebx + 4], eax
mov dword [eax], ebx
mov edx, dword [ebx + 8]
mov dword [ecx + 0xc], ebx
lea esp, [ebp - 0xc]
pop ebx
mov eax, edx
pop esi
pop edi
pop ebp
ret
mov dword [ebp - 0x22c], eax
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_free]
mov edx, dword [ebp - 0x22c]
jmp 0x401d0a
Function at 0x401d60
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively

Disassembly:
test eax, eax
je 0x401e80
push ebp
mov edx, 0x40b06e
mov ebp, esp
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x27c
call sym._path_combine.part.0
mov edi, eax
test eax, eax
je 0x401e4f
lea eax, [ebp - 0x268]
mov dword [esp], edi
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_FindFirstFileW]
mov esi, eax
mov eax, dword [sym.imp.ucrtbase.dll_free]
sub esp, 8
mov dword [esp], edi
mov dword [ebp - 0x26c], eax
call eax
cmp esi, 0xffffffff
je 0x401e43
lea edi, [ebp - 0x23c]
mov dword [esp + 4], 0x40b072
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_wcscmp]
test eax, eax
je 0x401e1d
mov dword [esp + 4], 0x40b076
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_wcscmp]
test eax, eax
je 0x401e1d
mov edx, edi
mov eax, ebx
call sym._path_combine.part.0
test eax, eax
je 0x401e1d
test byte [ebp - 0x268], 0x10
je 0x401e60
mov dword [ebp - 0x270], eax
call sym._delete_directory.isra.0
mov edx, dword [ebp - 0x270]
mov dword [esp], edx
mov eax, dword [ebp - 0x26c]
call eax
lea eax, [ebp - 0x268]
mov dword [esp], esi
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_FindNextFileW]
sub esp, 8
test eax, eax
jne 0x401dc1
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_FindClose]
sub esp, 4
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_RemoveDirectoryW]
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], eax
mov dword [ebp - 0x270], eax
call dword [sym.imp.kernel32.dll_DeleteFileW]
mov edx, dword [ebp - 0x270]
sub esp, 4
jmp 0x401e12
ret
Function at 0x402070
Capabilities:
Extract cabinet on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, eax
lea eax, [ebp - 0x24]
push ebx
sub esp, 0x5c
mov dword [ebp - 0x2c], edx
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], sym._cabinet_seek
mov dword [esp + 0x14], sym._cabinet_close
mov dword [esp + 0x10], sym._cabinet_write
mov dword [esp + 0xc], sym._cabinet_read
mov dword [esp + 8], sym._cabinet_open
mov dword [esp + 4], sym._cabinet_free
mov dword [esp], sym._cabinet_alloc
call sym._FDICreate
test eax, eax
je 0x4021d0
mov ebx, eax
test esi, esi
je 0x4021e0
mov ecx, dword [sym.imp.kernel32.dll_WideCharToMultiByte]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [ebp - 0x34], ecx
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov dword [esp], 0
call ecx
sub esp, 0x20
mov dword [ebp - 0x30], eax
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
mov edi, eax
test eax, eax
je 0x4021e0
mov edx, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x34]
mov dword [esp + 8], esi
mov dword [esp + 0x1c], 0
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 4], 0
mov dword [esp], 0
call ecx
mov eax, dword [ebp - 0x2c]
sub esp, 0x20
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], sym._cabinet_notify
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], edi
mov dword [esp], ebx
call sym._FDICopy
mov dword [esp], edi
mov esi, eax
call dword [sym.imp.ucrtbase.dll_free]
mov dword [esp], ebx
call sym._FDIDestroy
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
lea esp, [ebp - 0xc]
xor esi, esi
pop ebx
mov eax, esi
pop esi
pop edi
pop ebp
ret
xor esi, esi
jmp 0x4021b6
Function at 0x402a30
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
and esp, 0xfffffff0
sub esp, 0x10
mov esi, dword [ebp + 8]
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_strlen]
mov ebx, eax
xor eax, eax
test ebx, ebx
je 0x402a8b
cmp byte [esi + ebx - 1], 0xa
je 0x402a5f
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x24]
xchg dword [0x40a118], eax
mov dword [esp], 2
call dword [sym.imp.ucrtbase.dll___acrt_iob_func]
mov dword [esp + 8], ebx
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_fwrite]
lea esp, [ebp - 8]
pop ebx
pop esi
pop ebp
ret
Function at 0x406430
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, edx
push esi
mov esi, eax
push ebx
sub esp, 0x3c
mov eax, dword [edx + 0x10]
mov dword [ebp - 0x1c], ecx
call sym._expand_expression.isra.0
mov ecx, dword [edi + 0x10]
mov ebx, eax
test ecx, ecx
je 0x406498
test eax, eax
je 0x406550
cmp word [ebx], 0
mov eax, ebx
je 0x406560
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x406468
sub eax, ebx
add eax, 2
mov edx, dword [ebp + 8]
test edx, edx
je 0x4064a5
mov esi, 1
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_free]
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
test eax, eax
jne 0x406459
mov edx, dword [ebp + 8]
xor eax, eax
test edx, edx
jne 0x40647d
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], eax
mov eax, dword [edi + 8]
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov dword [esp], esi
call dword [sym.imp.advapi32.dll_RegSetValueExW]
sub esp, 0x18
test eax, eax
je 0x40647d
xor esi, esi
test byte [0x40a030], 2
je 0x406482
mov esi, dword [edi + 8]
test esi, esi
je 0x40657f
mov eax, esi
shr eax, 0x10
je 0x40656a
mov dword [esp + 4], 0xffffffff
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, 0x40b015
test edx, edx
jne 0x40651b
mov edx, 0xffffffff
mov eax, esi
call sym._wine_dbgstr_wn.part.0
mov dword [esp + 0x10], eax
xor esi, esi
mov dword [esp + 0xc], str.Failed_to_set_registry_key__s_n
mov dword [esp + 8], str.install_registry_string
mov dword [esp + 4], 0x40a030
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
jmp 0x406482
lea esp, [ebp - 0xc]
xor esi, esi
pop ebx
mov eax, esi
pop esi
pop edi
pop ebp
ret
mov eax, 2
jmp 0x406476
movzx esi, si
mov dword [esp], 0x40b008
mov dword [esp + 4], esi
call sym._wine_dbg_sprintf.constprop.0
jmp 0x40651b
mov eax, 0x40b00e
jmp 0x40651b
Function at 0x408160
Capabilities:
Accept command line arguments
Create process on windows
Create process suspended
Get common file path
Terminate process

Disassembly:
push ebp
xor eax, eax
mov ecx, 0x10
mov ebp, esp
push edi
push esi
lea edx, [ebp - 0x260]
lea esi, [ebp - 0x264]
push ebx
mov edi, edx
lea ebx, [ebp - 0x220]
sub esp, 0x2ac
mov dword [ebp - 0x27c], 1
rep stosd dword es:[edi], eax
mov dword [esp], ebx
mov dword [ebp - 0x264], 0x44
mov dword [esp + 4], 0x104
call dword [sym.imp.kernel32.dll_GetSystemDirectoryW]
sub esp, 8
mov dword [esp + 4], str.wusa.exe
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_wcscat]
lea eax, [ebp - 0x278]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_Wow64DisableWow64FsRedirection]
sub esp, 4
call dword [sym.imp.kernel32.dll_GetCommandLineW]
lea edx, [ebp - 0x274]
mov dword [esp], ebx
mov dword [esp + 0x24], edx
mov dword [esp + 0x20], esi
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_CreateProcessW]
sub esp, 0x28
test eax, eax
je 0x4082b0
test byte [0x40a030], 8
jne 0x4082fa
mov eax, dword [ebp - 0x274]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_WaitForSingleObject]
push eax
push eax
lea eax, [ebp - 0x27c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x274]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetExitCodeProcess]
mov eax, dword [ebp - 0x274]
mov ebx, dword [sym.imp.kernel32.dll_CloseHandle]
push edx
push edx
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x270]
push ecx
mov dword [esp], eax
call ebx
push ebx
mov eax, dword [ebp - 0x278]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_Wow64RevertWow64FsRedirection]
mov eax, dword [ebp - 0x27c]
sub esp, 4
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_ExitProcess]
test byte [0x40a030], 2
je 0x40828f
mov eax, dword fs:[0x18]
or edx, 0xffffffff
mov esi, dword [eax + 0x34]
mov eax, ebx
call sym._wine_dbgstr_wn
mov dword [esp + 0xc], str.Failed_to_restart_64_bit__s__err__lu_n
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.restart_as_x86_64
mov dword [esp + 4], 0x40a030
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
jmp 0x40828f
or edx, 0xffffffff
mov eax, ebx
call sym._wine_dbgstr_wn
mov dword [esp + 0xc], str.Restarting__s_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.restart_as_x86_64
mov dword [esp + 4], 0x40a030
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x40823d
Function at 0x409730
Capabilities:
Get process heap force flags
Terminate process

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
and esp, 0xfffffff0
sub esp, 0x10
mov dword [esp], 1
call sym.__configure_wide_argv
call sym.__initialize_wide_environment
call sym.___p___argc
mov esi, dword [eax]
call sym.___p___wargv
mov edi, dword [eax]
call sym.__get_initial_wide_environment
mov ebx, eax
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 8]
mov edx, dword [eax + 0x3c]
cmp word [eax + edx + 0x5c], 2
sete al
movzx eax, al
inc eax
mov dword [esp], eax
call sym.__set_app_type
mov dword [esp + 8], ebx
mov dword [esp + 4], edi
mov dword [esp], esi
call sym._wmain
mov dword [esp], eax
call sym._exit
nop
nop