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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x10], 0
lea eax, [ebp - 0x14]
mov dword [esp + 8], eax
lea eax, [ebp - 0x18]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.004063e7
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jns 0x4069c7
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x19
mov dword [esp + 4], 1
mov dword [esp], str.Unable_to_read_mbdb_file_n
call sub.msvcrt.dll_fwrite
mov eax, 0
jmp 0x406a1f
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x18]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.004066f1
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x406a11
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x1a
mov dword [esp + 4], 1
mov dword [esp], str.Unable_to_parse_mbdb_file_n
call sub.msvcrt.dll_fwrite
mov eax, 0
jmp 0x406a1f
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call fcn.005a0e48
mov eax, dword [ebp - 0x10]
leave
ret

Function at 0x406acc
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov dword [esp], 0x5c
call sub.msvcrt.dll_malloc
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x406b16
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x12
mov dword [esp + 4], 1
mov dword [esp], str.Allocation_Error__n
call sub.msvcrt.dll_fwrite
mov eax, 0
jmp 0x406b34
mov dword [esp + 8], 0x5c
mov dword [esp + 4], 0
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov eax, dword [ebp - 0xc]
leave
ret
Function at 0x408b60
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov dword [ebp - 0x10], 0
mov eax, dword [ebp + 8]
mov dword [esp + 4], eax
lea eax, [ebp - 0x10]
mov dword [esp], eax
call fcn.00417872
test ax, ax
je 0x408bad
mov eax, dword [ebp + 8]
mov dword [esp + 8], eax
mov dword [esp + 4], str._s:_ERROR:_Could_not_connect_to_device._Cannot_reboot._n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov eax, 0xfffffffd
jmp 0x408d45
mov dword [ebp - 0x14], 0
mov eax, dword [ebp - 0x10]
mov dword [esp + 8], 0
lea edx, [ebp - 0x14]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.00419f03
mov eax, dword [ebp - 0x14]
test eax, eax
jne 0x408bf1
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call fcn.004178cb
mov dword [ebp - 0x10], 0
mov eax, 0xffffffff
jmp 0x408d45
mov word [ebp - 0x16], 0
mov eax, dword [ebp - 0x14]
lea edx, [ebp - 0x16]
mov dword [esp + 8], edx
mov dword [esp + 4], str.com.apple.mobile.diagnostics_relay
mov dword [esp], eax
call fcn.0041a129
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call fcn.0041909f
mov ax, word [ebp - 0x16]
test ax, ax
jne 0x408c69
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x32
mov dword [esp + 4], 1
mov dword [esp], str.ERROR:_Could_not_start_diagnostics_relay_service__n
call sub.msvcrt.dll_fwrite
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call fcn.004178cb
mov dword [ebp - 0x10], 0
mov eax, 0xffffffff
jmp 0x408d45
mov dword [ebp - 0x1c], 0
mov ax, word [ebp - 0x16]
movzx edx, ax
mov eax, dword [ebp - 0x10]
lea ecx, [ebp - 0x1c]
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0041c39b
test ax, ax
je 0x408cd3
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x2f
mov dword [esp + 4], 1
mov dword [esp], str.ERROR:_Could_not_connect_to_diagnostics_relay__n
call sub.msvcrt.dll_fwrite
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call fcn.004178cb
mov dword [ebp - 0x10], 0
mov eax, 0xffffffff
jmp 0x408d45
mov dword [ebp - 0xc], 0
mov eax, dword [ebp - 0x1c]
mov dword [esp + 4], 0
mov dword [esp], eax
call fcn.0041c59b
test ax, ax
je 0x408d21
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x29
mov dword [esp + 4], 1
mov dword [esp], str.ERROR:_Could_not_perform_Restart_command_n
call sub.msvcrt.dll_fwrite
mov dword [ebp - 0xc], 0xffffffff
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call fcn.0041c433
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call fcn.0041c409
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call fcn.004178cb
mov eax, dword [ebp - 0xc]
leave
ret
Function at 0x408d47
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov dword [ebp - 0x14], 0
mov eax, dword [ebp + 8]
mov dword [esp + 4], eax
lea eax, [ebp - 0x14]
mov dword [esp], eax
call fcn.00417872
mov eax, dword [ebp - 0x14]
test eax, eax
jne 0x408d8b
mov dword [esp], str.Could_not_connect_to_device__
call fcn.00416e84
mov dword [esp], eax
call fcn.00408888
mov eax, 0xffffffff
jmp 0x408f2e
mov dword [ebp - 0x18], 0
mov eax, dword [ebp - 0x14]
mov dword [esp + 8], 0
lea edx, [ebp - 0x18]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.00419f03
mov word [ebp - 0xe], ax
cmp word [ebp - 0xe], 0
je 0x408de0
movsx eax, word [ebp - 0xe]
mov dword [esp + 4], eax
mov dword [esp], str.Could_not_connect_to_lockdown___d_
call fcn.00408888
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call fcn.004178cb
mov eax, 0xffffffff
jmp 0x408f2e
mov byte [ebp - 0x19], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x20], 0
mov eax, dword [ebp - 0x18]
lea edx, [ebp - 0x20]
mov dword [esp + 0xc], edx
mov dword [esp + 8], 0x671dc7
mov dword [esp + 4], 0
mov dword [esp], eax
call fcn.00418860
test ax, ax
je 0x408e46
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x46
mov dword [esp + 4], 1
mov dword [esp], str.hm_could_not_get_PasswordProtected_value__assuming_device_is_unlocked_n
call sub.msvcrt.dll_fwrite
jmp 0x408ef1
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call fcn.00422c6c
test eax, eax
je 0x408e8a
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call fcn.00422520
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x4f
mov dword [esp + 4], 1
mov dword [esp], str.hm_PasswordProtected_value_is_not_of_type_boolean__assuming_device_is_unlocked_n
call sub.msvcrt.dll_fwrite
jmp 0x408ef1
mov eax, dword [ebp - 0x20]
lea edx, [ebp - 0x19]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.00422ddc
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call fcn.00422520
mov al, byte [ebp - 0x19]
test al, al
je 0x408ed7
cmp dword [ebp - 0xc], 0
jne 0x408ed7
mov dword [esp], str.Device_is_locked_with_a_passcode._Please_enter_it_NOW__the_procedure_will_then_continue.
call fcn.00416e84
mov dword [esp + 4], eax
mov dword [esp], 0xffffffff
call fcn.00408950
mov dword [ebp - 0xc], 1
mov dword [esp], 0x3e8
call sub.KERNEL32.dll_Sleep
sub esp, 4
mov al, byte [ebp - 0x19]
test al, al
jne 0x408deb
cmp dword [ebp - 0xc], 0
je 0x408f13
mov dword [esp], str.Continuing...
call fcn.00416e84
mov dword [esp + 4], eax
mov dword [esp], 0xffffffff
call fcn.00408950
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call fcn.0041909f
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call fcn.004178cb
mov eax, 0
leave
ret
Function at 0x4091d8
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov dword [ebp - 0x14], 0
mov eax, dword [ebp + 8]
mov dword [esp + 4], eax
lea eax, [ebp - 0x14]
mov dword [esp], eax
call fcn.00417872
mov eax, dword [ebp - 0x14]
test eax, eax
jne 0x409230
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x2e
mov dword [esp + 4], 1
mov dword [esp], str.ERROR:_Could_not_connect_to_device._Aborting._n
call sub.msvcrt.dll_fwrite
mov eax, 0xfffffffe
jmp 0x4093a2
mov dword [ebp - 0x18], 0
mov eax, dword [ebp - 0x14]
mov dword [esp + 8], 0
lea edx, [ebp - 0x18]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.00419f03
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x409295
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call fcn.004178cb
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x2f
mov dword [esp + 4], 1
mov dword [esp], str.ERROR:_Could_not_connect_to_lockdown._Aborting_n
call sub.msvcrt.dll_fwrite
mov eax, 0xfffffffc
jmp 0x4093a2
mov dword [ebp - 0xc], 0x12c
mov dword [ebp - 0x10], 0
mov word [ebp - 0x1a], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x24], 0
jmp 0x409372
mov word [ebp - 0x1a], 0
mov eax, dword [ebp - 0x18]
lea edx, [ebp - 0x1a]
mov dword [esp + 8], edx
mov dword [esp + 4], str.com.apple.springboardservices
mov dword [esp], eax
call fcn.0041a129
mov ax, word [ebp - 0x1a]
test ax, ax
je 0x40936e
mov dword [ebp - 0x20], 0
mov ax, word [ebp - 0x1a]
movzx edx, ax
mov eax, dword [ebp - 0x14]
lea ecx, [ebp - 0x20]
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0041caa2
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x409371
mov eax, dword [ebp - 0x20]
mov dword [esp + 8], 0x671fbe
lea edx, [ebp - 0x24]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0041cb54
test ax, ax
jne 0x40934c
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call fcn.00422520
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x10], 1
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call fcn.0041cb0e
cmp dword [ebp - 0x10], 0
jne 0x40938c
mov dword [esp], 0xbb8
call sub.KERNEL32.dll_Sleep
sub esp, 4
jmp 0x409372
nop
jmp 0x409372
nop
cmp dword [ebp - 0x10], 0
jne 0x40938d
cmp dword [ebp - 0xc], 0
setg al
dec dword [ebp - 0xc]
test al, al
jne 0x4092bc
jmp 0x40938d
nop
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call fcn.0041909f
mov dword [ebp - 0x18], 0
mov eax, dword [ebp - 0x10]
leave
ret
Function at 0x4093a4
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x2c
mov eax, dword [ebp + 8]
mov byte [eax], 0
mov eax, dword [ebp + 8]
mov dword [esp + 4], eax
mov dword [esp], 0x200
call sub.KERNEL32.dll_GetTempPathA
sub esp, 8
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sub.msvcrt.dll_strlen
lea edx, [eax - 1]
mov eax, dword [ebp + 8]
add eax, edx
mov al, byte [eax]
cmp al, 0x2f
je 0x409408
mov eax, dword [ebp + 8]
mov dword [ebp - 0x1c], 0xffffffff
mov edx, eax
mov al, 0
mov ecx, dword [ebp - 0x1c]
mov edi, edx
repne scasb al, byte es:[edi]
mov eax, ecx
not eax
lea edx, [eax - 1]
mov eax, dword [ebp + 8]
add eax, edx
mov word [eax], 0x2f
mov eax, dword [ebp + 8]
mov dword [ebp - 0x1c], 0xffffffff
mov edx, eax
mov al, 0
mov ecx, dword [ebp - 0x1c]
mov edi, edx
repne scasb al, byte es:[edi]
mov eax, ecx
not eax
lea edx, [eax - 1]
mov eax, dword [ebp + 8]
add eax, edx
mov edx, eax
mov ebx, str.evasi0n_
mov eax, 9
mov edi, edx
mov esi, ebx
mov ecx, eax
rep movsb byte es:[edi], byte [esi]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x409445
Capabilities:
Delete directory
Delete file

Disassembly:
push ebp
mov ebp, esp
push edi
push ebx
sub esp, 0x50
cmp dword [ebp + 8], 0
je 0x409629
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.00598710
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x4095da
jmp 0x4095b7
mov eax, dword [ebp - 0x10]
add eax, 8
mov dword [esp + 4], 0x671fc9
mov dword [esp], eax
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x4095b6
mov eax, dword [ebp - 0x10]
add eax, 8
mov dword [esp + 4], 0x671fcb
mov dword [esp], eax
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x4095b6
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sub.msvcrt.dll_strlen
mov ebx, eax
mov eax, dword [ebp - 0x10]
add eax, 8
mov dword [esp], eax
call sub.msvcrt.dll_strlen
add eax, ebx
add eax, 2
mov dword [esp], eax
call sub.msvcrt.dll_malloc
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x4095b7
mov eax, dword [ebp + 8]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sub.msvcrt.dll_strcpy
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x3c], 0xffffffff
mov edx, eax
mov al, 0
mov ecx, dword [ebp - 0x3c]
mov edi, edx
repne scasb al, byte es:[edi]
mov eax, ecx
not eax
lea edx, [eax - 1]
mov eax, dword [ebp - 0x14]
add eax, edx
mov word [eax], 0x2f
mov eax, dword [ebp - 0x10]
add eax, 8
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call fcn.005a0e90
lea eax, [ebp - 0x38]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sub.msvcrt.dll__stat
test eax, eax
jne 0x409568
mov ax, word [ebp - 0x32]
movzx eax, ax
and eax, 0xf000
cmp eax, 0x4000
jne 0x409568
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call fcn.00409445
jmp 0x4095a9
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sub.msvcrt.dll_remove
test eax, eax
je 0x4095a9
call sub.msvcrt.dll__errno
mov eax, dword [eax]
mov dword [esp], eax
call sub.msvcrt.dll_strerror
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x14]
mov dword [esp + 8], eax
mov dword [esp + 4], str.could_not_remove_file__s:__s_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call fcn.005a0e48
jmp 0x4095b7
nop
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call fcn.00598920
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x409474
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call fcn.00598a30
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sub.msvcrt.dll__rmdir
test eax, eax
je 0x40962a
call sub.msvcrt.dll__errno
mov eax, dword [eax]
cmp eax, 2
je 0x40962a
call sub.msvcrt.dll__errno
mov eax, dword [eax]
mov dword [esp], eax
call sub.msvcrt.dll_strerror
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 8]
mov dword [esp + 8], eax
mov dword [esp + 4], str.could_not_remove_directory__s:__s_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
jmp 0x40962a
nop
add esp, 0x50
pop ebx
pop edi
pop ebp
ret
Function at 0x409cf3
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
cmp dword [ebp + 8], 0
je 0x409d08
mov eax, dword [ebp + 8]
mov eax, dword [eax]
test eax, eax
jne 0x409d12
mov eax, 0xffffffff
jmp 0x409e05
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov dword [esp + 0xc], str.com.apple.DemoApp
mov dword [esp + 8], str.System
mov dword [esp + 4], 2
mov dword [esp], eax
call fcn.00422bdc
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x409d72
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x30
mov dword [esp + 4], 1
mov dword [esp], str.could_not_find_com.apple.DemoApp_entry_in_plist_n
call sub.msvcrt.dll_fwrite
mov eax, 0xffffffff
jmp 0x409e05
mov dword [esp + 4], str.ApplicationType
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call fcn.00422b0c
mov dword [esp + 4], str.SBAppTags
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call fcn.00422b0c
mov dword [esp], str._var_mobile_DemoApp.app
call fcn.0042230c
mov dword [esp + 8], eax
mov dword [esp + 4], str.Path
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call fcn.00409ca5
call fcn.004222a4
mov dword [ebp - 0x10], eax
mov dword [esp], str._private_var_tmp_launchd_sock
call fcn.0042230c
mov dword [esp + 8], eax
mov dword [esp + 4], str.LAUNCHD_SOCKET
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call fcn.00422a70
mov eax, dword [ebp - 0x10]
mov dword [esp + 8], eax
mov dword [esp + 4], str.EnvironmentVariables
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call fcn.00409ca5
mov eax, 0
leave
ret
Function at 0x40af57
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov dword [ebp - 0xc], 0
mov dword [esp + 8], 0xa
mov eax, dword [ebp + 8]
mov dword [esp + 4], eax
mov dword [esp], 0
call sub.KERNEL32.dll_FindResourceA
sub esp, 0xc
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x40afd6
mov eax, dword [ebp - 0x10]
mov dword [esp + 4], eax
mov dword [esp], 0
call sub.KERNEL32.dll_LoadResource
sub esp, 8
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sub.KERNEL32.dll_LockResource
sub esp, 4
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x10]
mov dword [esp + 4], eax
mov dword [esp], 0
call sub.KERNEL32.dll_SizeofResource
sub esp, 8
mov dword [ebp - 0x18], eax
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp + 0xc]
mov dword [eax], edx
mov eax, dword [ebp - 0xc]
leave
ret
Function at 0x40e852
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [ebp + 0x10]
mov dword [eax], 0
mov dword [eax + 4], 0
mov dword [esp + 4], 0x673a6b
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sub.msvcrt.dll_fopen
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x40e91c
mov dword [esp + 8], 2
mov dword [esp + 4], 0
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.msvcrt.dll_fseek
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.msvcrt.dll_ftell
cdq
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], edx
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.msvcrt.dll_rewind
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x14]
or eax, edx
test eax, eax
je 0x40e91f
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call sub.msvcrt.dll_malloc
mov edx, eax
mov eax, dword [ebp + 0xc]
mov dword [eax], edx
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov ecx, dword [ebp - 0xc]
mov dword [esp + 0xc], ecx
mov dword [esp + 8], edx
mov dword [esp + 4], 1
mov dword [esp], eax
call sub.msvcrt.dll_fread
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call fcn.005a0ec8
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x14]
mov dword [ecx], eax
mov dword [ecx + 4], edx
jmp 0x40e920
nop
jmp 0x40e920
nop
leave
ret

Function at 0x40e922
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x1c], eax
mov dword [esp + 4], 0x673a6e
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sub.msvcrt.dll_fopen
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x40e966
mov dword [esp + 4], 0x673a71
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sub.msvcrt.dll_fopen
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x40e998
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0xc]
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sub.msvcrt.dll_fwrite
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call fcn.005a0ec8
leave
ret
Function at 0x4103df
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x228
mov dword [esp + 4], 0x673a6b
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sub.msvcrt.dll_fopen
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x41041c
mov eax, dword [ebp + 8]
mov dword [esp + 4], eax
mov dword [esp], str.Cannot_open_source_path__s._n
call sub.msvcrt.dll_printf
jmp 0x4104da
mov dword [esp + 4], 0x673a71
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sub.msvcrt.dll_fopen
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x410474
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov dword [esp], str.Cannot_open_destination_file__s._n
call sub.msvcrt.dll_printf
jmp 0x4104da
mov eax, dword [ebp - 0x10]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x14]
mov dword [esp + 8], eax
mov dword [esp + 4], 1
lea eax, [ebp - 0x214]
mov dword [esp], eax
call sub.msvcrt.dll_fwrite
mov eax, dword [ebp - 0xc]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x200
mov dword [esp + 4], 1
lea eax, [ebp - 0x214]
mov dword [esp], eax
call sub.msvcrt.dll_fread
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x410450
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call fcn.005a0ec8
cmp eax, 0xffffffff
jne 0x4104be
mov dword [esp], str.Error_closing_source_file.
call sub.msvcrt.dll_puts
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call fcn.005a0ec8
cmp eax, 0xffffffff
jne 0x4104da
mov dword [esp], str.Error_closing_destination_file.
call sub.msvcrt.dll_puts
leave
ret

Function at 0x4106c1
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov dword [ebp - 0xc], 0
jmp 0x410760
cmp dword [ebp - 0x10], 0xd
je 0x410772
cmp dword [ebp - 0x10], 0xa
je 0x410772
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.msvcrt.dll_isprint
test eax, eax
je 0x410729
mov eax, dword [ebp + 0xc]
dec eax
cmp eax, dword [ebp - 0xc]
jle 0x41070f
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp + 8]
add edx, eax
mov eax, dword [ebp - 0x10]
mov byte [edx], al
inc dword [ebp - 0xc]
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], 0x2a
call fcn.005a0f68
jmp 0x410760
cmp dword [ebp - 0x10], 8
jne 0x410760
cmp dword [ebp - 0xc], 0
jle 0x410760
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 0xc], eax
mov dword [esp + 8], 3
mov dword [esp + 4], 1
mov dword [esp], 0x673fc9
call sub.msvcrt.dll_fwrite
dec dword [ebp - 0xc]
call sub.msvcrt.dll__getch
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x4106d3
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp + 8]
add eax, edx
mov byte [eax], 0
leave
ret
Function at 0x4108d1
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
cmp dword [ebp + 8], 0
jne 0x4108e9
mov dword [0x6f6098], 0
jmp 0x410932
mov eax, dword [0x6f6098]
cmp eax, 0x10
jne 0x41091d
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x2e
mov dword [esp + 4], 1
mov dword [esp], str.Sorry__cant_ignore_more_than_16_error_codes._n
call sub.msvcrt.dll_fwrite
jmp 0x410932
mov eax, dword [0x6f6098]
mov edx, dword [ebp + 8]
mov dword [eax*4 + 0x6f60a0], edx
inc eax
mov dword [0x6f6098], eax
leave
ret