joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4059d0
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x18
mov dword [ebp - 0x10], edx
mov edi, dword [sym.imp.user32.dll_SendMessageW]
mov dword [esp + 0xc], edx
mov dword [esp + 8], 0
mov dword [esp + 4], 0x18f
mov eax, dword [eax]
mov dword [esp], eax
call edi
mov esi, eax
mov eax, dword [ebx]
sub esp, 0x10
mov dword [esp + 4], 0
inc esi
mov dword [esp], eax
mov eax, dword [sym.imp.user32.dll_ShowWindow]
mov dword [ebp - 0x14], eax
call eax
sub esp, 8
jmp 0x405a51
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx + 0x14]
cmp dword [eax + 0x14], ecx
jle 0x405a77
mov eax, dword [ebx]
mov dword [esp + 0xc], 0
mov dword [esp + 8], esi
mov dword [esp + 4], 0x182
mov dword [esp], eax
call edi
sub esp, 0x10
mov eax, dword [ebx]
mov dword [esp + 0xc], 0
mov dword [esp + 8], esi
mov dword [esp + 4], 0x199
mov dword [esp], eax
call edi
lea edx, [eax + 1]
sub esp, 0x10
cmp edx, 1
ja 0x405a28
mov eax, dword [ebp - 0x10]
mov dword [eax + 0xc], 0
mov eax, dword [ebx]
mov dword [esp + 4], 5
mov dword [esp], eax
mov eax, dword [ebp - 0x14]
call eax
sub esp, 8
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x405f80
Capabilities:
Set application hook

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov ebx, eax
add eax, 0x164
sub esp, 0x34
mov dword [ebp - 0x2c], eax
mov eax, dword [0x40c080]
mov ecx, dword [ebx + 0x14c]
mov edx, dword [ebx + 0x150]
mov dword [ebp - 0x30], str.WFS_Tree
mov dword [ebp - 0x28], eax
mov eax, dword [ebx + 0x154]
mov dword [ebp - 0x24], ecx
sub eax, ecx
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x1c], eax
mov eax, dword [ebx + 0x158]
mov dword [ebp - 0x14], 0
sub eax, edx
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x18], eax
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x24]
mov dword [esp + 8], 0
mov dword [esp + 4], sym._CBTProc_12
mov dword [esp + 0xc], eax
mov dword [esp], 5
call dword [sym.imp.user32.dll_SetWindowsHookExW]
mov dword [0x40cc8c], ebx
mov esi, dword [sym.imp.user32.dll_SendMessageW]
sub esp, 0x10
mov dword [0x40cc80], eax
lea eax, [ebp - 0x30]
mov dword [esp + 0xc], eax
mov eax, dword [0x40c0a4]
mov dword [esp + 8], 0
mov dword [esp + 4], 0x220
mov dword [esp], eax
call esi
sub esp, 0x10
mov dword [ebx], eax
test eax, eax
mov eax, dword [0x40cc80]
mov dword [esp], eax
je 0x406110
call dword [sym.imp.user32.dll_UnhookWindowsHookEx]
mov edi, 0x10
sub esp, 4
mov eax, edi
cmp dword [0x40c0c0], 0x10
cmovge eax, dword [0x40c0c0]
mov dword [esp + 8], 1
mov dword [esp + 0xc], eax
mov eax, dword [ebx + 4]
mov dword [esp + 4], 0x1a0
mov dword [esp], eax
call esi
mov eax, dword [ebx + 0x98]
sub esp, 0x10
cmp dword [0x40c0c0], 0x10
cmovge edi, dword [0x40c0c0]
mov dword [esp + 8], 1
mov dword [esp + 0xc], edi
mov dword [esp + 4], 0x1a0
mov dword [esp], eax
call esi
mov eax, dword [ebx + 0x94]
sub esp, 0x10
mov dword [esp + 0xc], eax
mov eax, dword [ebx + 4]
mov dword [esp + 8], 0
mov dword [esp + 4], 0x18f
mov dword [esp], eax
call esi
sub esp, 0x10
mov dword [esp + 8], eax
mov eax, dword [ebx + 4]
mov dword [esp + 0xc], 0
mov dword [esp + 4], 0x186
mov dword [esp], eax
call esi
mov eax, dword [ebx]
sub esp, 0x10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
call dword [sym.imp.user32.dll_UnhookWindowsHookEx]
xor eax, eax
sub esp, 4
jmp 0x4060ff
Function at 0x406120
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
lea ebx, [ebp - 0x80c]
sub esp, 0x848
mov dword [ebp - 0x820], 0
mov dword [ebp - 0x81c], 0
mov dword [ebp - 0x818], 4
mov dword [ebp - 0x814], 0
mov dword [ebp - 0x810], 0
mov dword [esp + 4], 0x40c0c8
mov dword [esp], 0x400
call dword [sym.imp.kernel32.dll_GetLogicalDriveStringsW]
lea eax, [ebp - 0x820]
sub esp, 8
mov dword [esp + 0x18], eax
mov eax, dword [0x40c080]
mov dword [esp + 0x30], 0x14
mov dword [esp + 0x10], eax
mov eax, dword [0x40c08c]
mov dword [esp + 0x2c], 0xd
mov dword [esp + 0x28], 0x10
mov dword [esp + 0x24], 0xd
mov dword [esp + 0x20], 0x10
mov dword [esp + 0x1c], 0
mov dword [esp + 0x14], 0x65
mov dword [esp + 0xc], 2
mov dword [esp + 8], 0x102
mov dword [esp + 4], 0x50001002
mov dword [esp], eax
call sym._CreateToolbarEx_52
mov dword [0x40c0b0], eax
mov eax, dword [0x40c080]
sub esp, 0x34
mov dword [esp + 0xc], 0x400
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x4b5
mov dword [esp], eax
call dword [sym.imp.user32.dll_LoadStringW]
sub esp, 0x10
cmp word [ebp - 0x80c], 0
je 0x4063bf
mov eax, ebx
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x406230
sub eax, ebx
sar eax, 1
inc eax
xor edx, edx
mov esi, dword [sym.imp.user32.dll_SendMessageW]
mov dword [esp + 0xc], ebx
mov edi, 0x40c0c8
mov word [ebp + eax*2 - 0x80c], dx
mov eax, dword [0x40c0b0]
mov ebx, 2
mov dword [esp + 8], 0
mov dword [esp + 4], 0x44d
mov dword [esp], eax
call esi
lea eax, [ebp - 0x820]
mov dword [ebp - 0x81c], 0x9001
sub esp, 0x10
mov dword [esp + 0xc], eax
mov eax, dword [0x40c0b0]
mov dword [esp + 8], 1
mov dword [esp + 4], 0x443
mov dword [esp], eax
call esi
mov eax, dword [0x40c0b0]
inc dword [ebp - 0x810]
sub esp, 0x10
mov dword [esp + 0xc], 0x40c0c8
mov dword [esp + 8], 0
mov dword [esp + 4], 0x44d
mov dword [esp], eax
call esi
mov dword [ebp - 0x81c], 0x9002
sub esp, 0x10
cmp word [0x40c0c8], 0
je 0x406361
lea esi, [esi]
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_GetDriveTypeW]
sub esp, 4
cmp eax, 5
je 0x406398
ja 0x406370
cmp eax, 2
je 0x4063b0
cmp eax, 4
jne 0x406388
mov dword [ebp - 0x820], 4
lea eax, [ebp - 0x820]
mov dword [esp + 8], ebx
mov dword [esp + 0xc], eax
mov eax, dword [0x40c0b0]
mov dword [esp + 4], 0x443
mov dword [esp], eax
call esi
inc dword [ebp - 0x81c]
inc dword [ebp - 0x810]
sub esp, 0x10
nop
add edi, 2
cmp word [edi - 2], 0
jne 0x406350
inc ebx
cmp word [edi], 0
jne 0x4062f0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
cmp eax, 6
jne 0x406388
mov dword [ebp - 0x820], 5
jmp 0x40631f
mov dword [ebp - 0x820], 2
jmp 0x40631f
mov dword [ebp - 0x820], 3
jmp 0x40631f
mov dword [ebp - 0x820], 1
jmp 0x40631f
mov eax, 1
jmp 0x40623e
Function at 0x407ef0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x10
mov dword [esp + 4], 0x2e
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcsrchr]
test eax, eax
mov ebx, eax
mov eax, 0x415b90
cmove ebx, eax
mov eax, ebx
call sym._is_exe_file
test eax, eax
je 0x407f30
mov ebx, dword [ebp - 4]
mov eax, 1
leave
ret
mov dword [esp + 4], ebx
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp], 0x80000000
call dword [sym.imp.advapi32.dll_RegQueryValueW]
mov ebx, dword [ebp - 4]
sub esp, 0x10
test eax, eax
leave
sete al
movzx eax, al
add eax, eax
ret

Function at 0x408340
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, ecx
push esi
mov esi, eax
push ebx
mov ebx, edx
sub esp, 0x1c
mov dword [esp + 4], 0
mov eax, dword [eax]
mov dword [esp], eax
mov eax, dword [sym.imp.user32.dll_ShowWindow]
mov dword [ebp - 0x14], eax
call eax
sub esp, 8
test ebx, ebx
je 0x40844a
mov eax, dword [ebp + 8]
and eax, 1
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 8]
and eax, 0x10
mov dword [ebp - 0x10], eax
mov eax, dword [ebx + 0x18]
mov edx, dword [esi + 0x84]
and eax, 0x10
test edx, edx
je 0x408470
test eax, eax
je 0x408440
cmp word [ebx + 0x44], 0x2e
je 0x4084e0
test edi, edi
je 0x4083c0
lea eax, [ebx + 0x44]
mov edx, edi
call sym._pattern_imatch
test eax, eax
je 0x408440
mov ecx, dword [ebp - 0x10]
test ecx, ecx
jne 0x4083cd
test byte [ebx + 0x18], 6
jne 0x408440
mov eax, dword [ebp + 8]
and eax, 0xe
cmp eax, 0xe
je 0x408400
lea eax, [ebx + 0x44]
call sym._get_file_type
cmp eax, 1
je 0x4084d0
cmp eax, 2
je 0x408490
test byte [ebp + 8], 8
je 0x408440
lea esi, [esi]
nop
cmp dword [ebp + 0xc], 0xffffffff
mov eax, 0xffffffff
je 0x408411
inc dword [ebp + 0xc]
mov eax, dword [ebp + 0xc]
mov dword [esp + 8], eax
mov eax, dword [esi]
mov dword [esp + 0xc], ebx
mov dword [esp + 4], 0x181
mov dword [esp], eax
call dword [sym.imp.user32.dll_SendMessageW]
mov edx, dword [esi + 0x84]
sub esp, 0x10
test edx, edx
je 0x408440
mov eax, dword [ebx + 0xc]
test eax, eax
jne 0x4084a0
mov ebx, dword [ebx]
test ebx, ebx
jne 0x408383
mov eax, dword [esi]
mov dword [esp + 4], 5
mov dword [esp], eax
mov eax, dword [ebp - 0x14]
call eax
mov eax, dword [ebp + 0xc]
sub esp, 8
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
test eax, eax
je 0x4083aa
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x4083aa
mov ebx, dword [ebx]
test ebx, ebx
jne 0x408383
jmp 0x40844a
test byte [ebp + 8], 4
jne 0x408400
jmp 0x408440
mov edx, dword [ebx + 4]
test edx, edx
je 0x408440
mov eax, dword [ebp + 0xc]
mov ecx, edi
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
mov eax, esi
call sym._insert_entries.part.0
mov ebx, dword [ebx]
mov dword [ebp + 0xc], eax
test ebx, ebx
jne 0x408383
jmp 0x40844a
test byte [ebp + 8], 2
jne 0x408400
jmp 0x408440
movzx eax, word [ebx + 0x46]
test ax, ax
je 0x408440
cmp ax, 0x2e
jne 0x4083aa
cmp word [ebx + 0x48], 0
jne 0x4083aa
jmp 0x408440
Function at 0x408910
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push edi
xor edi, edi
push esi
mov esi, eax
push ebx
mov ebx, ecx
sub esp, 0x620
mov eax, dword [eax + 0x90]
mov dword [ebp - 0x618], edx
lea edx, [ebp - 0x214]
call sym._get_path
lea eax, [ebp - 0x214]
mov dword [esp + 0xc], sym._DestinationDlgProc_16
mov dword [esp + 0x10], eax
mov eax, dword [esi]
mov dword [esp + 4], 0x68
mov dword [esp + 8], eax
mov eax, dword [0x40c080]
mov dword [esp], eax
call dword [sym.imp.user32.dll_DialogBoxParamW]
sub esp, 0x14
cmp eax, 1
je 0x408980
lea esp, [ebp - 0xc]
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [ebp - 0x618]
mov edi, eax
mov eax, dword [esi + 0x90]
call sym._get_path
movzx edx, word [ebp - 0x214]
cmp dx, 0x2f
je 0x4089ae
cmp word [ebp - 0x212], 0x3a
jne 0x408a50
xor eax, eax
jmp 0x4089c0
movzx edx, word [ebp + eax - 0x214]
mov word [ebx + eax], dx
add eax, 2
test dx, dx
jne 0x4089b8
lea eax, [ebp - 0x214]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetFileAttributesW]
sub esp, 4
cmp eax, 0xffffffff
je 0x40896f
test al, 0x10
je 0x40896f
lea eax, [ebp - 0x414]
lea esi, [ebp - 0x614]
mov dword [esp + 8], 0
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x618]
mov dword [esp + 0xc], esi
mov dword [esp], eax
mov dword [esp + 4], 0
call dword [sym.imp.ucrtbase.dll__wsplitpath]
lea eax, [ebp - 0x414]
mov dword [esp], ebx
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x214]
mov dword [esp + 0xc], esi
mov dword [esp + 8], eax
mov dword [esp + 4], str._s__s_s
call dword [sym.imp.user32.dll_wsprintfW]
lea esp, [ebp - 0xc]
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esi + 0x90]
mov edx, ebx
mov eax, dword [eax + 8]
call sym._get_path
cmp word [ebx], 0
mov eax, ebx
je 0x408ab9
lea esi, [esi]
nop
add eax, 2
cmp word [eax], 0
jne 0x408a70
mov edx, eax
sub edx, ebx
lea esi, [edx - 2]
sar edx, 1
movzx esi, word [ebx + esi]
cmp si, 0x5c
je 0x408a9b
cmp si, 0x2f
je 0x408a9b
mov ecx, 0x2f
inc edx
mov word [eax], cx
lea esi, [ebx + edx*2]
xor eax, eax
movzx edx, word [ebp + eax - 0x214]
mov word [esi + eax], dx
add eax, 2
test dx, dx
jne 0x408aa0
jmp 0x4089cc
xor edx, edx
mov esi, 0xfffffffe
jmp 0x408a82
Function at 0x40a3c0
Capabilities:
Set current directory

Disassembly:
test edx, edx
je 0x40a4a0
push ebp
mov ebp, esp
push esi
mov esi, edx
push ebx
mov ebx, eax
xor eax, eax
sub esp, 0x210
mov dword [ebx + 0x94], edx
mov word [ebp - 0x210], ax
mov eax, dword [edx + 4]
mov dword [ebx + 0x128], edx
test eax, eax
cmove eax, edx
mov dword [ebx + 0x124], eax
mov edx, dword [edx + 0x10]
test edx, edx
je 0x40a468
mov eax, ebx
call sym._refresh_right_pane
mov eax, esi
lea edx, [ebp - 0x210]
call sym._get_path
xor eax, eax
lea esi, [esi]
nop
movzx edx, word [ebp + eax - 0x210]
mov word [ebx + eax + 0x164], dx
add eax, 2
test dx, dx
jne 0x40a420
mov eax, dword [ebx]
test eax, eax
je 0x40a454
lea ecx, [ebp - 0x210]
mov dword [esp], eax
mov dword [esp + 4], ecx
call dword [sym.imp.user32.dll_SetWindowTextW]
sub esp, 8
cmp word [ebp - 0x210], 0
jne 0x40a480
lea esp, [ebp - 8]
pop ebx
pop esi
pop ebp
ret
mov eax, dword [ebp + 8]
mov edx, esi
mov dword [esp], eax
mov eax, ebx
call sym._scan_entry
jmp 0x40a408
lea eax, [ebp - 0x210]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_SetCurrentDirectoryW]
sub esp, 4
test eax, eax
je 0x40a45e
call sym._set_space_status
jmp 0x40a45e
ret

Function at 0x40a550
Capabilities:
Get disk size

Disassembly:
push edi
lea edi, [esp + 8]
and esp, 0xfffffff8
push dword [edi - 4]
push ebp
mov ebp, esp
push edi
push esi
lea eax, [ebp - 0x9a0]
push ebx
sub esp, 0x9c0
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x9a8]
mov dword [esp + 8], eax
lea eax, [ebp - 0x9b0]
mov dword [esp + 4], eax
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_GetDiskFreeSpaceExW]
sub esp, 0x10
test eax, eax
jne 0x40a5f8
xor eax, eax
mov edx, 0x3f
lea ebx, [ebp - 0x810]
jmp 0x40a5b7
movzx edx, word [eax + 0x415c2c]
mov word [ebx + eax], dx
add eax, 2
test dx, dx
jne 0x40a5b0
mov eax, dword [0x40c0a8]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0
mov dword [esp + 4], 0x40b
mov dword [esp], eax
call dword [sym.imp.user32.dll_SendMessageW]
sub esp, 0x10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
lea esp, [edi - 8]
pop edi
ret
lea eax, [ebp - 0x910]
mov edx, dword [ebp - 0x9ac]
mov ebx, dword [sym.imp.shlwapi.dll_StrFormatByteSizeW]
mov dword [esp + 0xc], 0x40
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x9b0]
lea esi, [ebp - 0x990]
mov dword [esp + 4], edx
mov dword [esp], eax
call ebx
mov edx, dword [ebp - 0x9a4]
sub esp, 0x10
mov dword [ebp - 0x998], eax
lea eax, [ebp - 0x890]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x9a8]
mov dword [esp + 4], edx
mov dword [esp + 0xc], 0x40
mov dword [esp], eax
call ebx
lea ebx, [ebp - 0x810]
mov dword [ebp - 0x994], eax
mov eax, dword [0x40c080]
sub esp, 0x10
mov dword [esp + 0xc], 0x40
mov dword [esp + 8], esi
mov dword [esp + 4], 0x4c3
mov dword [esp], eax
call dword [sym.imp.user32.dll_LoadStringW]
lea eax, [ebp - 0x998]
sub esp, 0x10
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], 0x400
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], esi
mov dword [esp], 0x2400
call dword [sym.imp.kernel32.dll_FormatMessageW]
sub esp, 0x1c
jmp 0x40a5c3
Function at 0x40b740
Capabilities:
Accept command line arguments
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x58
call dword [sym.imp.kernel32.dll_GetCommandLineW]
mov ebx, eax
movzx eax, word [eax]
test ax, ax
je 0x40b7cb
cmp ax, 9
je 0x40b7b8
cmp ax, 0x20
je 0x40b7b8
mov dword [ebp - 0x54], 0
xor edi, edi
nop
cmp ax, 0x5c
je 0x40b820
cmp ax, 0x22
je 0x40b830
mov dword [ebp - 0x54], 0
movzx eax, word [ebx + 2]
add ebx, 2
test ax, ax
je 0x40b7cb
cmp ax, 9
sete cl
cmp ax, 0x20
mov esi, ecx
sete cl
mov edx, esi
or dl, cl
je 0x40b770
test edi, 1
jne 0x40b770
lea esi, [esi]
movzx eax, word [ebx + 2]
add ebx, 2
cmp ax, 9
je 0x40b7b8
cmp ax, 0x20
je 0x40b7b8
lea eax, [ebp - 0x50]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetStartupInfoW]
sub esp, 4
test byte [ebp - 0x24], 1
je 0x40b848
movzx esi, word [ebp - 0x20]
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_GetModuleHandleW]
sub esp, 4
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov dword [esp], eax
call sym._wWinMain_16
sub esp, 0x10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
inc dword [ebp - 0x54]
jmp 0x40b78b
and dword [ebp - 0x54], 1
jne 0x40b784
xor edi, 1
jmp 0x40b78b
mov eax, 1
mov esi, 1
mov word [ebp - 0x20], ax
jmp 0x40b7e4

Function at 0x40b860
Capabilities:
Get process heap flags
Terminate process

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0xc
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
nop
nop
nop
Function at 0x401d20
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
push ebx
mov ebx, ecx
push esi
push edi
cmp dword [ebx + 0x38], 0
je 0x401d4c
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const___long_long___int64__]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x20]
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
mov dword [esp + 0x20], esi
mov ecx, dword [eax]
lea eax, [ebx + 0x30]
mov dword [esp + 0x24], edi
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], eax
test ecx, ecx
je 0x401d74
mov eax, dword [eax]
mov ecx, dword [eax]
jmp 0x401d7a
xor ecx, ecx
mov dword [esp + 0x18], eax
mov eax, ecx
cdq
mov dword [esp + 0x10], eax
mov ecx, edx
mov dword [esp + 0x14], ecx
test edi, edi
jl 0x401de2
jg 0x401d91
test esi, esi
je 0x401de2
test ecx, ecx
jl 0x401ddd
jg 0x401d9b
test eax, eax
je 0x401ddd
cmp edi, ecx
jg 0x401daf
jl 0x401da5
cmp esi, eax
jae 0x401daf
mov eax, esi
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], edi
push eax
push dword [ebp + 8]
push dword [esp + 0x24]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [esp + 0x24]
add esp, 0xc
mov edx, dword [esp + 0x10]
mov ecx, dword [ebp + 8]
add ecx, edx
sub esi, edx
mov eax, dword [eax]
sbb edi, dword [esp + 0x14]
sub dword [eax], edx
mov eax, dword [ebx + 0x20]
add dword [eax], edx
jmp 0x401de5
mov ecx, dword [ebp + 8]
jmp 0x401def
mov ecx, dword [ebp + 8]
test edi, edi
jl 0x401e09
jg 0x401def
test esi, esi
je 0x401e09
mov eax, dword [ebx + 0x4c]
test eax, eax
je 0x401e09
push eax
push esi
push 1
push ecx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
sub esi, eax
sbb edi, 0
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
sub eax, esi
sbb edx, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x401e20
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x10]
sub esp, 8
push ebx
mov ebx, ecx
mov ecx, dword [ebp + 0xc]
test eax, eax
jg 0x401e44
jl 0x401e39
test ecx, ecx
jne 0x401e44
xor eax, eax
xor edx, edx
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebx + 0x38], 0
je 0x401e5e
push eax
push ecx
push dword [ebp + 8]
mov ecx, ebx
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char___long_long___int64__]
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x1c]
push esi
push edi
mov edi, ecx
mov eax, dword [eax]
mov dword [ebp - 8], eax
test eax, eax
je 0x401eaa
mov eax, dword [ebx + 0x2c]
lea edx, [ebx + 0x2c]
mov dword [ebp - 4], edx
mov eax, dword [eax]
test eax, eax
je 0x401eb0
mov edi, dword [ebp + 8]
cmp eax, ecx
mov esi, ecx
cmovb esi, eax
push esi
push dword [ebp - 8]
push edi
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebx + 0x2c]
add edi, esi
mov dword [ebp + 8], edi
add esp, 0xc
mov edi, dword [ebp + 0xc]
sub edi, esi
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
jmp 0x401eb0
lea eax, [ebx + 0x2c]
mov dword [ebp - 4], eax
cmp dword [ebx + 0x4c], 0
mov esi, dword [ebp + 8]
je 0x401f26
mov ecx, dword [ebx + 0xc]
lea eax, [ebx + 0x3c]
cmp dword [ecx], eax
jne 0x401edc
mov eax, dword [ebx + 0xc]
mov edx, dword [ebx + 0x54]
mov ecx, dword [ebx + 0x50]
sub edx, ecx
mov dword [eax], ecx
mov eax, dword [ebx + 0x1c]
mov dword [eax], ecx
mov eax, dword [ebp - 4]
mov eax, dword [eax]
mov dword [eax], edx
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
cmp edi, 0xfff
jbe 0x401f14
nop dword [eax]
push dword [ebx + 0x4c]
push 0xfff
push 1
push esi
call eax
add esp, 0x10
add esi, eax
sub edi, eax
cmp eax, 0xfff
jne 0x401f26
cmp edi, eax
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
ja 0x401ef0
test edi, edi
je 0x401f26
push dword [ebx + 0x4c]
push edi
push 1
push esi
call eax
add esp, 0x10
sub edi, eax
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
sub eax, edi
pop edi
pop esi
sbb edx, 0
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x4022c0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x4022dc
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
push edi
mov ecx, dword [eax]
test ecx, ecx
je 0x40230e
mov edx, dword [esi + 0x30]
mov edi, dword [edx]
lea eax, [edi + ecx]
cmp ecx, eax
jae 0x40230e
lea ecx, [edi - 1]
mov eax, ebx
mov dword [edx], ecx
mov edx, dword [esi + 0x20]
pop edi
mov esi, dword [edx]
lea ecx, [esi + 1]
mov dword [edx], ecx
mov byte [esi], bl
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
je 0x4023d1
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x402336
mov edx, dword [esi + 0x54]
mov ecx, dword [esi + 0x50]
sub edx, ecx
mov dword [edi], ecx
mov eax, dword [esi + 0x1c]
mov dword [eax], ecx
mov eax, dword [esi + 0x2c]
mov dword [eax], edx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x402342
movsx eax, bl
jmp 0x40237a
lea eax, [ebp + 8]
mov byte [ebp - 1], bl
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp]
push eax
lea eax, [ebp - 1]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet___char_const___char_const___char_const____char___char___char___const]
sub eax, 0
je 0x40239a
sub eax, 1
je 0x40239a
sub eax, 2
jne 0x4023d1
movsx eax, byte [ebp - 1]
push dword [esi + 0x4c]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
add esp, 8
or ecx, 0xffffffff
cmp eax, ecx
cmove ebx, ecx
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x28]
sub edi, eax
je 0x4023b8
push dword [esi + 0x4c]
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x4023d1
lea ecx, [ebp - 1]
mov byte [esi + 0x3d], 1
or eax, 0xffffffff
cmp dword [ebp - 8], ecx
pop edi
pop esi
cmovne eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret 4
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret 4