Function at 0x40b5d0
Capabilities:
Hash data using sha256
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x81c
mov eax, dword [0x4383f4]
xor eax, ebp
mov dword [ebp - 4], eax
cmp byte [0x23b653a], 0
push ebx
push esi
mov esi, 5
push edi
mov dword [ebp - 0x818], 0x27dc8a0
mov dword [ebp - 0x80c], 0
mov dword [ebp - 0x814], esi
je 0x40b61e
mov dword [ebp - 0x814], 4
mov esi, dword [ebp - 0x814]
mov ebx, dword [ebp + 8]
cmp ebx, 0x100000
jbe 0x40b64f
push 0x100000
push ebx
push str.In_WritePort_and_length__d_bytes_is_greater_than_buffer_size_of__d_bytes
push 0x1604
push str.WritePort
push 2
call fcn.004016a0
add esp, 0x18
push 1
call fcn.00401c50
cmp byte [0x23b5c0a], 0
je 0x40b71e
xor eax, eax
cmp eax, 0x3b1d240
je 0x40b695
push 0x8c
push eax
push 0x3b1d240
call fcn.0041e920
add esp, 0xc
mov ecx, 8
mov esi, 0x42ce60
mov edi, 0x3b1d248
xor eax, eax
rep movsd dword es:[edi], dword [esi]
mov dword [0x3b1d240], eax
mov dword [0x3b1d244], eax
test ebx, ebx
je 0x40b6b2
push 0x3b1d288
push 0x3b1d240
mov eax, ebx
mov ecx, 0x27dc8a0
call fcn.00418a70
add esp, 8
mov esi, 0x3b1d288
mov ebx, 0x3b1d240
call fcn.00418b70
push esi
mov eax, 0x23b64a4
mov ecx, ebx
call fcn.00418c50
add esp, 4
xor edi, edi
xor esi, esi
jmp 0x40b6e0
movzx ecx, byte [edi + 0x23b64a4]
push ecx
mov edx, 0x100000
push 0x43182c
sub edx, esi
push edx
lea eax, [esi + 0x259c7e0]
push eax
call fcn.0041acb0
add esi, 2
add esp, 0x10
inc edi
cmp esi, 0x40
jl 0x40b6e0
mov ebx, dword [ebp + 8]
mov esi, dword [ebp - 0x814]
mov byte [edi*2 + 0x259c7e0], 0
cmp byte [0x23b642a], 0
je 0x40b7cc
push 0
push 0x800
push 0
push ebx
lea edx, [ebp - 0x808]
call fcn.00415a20
add esp, 0x10
cmp byte [0x23b5c0a], 0
jne 0x40b78b
mov edx, dword [0x23b6484]
mov eax, dword [0x23b6480]
lea ecx, [ebp - 0x808]
push ecx
mov ecx, dword [0x23b647c]
push edx
mov edx, dword [0x23b6478]
push eax
push ecx
push edx
push str.CHANNEL_DATA__P_.4lld___H_.5lld____s____HOST_TO_TARGET____
push 0x1619
push str.WritePort
push esi
call fcn.004016a0
add esp, 0x24
jmp 0x40b848
mov ecx, dword [0x23b6484]
mov edx, dword [0x23b6480]
push 0x259c7e0
lea eax, [ebp - 0x808]
push eax
mov eax, dword [0x23b647c]
push ecx
mov ecx, dword [0x23b6478]
push edx
push eax
push ecx
push str.CHANNEL_DATA__P_.4lld___H_.5lld____s____HOST_TO_TARGET_____SHA256_DIGEST:__s
push 0x161b
push str.WritePort
push esi
call fcn.004016a0
add esp, 0x28
jmp 0x40b848
cmp byte [0x23b5c0a], 0
push 0x27dc8a0
jne 0x40b810
mov edx, dword [0x23b6484]
mov eax, dword [0x23b6480]
mov ecx, dword [0x23b647c]
push ebx
push edx
mov edx, dword [0x23b6478]
push eax
push ecx
push edx
push str.CHANNEL_DATA__P_.4lld___H_.5lld____7d_bytes____HOST_TO_TARGET_____n_n_s_n_n
push 0x1624
push str.WritePort
push esi
call fcn.004016a0
add esp, 0x28
jmp 0x40b848
mov eax, dword [0x23b6484]
mov ecx, dword [0x23b6480]
mov edx, dword [0x23b647c]
push 0x259c7e0
push ebx
push eax
mov eax, dword [0x23b6478]
push ecx
push edx
push eax
push str.CHANNEL_DATA__P_.4lld___H_.5lld____7d_bytes____HOST_TO_TARGET_____SHA256_DIGEST:__s_n_n_s_n_n
push 0x162a
push str.WritePort
push esi
call fcn.004016a0
add esp, 0x2c
cmp byte [0x23b64a2], 1
jne 0x40b858
mov ecx, 0x1630
jmp 0x40b86c
cmp byte [ebp + 0xc], 0
jne 0x40b87f
cmp byte [0x4393d2], 5
jb 0x40b87f
mov ecx, 0x1632
push str.WritePort
push ebx
push 0x27dc8a0
call fcn.0040bfe0
add esp, 0xc
mov al, byte [0x23b653a]
cmp al, 2
jne 0x40b890
cmp byte [ebp + 0xc], 1
je 0x40b89a
jmp 0x40b8e4
cmp al, 1
jne 0x40b8e4
cmp byte [ebp + 0xc], 0
jne 0x40b8e4
push ebx
push str._nINTERACTIVE_Press_any_key_to_SEND_the_above__d_bytes__q_to_quit_interactive_:
call fcn.0041af1f
add esp, 8
call fcn.0041bffe
push 2
push 0
push 0
mov byte [ebp - 0x80d], al
call fcn.0041a706
push eax
call fcn.0041aa2a
add esp, 0x10
cmp byte [ebp - 0x80d], 0x71
jne 0x40b8d7
mov byte [0x23b653a], 0
push 0x430c98
call fcn.0041af1f
add esp, 4
cmp byte [0x23b6538], 0
je 0x40b91b
mov eax, ebx
mov dword [ebp - 0x80c], eax
test eax, eax
jne 0x40b9a1
push str.WriteFile_failed__reported_0_bytes_written
push 0x1679
push str.WritePort
push 2
call fcn.004016a0
add esp, 0x10
jmp 0x40b648
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
xor esi, esi
mov edx, dword [ebp - 0x818]
mov eax, dword [0x23b6504]
push 0
lea ecx, [ebp - 0x80c]
push ecx
push ebx
push edx
push eax
call edi
test eax, eax
mov eax, dword [ebp - 0x80c]
jne 0x40b94c
add dword [ebp - 0x818], eax
cmp eax, ebx
jae 0x40b977
push 0x64
lea ecx, [esi + 1]
push ecx
push ebx
push eax
push str.Only__d_bytes_written_of__d_requested__attempt__d_of__d
push 0x1666
push str.WritePort
push 5
call fcn.004016a0
mov eax, dword [ebp - 0x80c]
add esp, 0x20
sub ebx, eax
je 0x40b983
inc esi
cmp esi, 0x64
jb 0x40b923
jmp 0x40b98c
cmp esi, 0x64
jb 0x40b8f5
push esi
push 0x2458f80
push str.Could_not_write_to__s__Windows_API_WriteFile_failed__Your_device_is_probably_not_on_this_port__attempted__d_times
push 0x1672
jmp 0x40b639
cmp byte [0x23b653c], 0
je 0x40bcc1
xor edx, edx
cmp edx, 0x3b1d240
je 0x40b9ea
push 0x8c
xor ebx, ebx
push ebx
push 0x3b1d240
call fcn.0041e920
mov ecx, 8
mov esi, 0x42ce60
mov edi, 0x3b1d248
rep movsd dword es:[edi], dword [esi]
add esp, 0xc
mov dword [0x3b1d240], ebx
mov dword [0x3b1d244], ebx
mov eax, dword [ebp - 0x80c]
push 0x3b1d288
push 0x3b1d240
mov ecx, 0x27dc8a0
call fcn.00418a70
mov esi, 0x3b1d288
mov ebx, 0x3b1d240
call fcn.00418b70
push esi
mov eax, 0x23b64a4
mov ecx, ebx
call fcn.00418c50
xor ebx, ebx
add esp, 0xc
cmp byte [ebp + 0xc], bl
jne 0x40ba53
push ebx
push 0x100000
push ebx
push 0x100000
push ebx
push 0x80
push ebx
push 0x30
push ebx
push ebx
push 0x27dc8a0
push 0x259c7e0
call fcn.0040c2f0
add esp, 0x30
mov eax, 0x259c7e0
lea edx, [eax + 1]
jmp 0x40ba60
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40ba60
sub eax, edx
cmp eax, 0x80
jae 0x40ba89
mov edx, 0x80
sub edx, eax
push edx
lea ecx, [eax + 0x259c7e0]
push 0x20
push ecx
call fcn.0041e920
add esp, 0xc
mov eax, 0x259c7e0
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40ba91
sub eax, edx
mov ecx, 0xffff7
sub ecx, eax
cmp ecx, 6
jb 0x40bac6
mov edx, dword [str._____]
mov cx, word [0x431cb0]
mov dword [eax + 0x259c7e0], edx
mov word [eax + 0x259c7e4], cx
mov byte [eax + 0x259c7e6], bl
mov edi, 0x259c7e0
lea ecx, [edi + 1]
mov edi, edi
mov al, byte [edi]
inc edi
cmp al, bl
jne 0x40bad0
sub edi, ecx
lea edx, [edi + 0x40]
cmp edx, 0x100000
jg 0x40bb26
xor esi, esi
jmp 0x40baf0
movzx eax, byte [esi + 0x23b64a4]
mov ecx, 0x80000
sub ecx, esi
push eax
add ecx, ecx
push 0x43182c
sub ecx, edi
push ecx
lea edx, [edi + esi*2 + 0x259c7e0]
push edx
call fcn.0041acb0
inc esi
add esp, 0x10
cmp esi, 0x20
jl 0x40baf0
mov byte [edi + esi*2 + 0x259c7e0], bl
mov eax, 0x259c7e0
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40bb30
xor edi, edi
sub eax, edx
cmp edi, ebx
jg 0x40bb86
jl 0x40bb48
cmp eax, 0x100000
ja 0x40bb86
xor ecx, ecx
xor esi, esi
cmp edi, ebx
jl 0x40bb86
jg 0x40bb60
cmp eax, ebx
jbe 0x40bb86
jmp 0x40bb60
mov dl, byte [ecx + 0x259c7e0]
cmp dl, 0xa
je 0x40bb70
cmp dl, 0xd
jne 0x40bb77
mov byte [ecx + 0x259c7e0], 0x20
add ecx, 1
adc esi, ebx
cmp esi, edi
jl 0x40bb60
jg 0x40bb86
cmp ecx, eax
jb 0x40bb60
cmp byte [0x23b5c0b], bl
je 0x40bc78
mov eax, str.command_trace.txt
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40bba0
sub eax, edx
push eax
mov edx, 0x431cb4
mov ecx, str.command_trace.txt
call fcn.00412100
mov ecx, dword [0x23b6498]
mov edx, dword [0x23b649c]
mov esi, dword [0x23b6480]
add esp, 4
mov edi, 1
sub ecx, edi
sbb edx, ebx
cmp esi, ecx
mov ecx, dword [0x23b6484]
mov dword [0x23b6458], eax
jne 0x40bc3d
cmp ecx, edx
jne 0x40bc3d
mov edx, dword [0x473e60]
push edx
mov edx, dword [0x3b1d2f8]
push edx
mov edx, dword [0x23b6478]
push ecx
mov ecx, dword [0x23b647c]
push esi
push ecx
push edx
push str._P_.4lld___H_.5lld____7d_bytes____________________NEW_HASH_TABLE_SENT_HERE___3i_______________________XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX_n
push eax
call fcn.0041b316
add dword [0x473e60], edi
mov eax, dword [0x23b6458]
add esp, 0x20
add dword [0x23b6478], edi
adc dword [0x23b647c], ebx
xor esi, esi
xor ecx, ecx
mov dword [0x23b6480], esi
mov dword [0x23b6484], ecx
mov edx, dword [ebp - 0x80c]
push 0x259c7e0
push edx
mov edx, dword [0x23b6478]
push ecx
mov ecx, dword [0x23b647c]
push esi
push ecx
push edx
push str._P_.4lld___H_.5lld____7d_bytes___s_n
push eax
call fcn.0041b316
mov eax, dword [0x23b6458]
push eax
call fcn.0041bc41
add esp, 0x24
mov dword [0x23b6458], ebx
cmp byte [0x23b653c], bl
je 0x40bcc1
push 0x10
mov edx, 0x431d84
mov ecx, str.DIGEST_TABLE.bin
call fcn.00412100
add esp, 4
mov dword [0x23b645c], eax
cmp eax, ebx
je 0x40bcc1
push eax
push 1
push 0x20
push 0x23b64a4
call fcn.0041b579
mov ecx, dword [0x23b645c]
push ecx
call fcn.0041bc41
add esp, 0x14
mov dword [0x23b645c], ebx
mov eax, 1
add dword [0x23b6478], eax
mov ecx, 0
pop edi
adc dword [0x23b647c], ecx
add dword [0x23b6480], eax
mov eax, dword [ebp - 0x80c]
pop esi
adc dword [0x23b6484], ecx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.00418d55
mov esp, ebp
pop ebp
ret