joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40c9ef
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, ecx
push edi
mov di, word [ebp + 8]
movzx ebx, word [esi + 0x426]
cmp word [esi + 0x1232], 0
lea eax, [esi + 0x426]
mov word [eax], di
je 0x40ca1f
mov ecx, 0x4536c0
call fcn.00423fa2
cmp di, 4
jne 0x40ca2c
mov ecx, esi
call fcn.0040d23a
test ebx, ebx
jne 0x40ca6c
mov ecx, esi
call fcn.0040d79c
lea eax, [ebp + 8]
xor edi, edi
push eax
push edi
push esi
push 0x40ca73
push edi
push edi
call fcn.0042b9c1
add esp, 0x18
cmp eax, edi
mov dword [esi + 4], eax
jne 0x40ca6c
lea eax, [esi + 0x5c]
push str.Failed_to_create_Termination_thread
push eax
call fcn.0041e63d
pop ecx
pop ecx
mov ecx, esi
call fcn.00408c55
pop edi
pop esi
pop ebx
pop ebp
ret 4

Function at 0x40da5f
Capabilities:
Enumerate gui resources

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
and dword [ebp - 0x14], 0
push esi
push 1
pop eax
mov ebx, ecx
push 0x15e6
push 0x2042
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
cmp dword [ebp - 8], 0
mov esi, eax
je 0x40dba2
test esi, esi
je 0x40dba2
push 0x15e0
lea eax, [esi + 6]
push 0x452000
push eax
mov word [esi], 0x8009
call fcn.0042b2e0
add esp, 0xc
mov dword [esi + 2], 0x15e0
and dword [ebp - 4], 0
cmp word [ebp - 0x10], 0
je 0x40db3f
lea eax, [ebp - 4]
push eax
push 0x40d9b4
call dword [sym.imp.USER32.dll_EnumWindows]
cmp dword [ebp - 4], 0
je 0x40db3f
cmp dword [ebp - 4], 0xffffffff
je 0x40db39
push 0
mov dword [ebp - 0x20], 0x401
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x1c], 0x15e6
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea eax, [ebp - 0x20]
push eax
push dword [ebx + 0x14]
push 0x4a
push dword [ebp - 4]
call dword [sym.imp.USER32.dll_SendMessageA]
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x40db90
lea eax, [ebx + 0x1c]
push str.Failed_to_send_message_to_existing_driver_instance
push eax
call fcn.0041e63d
and dword [ebp - 0x10], 0
and dword [ebp - 4], 0
pop ecx
pop ecx
cmp dword [ebp - 4], 0
jne 0x40db5b
push 0x1f4
push esi
mov ecx, 0x4535e0
call fcn.004210b2
test eax, eax
mov dword [ebp - 4], eax
je 0x40db97
cmp eax, 0xffffffff
jne 0x40dbb2
mov ecx, dword [ebp + 8]
xor eax, eax
cmp ecx, eax
je 0x40db9d
cmp word [ebp - 0x14], ax
jne 0x40db7c
push eax
push 0x2000b
call fcn.0041a375
mov dword [ebp - 0x14], 1
mov ecx, dword [ebp + 8]
push 0x64
call fcn.0041a21c
test ax, ax
jne 0x40dbb2
jmp 0x40dac6
push str.Sent_message_to_existing_driver_instance
jmp 0x40dba7
and dword [ebp - 0xc], 0
jmp 0x40dbb2
mov dword [ebp - 0xc], eax
jmp 0x40dbb2
push str.Failed_to_allocate_memory
add ebx, 0x1c
push ebx
call fcn.0041e63d
pop ecx
pop ecx
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov ax, word [ebp - 0xc]
pop esi
pop ebx
leave
ret 4
Function at 0x40df7b
Capabilities:
Access the windows event log
Persist via windows service
Set registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2004c
call fcn.0042b680
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
xor ebx, ebx
mov dword [ebp - 0x10], 7
cmp byte [esi + 0xf8e], bl
lea edi, [esi + 0xf8e]
mov dword [ebp - 0xc], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
je 0x40dfc2
push edi
lea eax, [ebp - 0x4c]
push str.WilC2___s_
push eax
call fcn.0042b964
add esp, 0xc
jmp 0x40dfd2
lea eax, [ebp - 0x4c]
push str.WilC2
push eax
call fcn.0042b1f0
pop ecx
pop ecx
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x1004c]
push str.SystemCurrentControlSetServicesEventLogApplication_s
push eax
call fcn.0042b964
add esp, 0xc
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
push eax
push ebx
push 0xf003f
push ebx
push ebx
lea eax, [ebp - 0x1004c]
push ebx
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
cmp eax, ebx
jne 0x40e074
cmp dword [ebp - 8], 1
jne 0x40e069
lea eax, [ebp - 0x1004c]
push 0x104
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x1004c]
push eax
call fcn.0042bfb0
pop ecx
inc eax
push eax
lea eax, [ebp - 0x1004c]
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push eax
push 2
push ebx
push str.EventMessageFile
push dword [ebp - 4]
call esi
lea eax, [ebp - 0x10]
push 4
push eax
push 4
push ebx
push str.TypesSupported
push dword [ebp - 4]
call esi
mov esi, dword [ebp + 8]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40e08e
cmp eax, 5
je 0x40e08e
lea eax, [ebp - 0x4c]
push eax
lea eax, [esi + 0x5c]
push str.Failed_to_setup_Event_messages_for___s_
push eax
call fcn.0041e63d
add esp, 0xc
lea eax, [ebp + 0x10]
push eax
lea eax, [ebp - 0x2004c]
push dword [ebp + 0xc]
push 0xfffe
push eax
call fcn.0042c5c0
add esp, 0x10
cmp byte [edi], bl
je 0x40e0df
cmp word [esi + 0x1232], bx
mov eax, str.service
jne 0x40e0c0
mov eax, str.driver
lea ecx, [ebp - 0x2004c]
push ecx
push edi
push eax
lea eax, [ebp - 0x1004c]
push str.Wil32C2__s_for_device__s_n_n_s
push eax
call fcn.0042b964
add esp, 0x14
jmp 0x40e10e
cmp word [esi + 0x1232], bx
mov eax, str.service
jne 0x40e0f2
mov eax, str.driver
lea ecx, [ebp - 0x2004c]
push ecx
push eax
lea eax, [ebp - 0x1004c]
push str.Wil32C2__s_n_n_s
push eax
call fcn.0042b964
add esp, 0x10
lea eax, [ebp - 0x1004c]
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x4c]
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceA]
mov edi, eax
cmp edi, ebx
je 0x40e15a
lea eax, [ebp - 0xc]
push ebx
push eax
push ebx
push 1
push ebx
push 1
push ebx
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ReportEventA]
test eax, eax
jne 0x40e151
add esi, 0x5c
push str.Failed_to_report_Event
push esi
call fcn.0041e63d
pop ecx
pop ecx
push edi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
jmp 0x40e16a
add esi, 0x5c
push str.Failed_to_get_Event_source
push esi
call fcn.0041e63d
pop ecx
pop ecx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40e16f
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
lea eax, [ebp - 4]
push edi
push eax
push str.SoftwareWordcraft_International_LtdClass2
mov edi, ecx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x40e1e5
lea eax, [ebp - 8]
lea esi, [edi + 0x1249]
push eax
lea eax, [ebp - 0xc]
push esi
push eax
push 0
push str.ActiveDrivers
push dword [ebp - 4]
mov dword [ebp - 8], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push esi
call fcn.0042bfb0
test eax, eax
pop ecx
mov dword [ebp - 8], eax
je 0x40e1e5
cmp byte [eax + edi + 0x1248], 0x5c
je 0x40e1e5
push 0x442170
push esi
call fcn.0042b200
pop ecx
pop ecx
pop edi
pop esi
leave
ret

Function at 0x40e1e9
Capabilities:
Write file on windows

Disassembly:
push ecx
push ebx
push ebp
push esi
mov esi, ecx
push edi
cmp byte [esi + 0x1249], 0
lea ebp, [esi + 0x1249]
jne 0x40e211
add esi, 0x1c
push str.Path_for_active_driver_list_is_not_defined
push esi
call fcn.0041e63d
pop ecx
pop ecx
jmp 0x40e284
push 0x452004
push ebp
call fcn.0042b200
pop ecx
xor edi, edi
pop ecx
push edi
push edi
push 2
push edi
push edi
push 0xc0000000
push ebp
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x40e272
push edi
lea eax, [esp + 0x14]
mov edi, 0x452e8a
push eax
push edi
mov word [esi + 0x135a], 1
call fcn.0042bfb0
pop ecx
push eax
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
jne 0x40e284
push ebp
push str.Failed_to_write_to_driver_registration_file___s_
jmp 0x40e278
push ebp
push str.Failed_to_create_driver_registration_file___s_
add esi, 0x1c
push esi
call fcn.0041e63d
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret

Function at 0x40e28a
Capabilities:
Delete file

Disassembly:
cmp word [ecx + 0x135a], 0
je 0x40e2a1
add ecx, 0x1249
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
ret

Function at 0x40e6b9
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, ecx
xor ebx, ebx
cmp dword [esi + 4], 0xffffffff
jne 0x40e6cf
mov ax, 1
jmp 0x40e712
push edi
lea edi, [esi + 0x10]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi + 0xc]
test eax, eax
je 0x40e707
lea ecx, [ebp - 4]
push 0
push ecx
push eax
push dword [esi + 8]
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40e700
mov eax, dword [esi + 0xc]
cmp eax, dword [ebp - 4]
je 0x40e703
push 1
pop ebx
and dword [esi + 0xc], 0
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ax, bx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40e90f
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
mov ebx, dword [ebp + 0x18]
push esi
push edi
mov edi, dword [ebp + 0x10]
mov esi, ecx
and dword [edi], 0
cmp word [esi + 0x3510], 2
jne 0x40e9da
push 0
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [esi + 0x1a6c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40e97c
push str.Error_reading_from_print_spool_file
push ebx
call fcn.0041e63d
pop ecx
pop ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, 0xffffff80
je 0x40e96c
mov eax, 0x8037
jmp 0x40ea87
xor ecx, ecx
mov ch, al
or cx, 0x8037
mov eax, ecx
jmp 0x40ea87
cmp word [0x453494], 0
je 0x40e9bc
mov ecx, ebx
call fcn.0041eaa4
push dword [edi]
push str.SPOOL:_Read__u_bytes_back_from_spool_file_...
push ebx
call fcn.0041e63d
mov ecx, dword [edi]
mov eax, dword [0x4534aa]
add esp, 0xc
cmp ecx, eax
jae 0x40e9aa
mov eax, ecx
push eax
mov ecx, ebx
push dword [ebp + 8]
call fcn.0041e766
mov ecx, ebx
call fcn.0041eaaf
mov eax, dword [edi]
cmp eax, dword [ebp + 0xc]
jb 0x40e9cb
xor ax, ax
jmp 0x40ea87
add dword [ebp + 8], eax
sub dword [ebp + 0xc], eax
mov word [esi + 0x3510], 1
push ebx
lea eax, [ebp + 0x10]
push dword [ebp + 0x14]
mov ecx, 0x453670
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00427526
cmp word [0x453494], 0
mov dword [ebp + 0xc], eax
je 0x40ea36
mov ecx, ebx
call fcn.0041eaa4
push dword [ebp + 0x10]
push str.SPOOL:_Read__u_bytes_...
push ebx
call fcn.0041e63d
mov eax, dword [0x4534aa]
add esp, 0xc
cmp dword [ebp + 0x10], eax
jae 0x40ea24
mov eax, dword [ebp + 0x10]
push eax
mov ecx, ebx
push dword [ebp + 8]
call fcn.0041e766
mov ecx, ebx
call fcn.0041eaaf
mov eax, dword [ebp + 0x10]
add dword [edi], eax
cmp word [esi + 0x3510], 1
jne 0x40ea83
lea ecx, [ebp - 4]
push 0
push ecx
push eax
push dword [ebp + 8]
push dword [esi + 0x1a6c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40ea66
push str.Error_writing_to_print_spool_file
jmp 0x40ea73
mov eax, dword [ebp + 0x10]
cmp eax, dword [ebp - 4]
je 0x40ea83
push str.Failed_to_write_print_spool_file___disk_full_
push ebx
call fcn.0041e63d
and word [esi + 0x3510], 0
pop ecx
pop ecx
mov ax, word [ebp + 0xc]
pop edi
pop esi
pop ebx
leave
ret 0x14
Function at 0x40efae
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x604
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, ecx
xor ebx, ebx
cmp word [ebp + 0xc], bx
je 0x40f012
cmp word [ebp + 0xc], 1
mov byte [ebp - 0x604], bl
jbe 0x40eff4
movzx eax, word [ebp + 0xc]
dec eax
mov dword [ebp - 4], eax
lea eax, [ebp - 0x604]
push 0x442fb0
push eax
call fcn.0042b200
dec dword [ebp - 4]
pop ecx
pop ecx
jne 0x40efdc
movzx eax, word [edi]
push dword [edi + 8]
push eax
lea eax, [ebp - 0x604]
push eax
push str.FAX:__sSide_chain_type_0x_04x__length__u___ignoring
push dword [esi + 0x58]
call fcn.0041e63d
add esp, 0x14
mov eax, dword [edi + 0xc]
cmp eax, ebx
je 0x40f07f
push ebx
push ebx
push eax
push dword [esi + 0x1a6c]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x40f0e5
lea eax, [ebp + 8]
push ebx
push eax
lea eax, [ebp - 0x204]
push 0x200
push eax
push dword [esi + 0x1a6c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40f0ec
cmp dword [ebp + 8], 0x200
jne 0x40f0ec
mov eax, dword [ebp + 0xc]
mov ecx, esi
inc eax
push eax
lea eax, [ebp - 0x204]
push eax
call fcn.0040efae
cmp ax, bx
jne 0x40f11a
cmp word [ebp + 0xc], bx
je 0x40f0e0
mov eax, dword [edi + 8]
add eax, 0x201
add dword [esi + 0x888], eax
mov edi, dword [edi + 4]
cmp edi, ebx
je 0x40f0e0
push ebx
push ebx
push edi
push dword [esi + 0x1a6c]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x40f0e5
lea eax, [ebp + 8]
push ebx
push eax
mov edi, 0x200
lea eax, [ebp - 0x204]
push edi
push eax
push dword [esi + 0x1a6c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40f0ec
cmp dword [ebp + 8], edi
jne 0x40f0ec
lea edi, [ebp - 0x204]
jmp 0x40efc1
xor ax, ax
jmp 0x40f11a
push str.Failed_to_seek_to_side_chain_sub_document_header
jmp 0x40f0f1
push str.Error_reading_side_chain_sub_document_header
push dword [esi + 0x58]
call fcn.0041e63d
pop ecx
pop ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, 0xffffff80
je 0x40f10f
mov eax, 0x8037
jmp 0x40f11a
xor ecx, ecx
mov ch, al
or cx, 0x8037
mov eax, ecx
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x410e35
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x12a4
call fcn.0042b680
push ebx
push esi
mov esi, ecx
push edi
xor edi, edi
xor ebx, ebx
cmp dword [esi + 0x1a6c], 0xffffffff
je 0x4110aa
cmp word [esi + 0x8aa], di
je 0x410e6b
call fcn.0041f722
jmp 0x411046
cmp word [esi + 0x1a64], di
je 0x411048
push 0x22
lea eax, [ebp - 0x24]
push edi
push eax
call fcn.0042b620
mov ax, word [esi + 0x1fba]
mov cx, word [esi + 0x1ab4]
or ax, word [esi + 0x1fb8]
lea edi, [esi + 0x1a90]
mov word [ebp - 0x1e], cx
mov cx, word [esi + 0x1ab8]
mov word [ebp - 0x20], ax
mov al, byte [esi + 0x1a91]
add byte [edi], al
mov byte [ebp - 0x22], al
lea eax, [ebp - 0x22]
push 0x1d
push eax
mov byte [ebp - 0x21], 1
mov word [ebp - 0x1c], cx
call fcn.0040e839
neg al
add esp, 0x14
mov byte [ebp - 5], al
lea eax, [ebp - 0x24]
mov ecx, esi
push 0x22
push eax
call fcn.0041196b
mov ebx, eax
test bx, bx
jne 0x411048
push 1
push edi
mov ecx, esi
call fcn.0041196b
mov ebx, eax
test bx, bx
jne 0x411048
mov ecx, esi
call fcn.004119f3
mov ebx, eax
test bx, bx
jne 0x411048
mov ecx, esi
call fcn.00411b27
xor eax, eax
push eax
push eax
push eax
push dword [esi + 0x1a6c]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x410f7f
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
lea eax, [ebp - 0x12a4]
push 0x1000
push eax
call edi
push eax
call fcn.00424a92
add esp, 0xc
push eax
push str.Error_writing_fax_file____s
push dword [esi + 0x58]
call fcn.0041e63d
add esp, 0xc
call edi
test eax, 0xffffff80
je 0x410f71
mov ebx, 0x803c
jmp 0x411048
xor ebx, ebx
mov bh, al
or bx, 0x803c
jmp 0x411048
push 0x280
lea eax, [ebp - 0x2a4]
push str.LFDH
push eax
call fcn.0042b2e0
mov ax, word [esi + 0x1a64]
mov ebx, dword [esi + 0x1a8c]
mov cx, word [esi + 0x1fb6]
mov dx, word [esi + 0x1fae]
mov di, word [esi + 0x1fb0]
mov word [ebp - 0x294], ax
mov word [ebp - 0x1e4], ax
lea eax, [ebp - 0x2a4]
dec ebx
push 0x7f
push eax
mov word [ebp - 0x292], cx
mov word [ebp - 0x280], dx
mov word [ebp - 0x27e], di
mov dword [ebp - 0x21c], ebx
mov word [ebp - 0x1e2], cx
mov word [ebp - 0x1de], dx
mov word [ebp - 0x1dc], di
call fcn.0040e839
neg al
mov byte [ebp - 0x225], al
lea eax, [ebp - 0x224]
push 0x1ff
push eax
call fcn.0040e839
neg al
add esp, 0x1c
mov byte [ebp - 0x25], al
lea eax, [ebp - 0x2a4]
mov ecx, esi
push 0x280
push eax
call fcn.0041196b
mov ebx, eax
test bx, bx
jne 0x411048
mov ecx, esi
call fcn.004119f3
mov ebx, eax
push dword [esi + 0x1a6c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [esi + 0x1a6c], 0xffffffff
xor edi, edi
cmp word [esi + 0x8aa], di
jne 0x4110aa
cmp bx, di
jne 0x41108f
cmp word [esi + 0x372a], di
je 0x41107d
cmp word [esi + 0x1a64], di
je 0x41108f
cmp word [esi + 0x89e], di
je 0x4110c8
cmp word [0x45329c], di
je 0x4110aa
lea eax, [esi + 0x1aec]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
and byte [esi + 0x192e], 0
mov word [esi + 0x1a64], di
cmp word [esi + 0x89e], di
je 0x4110c8
push dword [esi + 0x58]
mov ax, word [esi + 0x3c54]
mov ecx, 0x453670
push eax
call fcn.004277ea
pop edi
mov ax, bx
pop esi
pop ebx
leave
ret
Function at 0x4119f3
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, ecx
push edi
mov di, word [esi + 0x1a98]
sub di, word [esi + 0x1a9a]
test di, di
je 0x411b20
cmp word [esi + 0x8a6], 0
je 0x411a5d
push dword [esi + 0x18b4]
mov ecx, dword [esi + 0x3c8c]
movzx eax, di
push eax
add ecx, 0x360
push dword [esi + 0x1a68]
call fcn.0042708e
test eax, eax
je 0x411b06
push str.Error_writing_Twain_scan_data
push dword [esi + 0x58]
call fcn.0041e63d
pop ecx
mov ax, 0x803c
pop ecx
jmp 0x411b23
cmp word [0x453490], 0
je 0x411a9c
mov ecx, dword [esi + 0x58]
push ebx
call fcn.0041eaa4
movzx ebx, di
push ebx
push str.FAX:_Write__u_bytes_...
push dword [esi + 0x58]
call fcn.0041e63d
mov ecx, dword [esi + 0x58]
add esp, 0xc
push ebx
push dword [esi + 0x1a68]
call fcn.0041e766
mov ecx, dword [esi + 0x58]
call fcn.0041eaaf
pop ebx
movzx edi, di
lea eax, [ebp - 4]
push 0
push eax
push edi
push dword [esi + 0x1a68]
push dword [esi + 0x1a6c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x411aec
push str.Error_writing_fax_document
push dword [esi + 0x58]
call fcn.0041e63d
pop ecx
pop ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, 0xffffff80
je 0x411adf
mov eax, 0x803c
jmp 0x411b23
xor ecx, ecx
mov ch, al
or cx, 0x803c
mov eax, ecx
jmp 0x411b23
cmp edi, dword [ebp - 4]
je 0x411b06
push str.Failed_to_write_fax_document___disk_full_
push dword [esi + 0x58]
call fcn.0041e63d
pop ecx
mov ax, 0x803d
pop ecx
jmp 0x411b23
mov eax, dword [esi + 0x1a68]
mov dword [esi + 0x1a94], eax
mov ax, word [esi + 0x1a98]
mov word [esi + 0x1a9a], ax
xor ax, ax
pop edi
pop esi
leave
ret
Function at 0x4170c1
Capabilities:
Resume thread

Disassembly:
push dword [ecx + 0x18c0]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
ret

Function at 0x41e50d
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
and dword [ebp - 4], 0
push esi
mov esi, ecx
cmp dword [esi + 4], 0xffffffff
jne 0x41e525
mov ax, 1
jmp 0x41e580
push edi
lea edi, [esi + 0x28]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi + 0xc]
test eax, eax
je 0x41e561
lea ecx, [ebp - 8]
push 0
push ecx
push eax
push dword [esi + 8]
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41e556
mov eax, dword [esi + 0xc]
cmp eax, dword [ebp - 8]
je 0x41e55d
mov dword [ebp - 4], 1
and dword [esi + 0xc], 0
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp word [0x45348c], 0
pop edi
je 0x41e57c
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov ax, word [ebp - 4]
pop esi
leave
ret

Function at 0x41e583
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
and dword [ebp - 8], 0
cmp dword [esi + 4], 0xffffffff
mov dword [ebp - 0xc], eax
jne 0x41e5a8
mov ax, 1
jmp 0x41e62f
cmp word [0x45348e], 0
je 0x41e5bb
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push edi
push dword [ebp + 8]
call fcn.0042bfb0
test eax, eax
pop ecx
mov dword [ebp - 4], eax
je 0x41e610
mov edi, dword [ebp - 4]
mov eax, 0x8000
sub eax, dword [esi + 0xc]
cmp edi, eax
jb 0x41e5dd
mov edi, eax
mov eax, dword [esi + 8]
push edi
push dword [ebp + 8]
add eax, dword [esi + 0xc]
push eax
call fcn.0042b2e0
add dword [esi + 0xc], edi
add esp, 0xc
cmp dword [esi + 0xc], 0x8000
jne 0x41e608
mov ecx, esi
call fcn.0041e50d
test ax, ax
jne 0x41e634
add dword [ebp + 8], edi
sub dword [ebp - 4], edi
jne 0x41e5cc
cmp word [0x45348c], 0
je 0x41e621
mov ecx, esi
call fcn.0041e50d
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ax, word [ebp - 8]
pop edi
pop esi
leave
ret 4
mov dword [ebp - 8], 1
jmp 0x41e621
Function at 0x41eaf2
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1000
call fcn.0042b680
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, ecx
push edi
mov edi, 0x449658
cmp dword [esi + 4], 0
mov dword [esi + 0x110], eax
jne 0x41eba8
mov ebx, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov eax, str.WilSrv32.Dll
push eax
mov dword [esi + 0x114], eax
call ebx
test eax, eax
mov dword [esi + 4], eax
jne 0x41eb58
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x41eb47
cmp eax, 0x7e
jne 0x41eb58
mov eax, str.WilServe.Dll
push eax
mov dword [esi + 0x114], eax
call ebx
mov dword [esi + 4], eax
cmp dword [esi + 4], 0
jne 0x41eb92
lea eax, [ebp - 0x1000]
push 0x1000
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00424a92
add esp, 0xc
push eax
push dword [esi + 0x114]
push str.Cant_load__s____s
push dword [ebp + 0x10]
call fcn.0042b964
add esp, 0x10
jmp 0x41ec0e
push dword [esi + 0x114]
push str.Loading__s_for_LSD
push dword [ebp + 8]
call fcn.0041e63d
add esp, 0xc
xor ebx, ebx
cmp dword [str.RegisterService], ebx
je 0x41ebd0
push dword [edi]
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [edi + 4]
mov dword [ecx], eax
mov eax, dword [edi + 4]
cmp dword [eax], ebx
je 0x41ebda
add edi, 8
cmp dword [edi], ebx
jne 0x41ebb2
xor ax, ax
pop edi
pop esi
pop ebx
leave
ret 0xc
lea eax, [ebp - 0x1000]
push 0x1000
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00424a92
add esp, 0xc
push eax
push dword [esi + 0x114]
push dword [edi]
push str.Cant_find__s_function_in__s____s
push dword [ebp + 0x10]
call fcn.0042b964
add esp, 0x14
mov ax, 1
jmp 0x41ebd3
Function at 0x41f43b
Capabilities:
Delete file
Move file

Disassembly:
mov eax, 0x1000
call fcn.0042b680
push ebp
push esi
mov esi, ecx
push edi
cmp word [esi + 0x8aa], 0
je 0x41f50e
mov eax, dword [esi + 0x3c00]
cmp eax, 0xffffffff
je 0x41f46a
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edi, [esi + 0x3746]
push edi
push str.Delete___s_
push dword [esi + 0x58]
call fcn.0041e63d
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x41f4b8
lea eax, [esp + 0xc]
push 0x1000
push eax
call ebp
push eax
call fcn.00424a92
add esp, 0xc
push eax
push str.Cant_delete_LSD_file____s
push dword [esi + 0x58]
call fcn.0041e63d
add esp, 0xc
cmp word [esi + 0x3744], 0
jne 0x41f50e
push ebx
lea ebx, [esi + 0x39a2]
push edi
push ebx
push str.Rename___s__to___s_
push dword [esi + 0x58]
call fcn.0041e63d
add esp, 0x10
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_MoveFileA]
test eax, eax
pop ebx
jne 0x41f50e
lea eax, [esp + 0xc]
push 0x1000
push eax
call ebp
push eax
call fcn.00424a92
add esp, 0xc
push eax
push str.Cant_rename_LSD_reply_file____s
push dword [esi + 0x58]
call fcn.0041e63d
add esp, 0xc
pop edi
pop esi
xor ax, ax
pop ebp
add esp, 0x1000
ret

Function at 0x42090a
Capabilities:
Get common file path

Disassembly:
push dword [esp + 4]
push 0x12c
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
jne 0x420933
push str.Failed_to_read_temporary_path
push dword [esp + 0xc]
call fcn.0042b1f0
pop ecx
mov ax, 1
pop ecx
jmp 0x420936
xor ax, ax
ret 8