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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
sub esp, 0x24
mov esi, ecx
mov byte [ebp - 9], 0x1a
test byte [0x41d010], 8
je 0x40433e
mov ecx, esi
call dbg.wine_dbgstr_wn
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Appending_EOF_to__s_n
mov dword [esp + 8], str.WCMD_AppendEOF
mov dword [esp], 3
call sym._wine_dbg_log_1
movaps xmm0, xmmword [0x416340]
movups xmmword [esp + 4], xmm0
mov dword [esp], esi
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x80
call dword [sym.imp.kernel32.dll_CreateFileW]
sub esp, 0x1c
cmp eax, 0xffffffff
je 0x4043d5
mov edi, eax
mov dword [esp], eax
mov dword [esp + 0xc], 2
mov dword [esp + 8], 0
mov dword [esp + 4], 0
call dword [sym.imp.kernel32.dll_SetFilePointer]
sub esp, 0x10
lea eax, [ebp - 0x10]
mov dword [esp + 0xc], eax
lea eax, [ebp - 9]
mov dword [esp + 4], eax
mov dword [esp], edi
mov dword [esp + 0x10], 0
mov dword [esp + 8], 1
call dword [sym.imp.kernel32.dll_WriteFile]
sub esp, 0x14
test eax, eax
je 0x40441b
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
mov eax, 1
jmp 0x404467
xor eax, eax
test byte [0x41d010], 2
je 0x404467
mov ecx, esi
call dbg.wine_dbgstr_wn
mov ecx, dword fs:[0x18]
mov ecx, dword [ecx + 0x34]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Failed_to_open__s___ld__n
mov dword [esp + 8], str.WCMD_AppendEOF
mov dword [esp], 1
call sym._wine_dbg_log_1
jmp 0x404465
test byte [0x41d010], 2
je 0x404459
mov ecx, esi
call dbg.wine_dbgstr_wn
mov ecx, dword fs:[0x18]
mov ecx, dword [ecx + 0x34]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Failed_to_append_EOF_to__s___ld__n
mov dword [esp + 8], str.WCMD_AppendEOF
mov dword [esp], 1
call sym._wine_dbg_log_1
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
xor eax, eax
add esp, 0x24
pop esi
pop edi
pop ebp
ret
Function at 0x404470
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
push eax
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x10], ecx
mov eax, dword [0x4162c8]
cmp word [eax], 0
je 0x4045ca
lea eax, [ebp - 0x10]
push 0
push 0
push eax
push 0
push ecx
call sym._WCMD_parameter
add esp, 0x14
cmp dword [ebp - 0x10], 0
je 0x4045c5
mov esi, eax
mov ebx, 1
jmp 0x4044f3
push 0
push esi
call dword [sym.imp.kernel32.dll_CreateDirectoryW]
test eax, eax
je 0x4045b0
push 0
push 0
lea eax, [ebp - 0x10]
push eax
push ebx
inc ebx
mov eax, dword [ebp + 8]
push eax
call sym._WCMD_parameter
add esp, 0x14
mov esi, eax
cmp dword [ebp - 0x10], 0
je 0x4045c5
movzx edx, word [esi + 2]
xor edi, edi
mov ecx, 0xfffffffe
nop
mov eax, ecx
cmp word [esi + edi], 0
lea edi, [edi + 2]
lea ecx, [ecx + 2]
jne 0x404500
xor ecx, ecx
cmp dx, 0x3a
sete cl
lea edx, [ecx*4 + 4]
cmp edx, edi
je 0x404544
lea edx, [ecx + ecx]
add edx, edx
nop dword [eax + eax]
cmp word [esi + eax], 0x5c
jne 0x404544
mov word [esi + eax], 0
add eax, 0xfffffffe
cmp edx, eax
jne 0x404530
lea edi, [esi + ecx*4]
mov ecx, edi
movzx eax, word [edi]
add edi, 2
cmp ax, 0x5c
je 0x404547
mov edi, ecx
test ax, ax
je 0x4044c0
movzx eax, ax
cmp eax, 0x5c
je 0x404580
movzx eax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x404560
jmp 0x4044c0
mov word [edi], 0
push 0
push esi
call dword [sym.imp.kernel32.dll_CreateDirectoryW]
mov word [edi], 0x5c
test eax, eax
jne 0x404547
mov eax, dword fs:[0x18]
cmp dword [eax + 0x34], 0xb7
je 0x404547
nop word cs:[eax + eax]
call dbg.WCMD_print_error
mov eax, dword [0x4162c0]
mov dword [eax], 1
jmp 0x4044d1
add esp, 4
jmp 0x4045e0
push 0x3f2
call sym._WCMD_LoadMessage
add esp, 4
push eax
call dbg.WCMD_output_stderr
add esp, 8
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x407830
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
mov ebx, dword [ebp + 8]
push 0x2f
push ebx
call dword [sym.imp.ucrtbase.dll_wcschr]
add esp, 8
test eax, eax
je 0x40785f
mov eax, dword fs:[0x18]
mov dword [eax + 0x34], 0x57
pop esi
pop edi
pop ebx
pop ebp
jmp dbg.WCMD_print_error
mov edi, dword [sym.imp.kernel32.dll_LocalAlloc]
push 0x14
push 0
call edi
mov esi, eax
push 0x800
push 0
call edi
mov edi, eax
test esi, esi
je 0x4078c9
test edi, edi
je 0x4078c9
mov eax, dword [0x418754]
mov word [eax + 4], 0
mov dword [eax], 0x44002f
push edi
push 0x400
call dword [sym.imp.kernel32.dll_GetCurrentDirectoryW]
mov eax, dword [0x4162c0]
mov dword [eax], 0
push ebx
call dbg.WCMD_setshow_default
add esp, 4
mov eax, dword [0x4162c0]
cmp dword [eax], 0
je 0x407902
mov ebx, dword [sym.imp.kernel32.dll_LocalFree]
push esi
call ebx
push edi
call ebx
jmp 0x407924
mov ebx, dword [sym.imp.kernel32.dll_LocalFree]
push esi
call ebx
push edi
call ebx
test byte [0x41d010], 2
je 0x407924
sub esp, 0x10
mov dword [esp + 0xc], str.out_of_memory_n
mov dword [esp + 8], str.WCMD_pushd
mov dword [esp], 1
call sym._wine_dbg_log_1
add esp, 0x10
jmp 0x407924
mov eax, dword [0x421070]
mov dword [esi], eax
mov dword [esi + 8], edi
test eax, eax
je 0x407916
mov eax, dword [eax + 4]
inc eax
jmp 0x40791b
mov eax, 1
mov dword [esi + 4], eax
mov dword [0x421070], esi
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x408a40
Capabilities:
Delete directory

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
mov eax, 0x4028
call sym.__alloca
mov eax, dword [ebp + 8]
mov dword [ebp - 0x10], eax
test eax, eax
je 0x408bb3
xor esi, esi
xor edi, edi
jmp 0x408a82
call dbg.WCMD_print_error
inc edi
mov eax, dword [ebp - 0x10]
inc esi
test eax, eax
je 0x408baf
push 0
push 0
lea eax, [ebp - 0x10]
push eax
push esi
push dword [ebp + 8]
call sym._WCMD_parameter
add esp, 0x14
mov ebx, eax
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x408baf
cmp word [eax], 0x2f
je 0x408a79
mov dword [ebp - 0x14], edi
test byte [0x41d010], 8
je 0x408af3
mov ecx, ebx
call dbg.wine_dbgstr_wn
mov edi, eax
mov ecx, dword [0x418754]
call dbg.wine_dbgstr_wn
sub esp, 0x18
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], str.rd:_Processing_arg__s__quals:_s__n
mov dword [esp + 8], str.WCMD_remove_dir
mov dword [esp], 3
call sym._wine_dbg_log_1
add esp, 0x18
push 0x41790e
mov edi, dword [0x418754]
push edi
mov edi, dword [sym.imp.ucrtbase.dll_wcsstr]
call edi
add esp, 8
test eax, eax
je 0x408b98
push 0x417914
push dword [0x418754]
call edi
add esp, 8
test eax, eax
jne 0x408b50
push ebx
push 0x41791a
lea edi, [ebp - 0x4034]
push edi
call dword [sym.imp.user32.dll_wsprintfW]
add esp, 0xc
mov ecx, edi
mov edx, 1
call dbg.WCMD_ask_confirm
test eax, eax
je 0x408bc9
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x2c], ebx
mov word [ebp - 0x24], 0x414
mov dword [ebp - 0x30], 3
nop
cmp word [ebx], 0
lea ebx, [ebx + 2]
jne 0x408b70
mov word [ebx], 0
lea eax, [ebp - 0x34]
push eax
call dword [sym.imp.shell32.dll_SHFileOperationW]
test eax, eax
mov edi, dword [ebp - 0x14]
jne 0x408a70
jmp 0x408a75
push ebx
call dword [sym.imp.kernel32.dll_RemoveDirectoryW]
test eax, eax
mov edi, dword [ebp - 0x14]
jne 0x408a75
jmp 0x408a70
test edi, edi
jne 0x408bc9
push 0x3f2
call sym._WCMD_LoadMessage
add esp, 4
push eax
call dbg.WCMD_output_stderr
add esp, 4
add esp, 0x4028
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x409050
Capabilities:
Get common file path
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x210
mov eax, dword [0x4162bc]
cmp dword [eax], 0
je 0x40927e
mov esi, dword [0x4162c8]
push str.ENABLEDELAYEDEXPANSION
push esi
call dword [sym.imp.ucrtbase.dll__wcsicmp]
add esp, 8
mov ebx, 1
test eax, eax
je 0x4090d4
mov edi, dword [0x418750]
push str.ENABLEDELAYEDEXPANSION
push edi
call dword [sym.imp.ucrtbase.dll__wcsicmp]
add esp, 8
test eax, eax
je 0x4090d4
push str.DISABLEDELAYEDEXPANSION
push esi
call dword [sym.imp.ucrtbase.dll__wcsicmp]
add esp, 8
test eax, eax
je 0x4091aa
push str.DISABLEDELAYEDEXPANSION
push edi
call dword [sym.imp.ucrtbase.dll__wcsicmp]
add esp, 8
mov ebx, eax
test eax, eax
je 0x4090d4
mov eax, dword [0x418744]
mov ebx, dword [eax]
test byte [0x41d010], 8
je 0x409103
sub esp, 0x14
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], str.Setting_delayed_expansion_to__d_n
mov dword [esp + 8], str.WCMD_setlocal
mov dword [esp], 3
call sym._wine_dbg_log_1
add esp, 0x14
push 0x14
push 0
call dword [sym.imp.kernel32.dll_LocalAlloc]
test eax, eax
je 0x409173
mov esi, eax
mov dword [ebp - 0x14], ebx
call dword [sym.imp.kernel32.dll_GetEnvironmentStringsW]
mov ebx, eax
test eax, eax
je 0x409269
cmp word [ebx], 0
je 0x4091be
xor edi, edi
mov eax, ebx
nop word cs:[eax + eax]
xor ecx, ecx
nop word cs:[eax + eax]
cmp word [eax + ecx + 2], 0
lea ecx, [ecx + 2]
jne 0x409150
sar ecx, 1
lea edx, [edi + ecx]
add edi, ecx
inc edi
lea eax, [ebx + edx*2]
add eax, 2
cmp word [ebx + edx*2 + 2], 0
jne 0x409140
jmp 0x4091c0
test byte [0x41d010], 2
je 0x40927e
sub esp, 0x10
mov dword [esp + 0xc], str.out_of_memory_n
mov dword [esp + 8], str.WCMD_setlocal
mov dword [esp], 1
call sym._wine_dbg_log_1
add esp, 0x220
jmp 0x409284
xor ebx, ebx
test byte [0x41d010], 8
jne 0x4090dd
jmp 0x409103
xor edi, edi
mov dword [ebp - 0x10], esi
lea eax, [edi*2 + 2]
push eax
push 0
call dword [sym.imp.kernel32.dll_LocalAlloc]
test eax, eax
je 0x40923b
mov esi, eax
lea eax, [edi + edi]
push eax
push ebx
push esi
call sym._memcpy
add esp, 0xc
mov word [esi + edi*2], 0
mov edi, dword [ebp - 0x10]
mov dword [edi + 8], esi
mov eax, dword [0x4162bc]
mov eax, dword [eax]
mov eax, dword [eax + 4]
mov dword [edi + 0xc], eax
mov eax, dword [0x421074]
mov dword [edi], eax
mov eax, dword [0x418744]
mov ecx, dword [eax]
mov dword [edi + 0x10], ecx
mov ecx, dword [ebp - 0x14]
mov dword [eax], ecx
mov dword [0x421074], edi
lea eax, [ebp - 0x21c]
push eax
push 0x104
call dword [sym.imp.kernel32.dll_GetCurrentDirectoryW]
movzx eax, word [ebp - 0x21c]
mov word [edi + 4], ax
jmp 0x409277
test byte [0x41d010], 2
mov esi, dword [ebp - 0x10]
je 0x409269
sub esp, 0x10
mov dword [esp + 0xc], str.out_of_memory_n
mov dword [esp + 8], str.WCMD_dupenv
mov dword [esp], 1
call sym._wine_dbg_log_1
add esp, 0x10
mov dword [esi + 8], 0
push esi
call dword [sym.imp.kernel32.dll_LocalFree]
push ebx
call dword [sym.imp.kernel32.dll_FreeEnvironmentStringsW]
add esp, 0x210
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x40a520
Capabilities:
Query environment variable
Set environment variable

Disassembly:
push ebp
mov ebp, esp
push esi
sub esp, 0x800
mov eax, dword [0x4162c8]
movzx eax, word [eax]
mov ecx, dword [0x418750]
or ax, word [ecx]
je 0x40a569
mov eax, dword [ebp + 8]
xor ecx, ecx
cmp word [eax], 0x3d
sete cl
lea eax, [eax + ecx*2]
push eax
push 0x417b48
call dword [sym.imp.kernel32.dll_SetEnvironmentVariableW]
test eax, eax
jne 0x40a5bc
add esp, 0x800
pop esi
pop ebp
jmp dbg.WCMD_print_error
lea esi, [ebp - 0x804]
push 0x400
push esi
push 0x417b48
call dword [sym.imp.kernel32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x40a5a6
push 0x417b52
call sym._WCMD_output_asis
add esp, 4
push esi
call sym._WCMD_output_asis
add esp, 4
push 0x416fa4
call sym._WCMD_output_asis
jmp 0x40a5b9
push 0x406
call sym._WCMD_LoadMessage
add esp, 4
push eax
call dbg.WCMD_output_stderr
add esp, 4
add esp, 0x800
pop esi
pop ebp
ret

Function at 0x40a5d0
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [0x4162c8]
movzx ecx, word [eax]
test cx, cx
jne 0x40a5fc
jmp 0x40a614
cmp ecx, 9
jne 0x40a610
movzx ecx, word [eax + 2]
add eax, 2
movzx ecx, cx
cmp ecx, 0x1f
jle 0x40a5f0
cmp ecx, 0x3d
je 0x40a5f5
cmp ecx, 0x20
je 0x40a5f5
jmp 0x40a618
test ecx, ecx
jne 0x40a618
push 0
jmp 0x40a619
push eax
push 0x417b5e
call dword [sym.imp.kernel32.dll_SetEnvironmentVariableW]
pop ebp
ret
Function at 0x40b220
Capabilities:
Get common file path
Get disk information

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
sub esp, 0x620
mov esi, dword [ebp + 0xc]
cmp word [esi], 0
je 0x40b2a8
cmp word [esi + 2], 0x3a
jne 0x40b28b
xor eax, eax
nop dword [eax]
cmp word [esi + eax], 0
lea eax, [eax + 2]
jne 0x40b240
cmp eax, 6
jne 0x40b28b
lea edi, [ebp - 0x218]
push esi
push 0x417cce
push edi
call dword [sym.imp.user32.dll_wsprintfW]
sub esp, 0x14
xorps xmm0, xmm0
movups xmmword [esp + 0x10], xmm0
lea eax, [ebp - 0xc]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x420]
mov dword [esp + 4], eax
mov dword [esp], edi
mov dword [esp + 8], 0x104
jmp 0x40b2e9
push 0x3f3
call sym._WCMD_LoadMessage
add esp, 4
push eax
call dbg.WCMD_output_stderr
add esp, 4
xor eax, eax
jmp 0x40b408
lea eax, [ebp - 0x218]
push eax
push 0x104
call dword [sym.imp.kernel32.dll_GetCurrentDirectoryW]
test eax, eax
je 0x40b327
sub esp, 0x20
xorps xmm0, xmm0
movups xmmword [esp + 0x10], xmm0
lea eax, [ebp - 0xc]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x420]
mov dword [esp + 4], eax
mov dword [esp + 8], 0x104
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_GetVolumeInformationW]
test eax, eax
je 0x40b327
mov edi, dword [ebp + 8]
cmp word [ebp - 0x420], 0
je 0x40b333
push 0x40c
call sym._WCMD_LoadMessage
add esp, 4
movzx ecx, word [ebp - 0x218]
lea edx, [ebp - 0x420]
push edx
push ecx
push eax
call dbg.WCMD_output
add esp, 0xc
jmp 0x40b351
call dbg.WCMD_print_error
xor eax, eax
jmp 0x40b408
push 0x40d
call sym._WCMD_LoadMessage
add esp, 4
movzx ecx, word [ebp - 0x218]
push ecx
push eax
call dbg.WCMD_output
add esp, 8
push 0x404
call sym._WCMD_LoadMessage
add esp, 4
mov ecx, dword [ebp - 0xc]
movzx edx, cx
shr ecx, 0x10
push edx
push ecx
push eax
call dbg.WCMD_output
add esp, 0xc
mov eax, 1
test edi, edi
je 0x40b408
push 0x405
call sym._WCMD_LoadMessage
add esp, 4
push eax
call dbg.WCMD_output
add esp, 4
push 0xfffffffffffffff6
call dword [sym.imp.kernel32.dll_GetStdHandle]
lea ecx, [ebp - 0x10]
lea edi, [ebp - 0x628]
push ecx
push 0x104
push edi
push eax
call dbg.WCMD_ReadFile
add esp, 0x10
test eax, eax
je 0x40b3e1
mov eax, dword [ebp - 0x10]
cmp eax, 2
jb 0x40b3e1
mov word [ebp + eax*2 - 0x62a], 0
cmp word [ebp + eax*2 - 0x62c], 0xd
jne 0x40b3e1
mov word [ebp + eax*2 - 0x62c], 0
cmp word [esi], 0
je 0x40b3f1
lea eax, [ebp - 0x218]
push edi
push eax
jmp 0x40b3f4
push edi
push 0
call dword [sym.imp.kernel32.dll_SetVolumeLabelW]
test eax, eax
jne 0x40b403
call dbg.WCMD_print_error
mov eax, 1
add esp, 0x620
pop esi
pop edi
pop ebp
ret
Function at 0x40b420
Capabilities:
Delete registry key
Query or enumerate registry key
Query or enumerate registry value
Set registry value
Terminate process

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov eax, dword [0x4162c8]
push 0xa
push 0
push eax
call dword [sym.imp.ucrtbase.dll_wcstol]
add esp, 0xc
mov esi, eax
mov edi, dword [0x4162bc]
cmp dword [edi], 0
je 0x40b478
mov eax, dword [0x418754]
push 0x417cd6
push eax
call dword [sym.imp.kernel32.dll_lstrcmpiW]
test eax, eax
jne 0x40b478
mov eax, dword [ebp + 8]
mov ecx, dword [0x4162c0]
mov dword [ecx], esi
mov ecx, dword [edi]
mov dword [ecx + 0x38], 1
mov dword [eax], 0
pop esi
pop edi
pop ebp
ret
push esi
call dword [sym.imp.kernel32.dll_ExitProcess]
Function at 0x40c400
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
add ecx, 0xffffffdf
cmp ecx, 0x5d
ja case.0x40c410.34
mov eax, 8
jmp dword [ecx*4 + 0x416858]
mov eax, 1
pop ebp
ret
mov eax, 7
pop ebp
ret
mov eax, 6
pop ebp
ret
mov eax, 5
pop ebp
ret
mov eax, 3
pop ebp
ret
mov eax, 2
pop ebp
ret
mov eax, 4
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x40c9e0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov eax, 0x4000
call sym.__alloca
test ecx, ecx
je 0x40c9ff
mov edi, dword [ecx]
cmp dword [edi], 0
je 0x40ca03
mov esi, dword [edi + 8]
jmp 0x40ca6b
xor esi, esi
jmp 0x40ca6b
lea esi, [ebp - 0x4008]
push 0x2000
push esi
push dword [edi + 4]
call dword [sym.imp.kernel32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x40caa6
push 0
push 0
push esi
call dword [sym.imp.ucrtbase.dll_wcstol]
add esp, 0xc
mov esi, eax
test byte [0x41d010], 8
je 0x40ca6b
mov ecx, dword [edi + 4]
call dbg.wine_dbgstr_wn
sub esp, 0x18
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Envvar__s_converted_to__d_n
mov dword [esp + 8], str.WCMD_peeknumber
mov dword [esp], 3
call sym._wine_dbg_log_1
add esp, 0x18
test byte [0x41d010], 8
je 0x40ca9a
sub esp, 0x14
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], str.Peeked_number__d_n
mov dword [esp + 8], str.WCMD_peeknumber
mov dword [esp], 3
call sym._wine_dbg_log_1
add esp, 0x14
mov eax, esi
add esp, 0x4000
pop esi
pop edi
pop ebp
ret
xor esi, esi
test byte [0x41d010], 8
jne 0x40ca39
jmp 0x40ca6b
Function at 0x40f690
Capabilities:
Terminate process
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 8
mov dword [ebp - 0x10], 0
test edx, edx
je 0x40f732
mov edi, edx
mov esi, ecx
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x10]
push 0
push eax
push edx
push ecx
push ebx
call dword [sym.imp.kernel32.dll_WriteConsoleW]
test eax, eax
jne 0x40f732
mov dword [ebp - 0x14], 0
cmp byte [0x42e55c], 0
je 0x40f6df
add edi, edi
push 0
lea eax, [ebp - 0x10]
push eax
push edi
push esi
push ebx
jmp 0x40f72c
mov ebx, dword [0x42e630]
test ebx, ebx
jne 0x40f701
push 0xffff
call sym._malloc
add esp, 4
test eax, eax
je 0x40f73a
mov ebx, eax
mov dword [0x42e630], eax
call dword [sym.imp.kernel32.dll_GetConsoleOutputCP]
lea ecx, [ebp - 0x14]
push ecx
push 0x419e3f
push 0xffff
push ebx
push edi
push esi
push 0
push eax
call dword [sym.imp.kernel32.dll_WideCharToMultiByte]
push 0
lea ecx, [ebp - 0x10]
push ecx
push eax
push ebx
push dword [ebp + 8]
call dword [sym.imp.kernel32.dll_WriteFile]
add esp, 8
pop esi
pop edi
pop ebx
pop ebp
ret
test byte [0x41d038], 2
je 0x40f765
sub esp, 0x10
mov dword [esp + 0xc], str.Out_of_memory_n
mov dword [esp + 8], str.xrealloc
mov dword [esp], 1
call dbg.wine_dbg_log
add esp, 0x10
push 1
call dword [sym.imp.kernel32.dll_ExitProcess]

Function at 0x40f960
Capabilities:
Read file on windows
Terminate process

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
push eax
mov edi, dword [ebp + 0x10]
mov ebx, dword [ebp + 8]
push 0
push dword [ebp + 0x14]
push edi
push dword [ebp + 0xc]
push ebx
call dword [sym.imp.kernel32.dll_ReadConsoleW]
mov ecx, eax
mov eax, 1
test ecx, ecx
jne 0x40f9e2
mov esi, dword [0x42e630]
test esi, esi
jne 0x40f9aa
push 0xffff
call sym._malloc
add esp, 4
test eax, eax
je 0x40f9ea
mov esi, eax
mov dword [0x42e630], eax
lea eax, [ebp - 0x10]
push 0
push eax
push edi
push esi
push ebx
call dword [sym.imp.kernel32.dll_ReadFile]
test eax, eax
je 0x40f9e0
call dword [sym.imp.kernel32.dll_GetConsoleCP]
push edi
push dword [ebp + 0xc]
push dword [ebp - 0x10]
push esi
push 0
push eax
call dword [sym.imp.kernel32.dll_MultiByteToWideChar]
mov ecx, dword [ebp + 0x14]
mov dword [ecx], eax
mov eax, 1
jmp 0x40f9e2
xor eax, eax
add esp, 4
pop esi
pop edi
pop ebx
pop ebp
ret
test byte [0x41d038], 2
je 0x40fa15
sub esp, 0x10
mov dword [esp + 0xc], str.Out_of_memory_n
mov dword [esp + 8], str.xrealloc
mov dword [esp], 1
call dbg.wine_dbg_log
add esp, 0x10
push 1
call dword [sym.imp.kernel32.dll_ExitProcess]

Function at 0x40fc90
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_realloc]
test eax, eax
je 0x40fcb2
add esp, 0x10
pop ebp
ret
test byte [0x41d038], 2
je 0x40fcd7
mov dword [esp + 0xc], str.Out_of_memory_n
mov dword [esp + 8], str.xrealloc
mov dword [esp], 1
call dbg.wine_dbg_log
mov dword [esp], 1
call dword [sym.imp.kernel32.dll_ExitProcess]
Function at 0x414130
Capabilities:
Accept command line arguments
Get common file path
Get comspec environment variable
Query environment variable
Set environment variable
Terminate process

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x18
mov ebx, edx
mov edi, ecx
mov dword [esp], 0x214
call sym._malloc
test eax, eax
je 0x41421d
mov esi, eax
test edi, edi
je 0x4141fa
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x14], ebx
mov edi, dword [ebx]
lea eax, [edi*2 + 2]
mov dword [esp], eax
call sym._malloc
test eax, eax
je 0x41421d
mov ebx, eax
lea eax, [edi + edi]
mov dword [esi], ebx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x10]
mov dword [esp + 4], eax
mov dword [esp], ebx
call sym._memcpy
mov word [ebx + edi*2], 0
mov eax, dword [ebp + 0xc]
mov edi, dword [eax]
lea eax, [edi*2 + 2]
mov dword [esp], eax
call sym._malloc
test eax, eax
je 0x41421d
mov ebx, eax
mov eax, dword [ebp + 8]
lea ecx, [edi + edi]
mov dword [esi + 4], ebx
mov dword [esp + 8], ecx
mov dword [esp + 4], eax
mov dword [esp], ebx
call sym._memcpy
mov word [ebx + edi*2], 0
mov word [esi + 0xc], 0
mov eax, dword [ebp - 0x14]
mov dword [eax], 0
mov ecx, dword [ebp + 0xc]
mov dword [ecx], 0
mov ecx, dword [ebp + 0x14]
mov dword [ecx], eax
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
jmp 0x41420d
mov dword [esi], 0
mov dword [esi + 4], 0
mov word [esi + 0xc], 0
mov eax, dword [ebp + 0x18]
mov dword [esi + 8], eax
mov eax, esi
add esp, 0x18
pop esi
pop edi
pop ebx
pop ebp
ret
test byte [0x41d038], 2
je 0x414242
mov dword [esp + 0xc], str.Out_of_memory_n
mov dword [esp + 8], str.xrealloc
mov dword [esp], 1
call dbg.wine_dbg_log
mov dword [esp], 1
call dword [sym.imp.kernel32.dll_ExitProcess]

Function at 0x414250
Capabilities:
Accept command line arguments
Get common file path
Get comspec environment variable
Query environment variable
Set environment variable
Terminate process

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x18
mov ebx, dword [ebp + 8]
cmp dword [ebx], 0
je 0x4142b9
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x14], edx
nop word [eax + eax]
mov edi, ebx
mov esi, dword [ebx]
lea ebx, [esi + 8]
cmp dword [esi], 0
jne 0x414270
mov dword [esp], 0xc
call sym._malloc
test eax, eax
je 0x4142de
mov ebx, eax
mov dword [eax], 0
mov eax, dword [ebp - 0x14]
mov dword [ebx + 4], eax
mov dword [esp], 0xc
call sym._malloc
test eax, eax
je 0x4142de
mov ecx, dword [ebp - 0x10]
mov dword [eax], ecx
mov dword [eax + 4], esi
mov dword [eax + 8], ebx
mov dword [edi], eax
jmp 0x4142d6
mov esi, edx
mov dword [esp], 0xc
call sym._malloc
test eax, eax
je 0x4142de
mov dword [eax], 0
mov dword [eax + 4], esi
mov dword [ebx], eax
add esp, 0x18
pop esi
pop edi
pop ebx
pop ebp
ret
test byte [0x41d038], 2
je 0x414303
mov dword [esp + 0xc], str.Out_of_memory_n
mov dword [esp + 8], str.xrealloc
mov dword [esp], 1
call dbg.wine_dbg_log
mov dword [esp], 1
call dword [sym.imp.kernel32.dll_ExitProcess]
Function at 0x415140
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov edi, dword [ebp + 8]
push edi
call dword [sym.imp.ucrtbase.dll_strlen]
add esp, 4
test eax, eax
je 0x41518d
mov esi, eax
xor eax, eax
cmp byte [edi + esi - 1], 0xa
je 0x41516a
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x24]
mov ecx, 0x42e6c8
lock xchg dword [ecx], 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 0x41518f
xor eax, eax
pop esi
pop edi
pop ebp
ret