joyce8/EMBER2024-capa huggingface dataset:
Function at 0x404fd0
Capabilities:
Read file on windows
Terminate process

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x3c
mov eax, dword [ebp + 0x14]
mov esi, dword [ebp + 8]
mov ebx, dword [ebp + 0x10]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_ReadConsoleW]
mov edx, eax
sub esp, 0x14
mov eax, 1
test edx, edx
je 0x405020
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov edi, dword [0x4243c8]
test edi, edi
je 0x405098
lea eax, [ebp - 0x1c]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], ebx
mov dword [esp + 4], edi
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_ReadFile]
sub esp, 0x14
test eax, eax
je 0x405010
mov esi, dword [ebp - 0x1c]
call dword [sym.imp.kernel32.dll_GetConsoleCP]
mov ecx, dword [ebp + 0xc]
mov dword [esp + 0x14], ebx
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], ecx
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_MultiByteToWideChar]
mov ecx, dword [ebp + 0x14]
sub esp, 0x18
mov dword [ecx], eax
lea esp, [ebp - 0xc]
mov eax, 1
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], 0xffff
call dword [sym.imp.ucrtbase.dll_malloc]
mov edi, eax
test eax, eax
je 0x4050b5
mov dword [0x4243c8], eax
jmp 0x40502a
test byte [0x423030], 2
jne 0x4050cb
mov dword [esp], 1
call dword [sym.imp.kernel32.dll_ExitProcess]
mov dword [esp + 0xc], str.Out_of_memory_n
mov dword [esp + 8], str.xalloc
mov dword [esp + 4], 0x423030
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0_3
jmp 0x4050be
Function at 0x405100
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, edx
push ebx
sub esp, 0x2c
mov dword [ebp - 0x1c], eax
mov edi, dword [sym.imp.ucrtbase.dll_malloc]
mov dword [ebp - 0x20], ecx
mov dword [esp], 0x21c
call edi
test eax, eax
je 0x40523a
mov ebx, eax
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x405210
mov eax, dword [esi]
lea eax, [eax + eax + 2]
mov dword [esp], eax
call edi
mov edx, eax
test eax, eax
je 0x40523a
mov ecx, dword [esi]
mov dword [ebx], eax
mov dword [esp], edx
lea eax, [ecx + ecx]
mov dword [ebp - 0x28], ecx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x24], edx
mov dword [esp + 4], eax
call sym._memcpy
mov edx, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x28]
xor eax, eax
mov word [edx + ecx*2], ax
mov eax, dword [ebp + 8]
mov eax, dword [eax]
lea eax, [eax + eax + 2]
mov dword [esp], eax
call edi
mov edi, eax
test eax, eax
je 0x40523a
mov dword [ebx + 4], eax
mov eax, dword [ebp + 8]
mov edx, dword [eax]
mov dword [esp], edi
lea eax, [edx + edx]
mov dword [ebp - 0x24], edx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x20]
mov dword [esp + 4], eax
call sym._memcpy
mov eax, dword [ebp + 8]
mov dword [esi], 0
xor ecx, ecx
mov edx, dword [ebp - 0x24]
mov dword [eax], 0
mov eax, dword [ebp + 0x10]
mov word [edi + edx*2], cx
xor edi, edi
mov dword [eax], esi
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp - 0x1c]
mov word [ebx + 0x14], di
mov dword [eax], esi
mov eax, dword [ebp + 0x14]
mov dword [ebx + 8], 0
mov dword [ebx + 0xc], eax
mov eax, dword [ebp + 0x18]
mov dword [ebx + 0x10], eax
mov eax, dword [ebp + 0x1c]
mov eax, dword [eax]
test eax, eax
je 0x405228
mov dword [eax + 8], ebx
mov eax, dword [ebp + 0x1c]
mov dword [eax], ebx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
xor eax, eax
mov dword [ebx], 0
mov dword [ebx + 4], 0
mov word [ebx + 0x14], ax
jmp 0x4051da
mov eax, dword [ebp + 0x20]
mov dword [eax], ebx
mov eax, dword [ebp + 0x1c]
mov dword [eax], ebx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
test byte [0x423030], 2
jne 0x405250
mov dword [esp], 1
call dword [sym.imp.kernel32.dll_ExitProcess]
mov dword [esp + 0xc], str.Out_of_memory_n
mov dword [esp + 8], str.xalloc
mov dword [esp + 4], 0x423030
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0_3
jmp 0x405243
Function at 0x406f30
Capabilities:
Manipulate console buffer

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov dword [esp], 0xfffffff5
call dword [sym.imp.kernel32.dll_GetStdHandle]
sub esp, 4
mov ebx, eax
lea eax, [ebp - 0x2e]
mov dword [esp + 4], eax
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_GetConsoleScreenBufferInfo]
sub esp, 8
test eax, eax
jne 0x406f70
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
movsx esi, word [ebp - 0x2c]
movsx eax, word [ebp - 0x2e]
lea edi, [ebp - 0x34]
mov dword [esp], ebx
mov dword [esp + 0x10], edi
inc esi
mov dword [esp + 0xc], 0
imul esi, eax
mov dword [esp + 4], 0x20
mov dword [esp + 8], esi
call dword [sym.imp.kernel32.dll_FillConsoleOutputCharacterW]
movzx eax, word [ebp - 0x26]
sub esp, 0x14
mov dword [esp + 0x10], edi
mov dword [esp + 8], esi
mov dword [esp], ebx
mov dword [esp + 0xc], 0
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_FillConsoleOutputAttribute]
sub esp, 0x14
mov dword [esp], ebx
mov dword [esp + 4], 0
call dword [sym.imp.kernel32.dll_SetConsoleCursorPosition]
sub esp, 8
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x40ac80
Capabilities:
Get disk size

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
lea esi, [ebp - 0x20]
push ebx
sub esp, 0x4c
mov dword [ebp - 0x20], 0x3a0063
mov word [ebp - 0x20], ax
lea eax, [ebp - 0x28]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x30]
mov dword [esp + 8], eax
lea eax, [ebp - 0x38]
mov dword [ebp - 0x1c], 0x5c
mov dword [esp + 4], eax
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_GetDiskFreeSpaceExW]
sub esp, 0x10
test byte [0x423020], 8
jne 0x40ad40
mov eax, dword [0x423164]
or eax, dword [0x4231f0]
jne 0x40ad2f
mov eax, dword [0x434420]
test eax, eax
je 0x40ad90
mov edx, dword [0x4231c4]
mov eax, dword [0x4231c0]
call sym._WCMD_filesize64
mov dword [esp], str._n_____Total_files_listed:_n_1_8d__files_2_25s__bytes_n
mov dword [esp + 8], eax
mov eax, dword [0x4231f8]
mov dword [esp + 4], eax
call sym._WCMD_output
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0x24]
call sym._WCMD_filesize64
mov dword [esp], str._1_8d__directories__2_18s__bytes_free_n_n
mov dword [esp + 8], eax
mov eax, dword [0x4231e4]
mov dword [esp + 4], eax
call sym._WCMD_output
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebx, eax
mov eax, dword fs:[0x18]
mov edi, dword [eax + 0x34]
mov eax, esi
call sym._wine_dbgstr_wn.constprop.0_1
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], edi
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Writing_trailer_for__s_gave__ld__ld__n
mov dword [esp + 8], str.WCMD_dir_trailer
mov dword [esp + 4], 0x423020
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_2
jmp 0x40acc8
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x28]
call sym._WCMD_filesize64
mov dword [esp], str.__1_18s__bytes_free_n_n
mov dword [esp + 4], eax
call sym._WCMD_output
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x40e730
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
lea esi, [ebp - 0x24]
push ebx
sub esp, 0x4c
mov eax, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
mov dword [esp + 0x10], 0
mov dword [esp + 8], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 0xc], esi
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_ReadConsoleW]
sub esp, 0x14
test eax, eax
je 0x40e7b0
mov esi, dword [ebp - 0x24]
xor eax, eax
test esi, esi
je 0x40e7a7
lea esi, [esi]
movzx edx, word [ebx + eax*2]
cmp dx, 0xa
je 0x40e920
cmp dx, 0xd
je 0x40e920
inc eax
cmp esi, eax
jne 0x40e778
xor eax, eax
cmp esi, dword [ebp + 0xc]
sete al
sub esi, eax
xor eax, eax
mov word [ebx + esi*2], ax
mov eax, ebx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [ebp - 0x34], eax
call dword [sym.imp.kernel32.dll_GetOEMCP]
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x2c], eax
mov dword [esp], edi
call sym._xalloc
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x20], 0
mov edi, eax
lea eax, [ebp - 0x20]
mov dword [ebp - 0x1c], 0
mov dword [esp], ecx
mov ecx, dword [sym.imp.kernel32.dll_SetFilePointerEx]
mov dword [esp + 0x10], 1
mov dword [ebp - 0x30], ecx
mov dword [esp + 0xc], eax
mov dword [esp + 4], 0
mov dword [esp + 8], 0
call ecx
mov ecx, dword [ebp + 0xc]
sub esp, 0x14
mov dword [esp + 8], ecx
mov ecx, dword [ebp + 0x10]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], esi
mov dword [esp + 4], edi
mov dword [esp], ecx
call dword [sym.imp.kernel32.dll_ReadFile]
sub esp, 0x14
test eax, eax
je 0x40e940
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x40e940
lea edx, [edi + eax]
movzx esi, word [ebp - 0x2c]
mov ecx, dword [ebp - 0x34]
mov eax, edi
cmp edi, edx
jae 0x40e950
lea esi, [esi]
nop
movzx ecx, byte [eax]
cmp cl, 0xd
sete dl
cmp cl, 0xa
je 0x40e930
test dl, dl
jne 0x40e930
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov dword [esp], esi
call dword [sym.imp.user32.dll_CharNextExA]
mov edx, dword [ebp - 0x24]
sub esp, 0xc
add edx, edi
cmp eax, edx
jb 0x40e860
mov ecx, eax
sub ecx, edi
cmp byte [eax], 0xd
sete dl
lea eax, [ecx + 1]
movzx edx, dl
mov dword [ebp - 0x34], ecx
add eax, edx
mov dword [esp + 0x10], 0
cdq
add dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
adc dword [ebp - 0x1c], edx
mov edx, dword [ebp - 0x1c]
mov dword [esp + 4], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 8], edx
mov dword [esp], eax
mov eax, dword [ebp - 0x30]
mov dword [esp + 0xc], 0
call eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x34]
sub esp, 0x14
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], ecx
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_MultiByteToWideChar]
sub esp, 0x18
mov esi, eax
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_free]
jmp 0x40e795
mov esi, eax
jmp 0x40e795
sub eax, edi
mov ecx, eax
lea eax, [eax + 1]
jmp 0x40e8a8
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_free]
xor eax, eax
jmp 0x40e7a7
cmp byte [edi], 0xd
mov eax, 1
sete dl
jmp 0x40e8a8
Function at 0x4128f0
Capabilities:
Terminate process
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x12c
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._WCMD_skip_leading_spaces
cmp word [eax], 0
je 0x412978
mov esi, eax
mov ebx, 0x4382e0
xor edi, edi
jmp 0x412929
inc edi
add ebx, 0x14
cmp edi, 0x2f
je 0x412988
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], esi
mov dword [esp + 4], 0x1001
mov dword [esp], 0x400
call dword [sym.imp.kernel32.dll_CompareStringW]
sub esp, 0x18
cmp eax, 2
jne 0x412920
mov dword [esp], edi
call sym._WCMD_LoadMessage
mov dword [ebp + 8], eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
jmp sym._WCMD_output_asis
mov dword [esp], 0x3e8
jmp 0x412961
mov ebx, str.ATTRIB
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], esi
mov dword [esp + 4], 0x1001
mov dword [esp], 0x400
call dword [sym.imp.kernel32.dll_CompareStringW]
sub esp, 0x18
cmp eax, 2
je 0x4129ed
add ebx, 0x14
cmp ebx, 0x43829c
jne 0x41298d
mov dword [esp], 0x3f5
call sym._WCMD_LoadMessage
mov dword [esp + 4], esi
mov dword [esp], eax
call sym._WCMD_output
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
xor eax, eax
lea ecx, [ebp - 0x118]
lea esi, [esi]
movzx edx, word [esi + eax]
mov word [ecx + eax], dx
add eax, 2
test dx, dx
jne 0x4129f8
cmp word [ebp - 0x118], 0
mov edx, ecx
je 0x412a21
lea esi, [esi]
add edx, 2
cmp word [edx], 0
jne 0x412a18
xor eax, eax
mov ebx, 0x20
jmp 0x412a37
movzx ebx, word [eax + 0x436408]
mov word [edx + eax], bx
add eax, 2
test bx, bx
jne 0x412a30
mov dword [esp + 4], 0
mov dword [esp], ecx
call sym._WCMD_run_program
jmp 0x4129e5
Function at 0x417190
Capabilities:
Terminate process
Write file on windows

Disassembly:
push ebp
mov eax, 0xfffffff5
mov ebp, esp
mov edx, dword [ebp + 8]
pop ebp
jmp sym._WCMD_output_asis_handle

Function at 0x4171b0
Capabilities:
Terminate process
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, edx
push esi
push ebx
sub esp, 0x83c
mov dword [ebp - 0x830], edx
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_GetStdHandle]
mov dword [ebp - 0x838], eax
call eax
mov dword [ebp - 0x834], eax
mov eax, dword [0x4243e4]
sub esp, 4
test eax, eax
jne 0x417228
cmp word [edi], 0
mov edx, edi
je 0x417372
lea esi, [esi]
add edx, 2
cmp word [edx], 0
jne 0x4171f8
sub edx, dword [ebp - 0x830]
sar edx, 1
mov ecx, dword [ebp - 0x834]
mov eax, dword [ebp - 0x830]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
jmp sym._WCMD_output_asis_len
mov eax, dword [ebp - 0x830]
movzx edx, word [eax]
test dx, dx
je 0x4172ed
lea esi, [esi]
cmp dx, 0xa
je 0x4172ed
mov edi, dword [0x42338c]
mov ecx, dword [0x4243a4]
xor eax, eax
mov ebx, dword [ebp - 0x830]
jmp 0x417281
movzx edx, word [ebx + 2]
add ebx, 2
inc ecx
test dx, dx
setne byte [ebp - 0x829]
cmp dx, 0xa
setne al
and al, byte [ebp - 0x829]
je 0x417289
cmp ecx, edi
jl 0x417260
test al, al
je 0x41728f
mov dword [0x4243a4], ecx
cmp dx, 0xa
lea eax, [ebx + 2]
mov ecx, dword [ebp - 0x834]
cmove ebx, eax
mov eax, dword [ebp - 0x830]
mov edx, ebx
sub edx, eax
sar edx, 1
call sym._WCMD_output_asis_len
mov eax, dword [0x4232ec]
mov edi, dword [0x423384]
mov dword [0x4243a4], 0
inc eax
lea edx, [edi - 1]
mov dword [0x4232ec], eax
cmp eax, edx
jge 0x4172f8
movzx edx, word [ebx]
test dx, dx
je 0x41736a
mov dword [ebp - 0x830], ebx
test dx, dx
jne 0x417240
mov ebx, dword [ebp - 0x830]
jmp 0x41728f
mov eax, dword [0x4243dc]
mov dword [0x4232ec], 0
cmp word [eax], 0
je 0x417379
mov edx, eax
nop
add edx, 2
cmp word [edx], 0
jne 0x417310
sub edx, eax
sar edx, 1
mov ecx, dword [ebp - 0x834]
lea edi, [ebp - 0x81c]
call sym._WCMD_output_asis_len
mov dword [esp], 0xfffffff6
mov eax, dword [ebp - 0x838]
call eax
lea edx, [ebp - 0x818]
sub esp, 4
mov dword [esp + 4], edx
mov dword [esp + 0xc], edi
mov dword [esp + 8], 0x400
mov dword [esp], eax
call sym._WCMD_ReadFile
movzx edx, word [ebx]
test dx, dx
jne 0x4172de
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
xor edx, edx
jmp 0x417209
xor edx, edx
jmp 0x41731d
Function at 0x417380
Capabilities:
Terminate process
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov dword [ebp - 0x20], 0
test edx, edx
jne 0x4173a0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea edi, [ebp - 0x20]
mov dword [esp + 0x10], 0
mov esi, eax
mov ebx, edx
mov dword [esp + 0xc], edi
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], ecx
mov dword [ebp - 0x2c], ecx
call dword [sym.imp.kernel32.dll_WriteConsoleW]
sub esp, 0x14
test eax, eax
jne 0x417394
mov eax, dword [0x434434]
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x1c], 0
test eax, eax
jne 0x417460
mov eax, dword [0x4243c8]
mov dword [ebp - 0x2c], eax
test eax, eax
je 0x417490
mov dword [ebp - 0x30], ecx
call dword [sym.imp.kernel32.dll_GetConsoleOutputCP]
lea edx, [ebp - 0x1c]
mov dword [esp + 0xc], ebx
mov dword [esp + 0x1c], edx
mov edx, dword [ebp - 0x2c]
mov dword [esp + 0x18], 0x43705e
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], 0xffff
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_WideCharToMultiByte]
mov edx, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x30]
sub esp, 0x20
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edi
mov dword [esp + 8], eax
mov dword [esp + 4], edx
mov dword [esp], ecx
call dword [sym.imp.kernel32.dll_WriteFile]
sub esp, 0x14
jmp 0x417394
add ebx, ebx
mov dword [esp + 0xc], edi
mov dword [esp + 8], ebx
mov dword [esp + 4], esi
mov dword [esp + 0x10], 0
mov dword [esp], ecx
call dword [sym.imp.kernel32.dll_WriteFile]
sub esp, 0x14
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [ebp - 0x30], ecx
mov dword [esp], 0xffff
call dword [sym.imp.ucrtbase.dll_malloc]
mov ecx, dword [ebp - 0x30]
test eax, eax
mov dword [ebp - 0x2c], eax
je 0x4174b7
mov eax, dword [ebp - 0x2c]
mov dword [0x4243c8], eax
jmp 0x4173f1
test byte [0x423030], 2
jne 0x4174cd
mov dword [esp], 1
call dword [sym.imp.kernel32.dll_ExitProcess]
mov dword [esp + 0xc], str.Out_of_memory_n
mov dword [esp + 8], str.xalloc
mov dword [esp + 4], 0x423030
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0_3
jmp 0x4174c0

Function at 0x417500
Capabilities:
Terminate process
Write file on windows

Disassembly:
push ebp
mov eax, 0xfffffff4
mov ebp, esp
mov edx, dword [ebp + 8]
pop ebp
jmp sym._WCMD_output_asis_handle
Function at 0x419070
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x1c
mov ebx, dword [ebp + 8]
mov dword [esp + 4], 0x2f
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_wcschr]
test eax, eax
je 0x4190b0
mov eax, dword fs:[0x18]
mov dword [eax + 0x34], 0x57
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
jmp sym._WCMD_print_error
mov edi, dword [sym.imp.kernel32.dll_LocalAlloc]
mov dword [esp + 4], 0x14
mov dword [esp], 0
call edi
sub esp, 8
mov esi, eax
mov dword [esp + 4], 0x800
mov dword [esp], 0
call edi
sub esp, 8
mov edi, eax
test esi, esi
je 0x419188
test eax, eax
je 0x419188
xor eax, eax
mov edx, 0x2f
jmp 0x419107
movzx edx, word [eax + 0x4366e2]
mov word [eax + 0x430420], dx
add eax, 2
test dx, dx
jne 0x419100
mov dword [esp + 4], edi
mov dword [esp], 0x400
call dword [sym.imp.kernel32.dll_GetCurrentDirectoryW]
mov dword [0x4231f0], 0
sub esp, 8
mov dword [esp], ebx
call sym._WCMD_setshow_default
mov eax, dword [0x4231f0]
test eax, eax
jne 0x419170
mov edx, dword [0x430408]
mov dword [esi + 8], edi
mov eax, 1
mov dword [esi], edx
test edx, edx
je 0x41915d
mov eax, dword [edx + 4]
inc eax
mov dword [esi + 4], eax
mov dword [0x430408], esi
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebx, dword [sym.imp.kernel32.dll_LocalFree]
mov dword [esp], esi
call ebx
sub esp, 4
mov dword [esp], edi
call ebx
sub esp, 4
jmp 0x419166
mov ebx, dword [sym.imp.kernel32.dll_LocalFree]
mov dword [esp], esi
call ebx
push edx
mov dword [esp], edi
call ebx
push ecx
test byte [0x423010], 2
je 0x419166
mov dword [esp + 0xc], str.out_of_memory_n
mov dword [esp + 8], str.WCMD_pushd
mov dword [esp + 4], 0x423010
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0_1
jmp 0x419166
Function at 0x41bd20
Capabilities:
Get common file path
Query environment variable

Disassembly:
mov eax, dword [0x4231c8]
test eax, eax
je 0x41be90
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x23c
mov ebx, dword [sym.imp.ucrtbase.dll__wcsicmp]
mov dword [esp + 4], str.ENABLEDELAYEDEXPANSION
mov dword [esp], 0x428400
call ebx
test eax, eax
jne 0x41be40
mov edi, 1
test byte [0x423010], 8
jne 0x41be10
mov dword [esp + 4], 0x14
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_LocalAlloc]
sub esp, 8
mov ebx, eax
test eax, eax
je 0x41beb8
call dword [sym.imp.kernel32.dll_GetEnvironmentStringsW]
mov esi, eax
test eax, eax
je 0x41be78
call sym._WCMD_dupenv.part.0
mov dword [ebx + 8], eax
test eax, eax
je 0x41be7f
mov eax, dword [0x4231c8]
mov eax, dword [eax + 4]
mov dword [ebx + 0xc], eax
mov eax, dword [0x434424]
mov dword [0x434424], ebx
mov dword [ebx], eax
mov eax, dword [0x4231d8]
mov dword [0x4231d8], edi
mov dword [ebx + 0x10], eax
lea eax, [ebp - 0x220]
mov dword [esp + 4], eax
mov dword [esp], 0x104
call dword [sym.imp.kernel32.dll_GetCurrentDirectoryW]
movzx eax, word [ebp - 0x220]
sub esp, 8
mov word [ebx + 4], ax
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_FreeEnvironmentStringsW]
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], str.Setting_delayed_expansion_to__d_n
mov dword [esp + 8], str.WCMD_setlocal
mov dword [esp + 4], 0x423010
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
jmp 0x41bd6a
mov dword [esp + 4], str.ENABLEDELAYEDEXPANSION
mov dword [esp], 0x42c400
call ebx
test eax, eax
je 0x41bd58
mov dword [esp + 4], str.DISABLEDELAYEDEXPANSION
mov dword [esp], 0x428400
call ebx
test eax, eax
jne 0x41be98
xor edi, edi
jmp 0x41bd5d
mov dword [ebx + 8], 0
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_LocalFree]
sub esp, 4
jmp 0x41bdf7
ret
mov dword [esp + 4], str.DISABLEDELAYEDEXPANSION
mov dword [esp], 0x42c400
call ebx
test eax, eax
je 0x41be6e
mov edi, dword [0x4231d8]
jmp 0x41bd5d
test byte [0x423010], 2
je 0x41be03
mov dword [esp + 0xc], str.out_of_memory_n
mov dword [esp + 8], str.WCMD_setlocal
mov dword [esp + 4], 0x423010
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0_1
jmp 0x41be03
Function at 0x41d420
Capabilities:
Query environment variable
Set environment variable

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x814
movzx edx, word [0x428400]
mov eax, dword [ebp + 8]
or dx, word [0x42c400]
je 0x41d478
cmp word [eax], 0x3d
lea edx, [eax + 2]
mov dword [esp], 0x4367bc
cmove eax, edx
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_SetEnvironmentVariableW]
sub esp, 8
test eax, eax
je 0x41d468
mov ebx, dword [ebp - 4]
leave
ret
mov ebx, dword [ebp - 4]
leave
jmp sym._WCMD_print_error
lea ebx, [ebp - 0x808]
mov dword [esp + 8], 0x400
mov dword [esp + 4], ebx
mov dword [esp], 0x4367bc
call dword [sym.imp.kernel32.dll_GetEnvironmentVariableW]
sub esp, 0xc
test eax, eax
je 0x41d4c0
mov dword [esp], 0x4367c6
call sym._WCMD_output_asis
mov dword [esp], ebx
call sym._WCMD_output_asis
mov dword [esp], 0x4350b4
call sym._WCMD_output_asis
jmp 0x41d45f
mov dword [esp], 0x406
call sym._WCMD_LoadMessage
mov dword [esp], eax
call sym._WCMD_output_stderr
jmp 0x41d45f

Function at 0x41d4e0
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x14
movzx eax, word [0x428400]
test ax, ax
je 0x41d534
cmp ax, 0x20
sete cl
cmp ax, 0x3d
sete dl
or cl, dl
mov edx, 0x428400
jne 0x41d510
cmp ax, 9
jne 0x41d558
movzx eax, word [edx + 2]
add edx, 2
cmp ax, 0x3d
sete bl
cmp ax, 0x20
sete cl
or bl, cl
jne 0x41d510
cmp ax, 9
je 0x41d510
test ax, ax
jne 0x41d558
mov dword [esp + 4], 0
mov dword [esp], 0x4367d2
call dword [sym.imp.kernel32.dll_SetEnvironmentVariableW]
mov ebx, dword [ebp - 4]
sub esp, 8
leave
ret
mov dword [esp + 4], edx
mov dword [esp], 0x4367d2
call dword [sym.imp.kernel32.dll_SetEnvironmentVariableW]
mov ebx, dword [ebp - 4]
sub esp, 8
leave
ret
Function at 0x420110
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 0x42016b
cmp byte [esi + ebx - 1], 0xa
je 0x42013f
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x24]
xchg dword [0x430400], 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 0x422530
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

Function at 0x4225a0
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
test eax, eax
je 0x4225b8
leave
ret
test byte [0x423030], 2
jne 0x4225ce
mov dword [esp], 1
call dword [sym.imp.kernel32.dll_ExitProcess]
mov dword [esp + 0xc], str.Out_of_memory_n
mov dword [esp + 8], str.xalloc
mov dword [esp + 4], 0x423030
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0_3
jmp 0x4225c1