Function at 0x4092d6
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x814
mov eax, dword [0x4363f0]
xor eax, esp
mov dword [esp + 0x810], eax
cmp byte [0x449484], 0
mov eax, 4
push ebx
push esi
push edi
mov ebx, 5
mov dword [esp + 0xc], 0
mov edi, edx
cmovne ebx, eax
mov dword [esp + 0x14], ebx
mov esi, 0x2a95300
mov dword [esp + 0x10], esi
cmp edi, 0x100000
ja 0x409321
mov al, byte [0x4494be]
test al, al
je 0x408e15
xor eax, eax
cmp eax, 0x2784740
je 0x408d81
push 0x8c
push eax
push 0x2784740
call fcn.00418cc0
movdqu xmm0, xmmword [0x434834]
add esp, 0xc
mov dword [0x2784740], 0
mov dword [0x2784744], 0
movdqu xmmword [0x2784748], xmm0
movdqu xmm0, xmmword [0x434844]
movdqu xmmword [0x2784758], xmm0
test edi, edi
je 0x408d9d
push edi
push 0x2a95300
mov edx, 0x2784788
mov ecx, 0x2784740
call fcn.004023a0
add esp, 8
mov edx, 0x2784788
mov ecx, 0x2784740
call fcn.004024b0
push 0x4494c0
mov edx, 0x2784788
mov ecx, 0x2784740
call fcn.004025a0
add esp, 4
mov esi, 0x2d8f3c0
xor ebx, ebx
lea ebx, [ebx]
movzx eax, byte [ebx + 0x4494c0]
push eax
push 0x42f954
push esi
call fcn.00413ba6
add esi, 2
add esp, 0xc
inc ebx
cmp esi, 0x2d8f400
jl 0x408dd0
add ebx, ebx
cmp ebx, 0x100000
jae 0x40934a
mov al, byte [0x4494be]
mov esi, 0x2a95300
mov byte [ebx + 0x2d8f3c0], 0
mov ebx, dword [esp + 0x14]
cmp byte [0x448c0b], 0
je 0x408e93
sub esp, 8
lea ecx, [esp + 0x20]
push 0
push edi
call fcn.004119b0
add esp, 0x10
lea eax, [esp + 0x18]
cmp byte [0x4494be], 0
jne 0x408e67
push eax
push dword [0x449440]
push dword [0x449480]
push str.CHANNEL_DATA__P_.4ld___H_.5ld____s____HOST_TO_TARGET____
push 0xf2b
push str.WritePort
push ebx
call fcn.004011c0
add esp, 0x1c
jmp 0x408eed
push 0x2d8f3c0
push eax
push dword [0x449440]
push dword [0x449480]
push str.CHANNEL_DATA__P_.4ld___H_.5ld____s____HOST_TO_TARGET_____SHA256_DIGEST:__s
push 0xf2d
push str.WritePort
push ebx
call fcn.004011c0
add esp, 0x20
jmp 0x408eed
push 0x2a95300
test al, al
jne 0x408ec3
push edi
push dword [0x449440]
push dword [0x449480]
push str.CHANNEL_DATA__P_.4ld___H_.5ld____7d_bytes____HOST_TO_TARGET_____n_n_s_n_n
push 0xf36
push str.WritePort
push ebx
call fcn.004011c0
add esp, 0x20
jmp 0x408eed
push 0x2d8f3c0
push edi
push dword [0x449440]
push dword [0x449480]
push str.CHANNEL_DATA__P_.4ld___H_.5ld____7d_bytes____HOST_TO_TARGET_____SHA256_DIGEST:__s_n_n_s_n_n
push 0xf3c
push str.WritePort
push ebx
call fcn.004011c0
add esp, 0x24
cmp byte [0x448c0a], 1
jne 0x408efd
push 0xf42
jmp 0x408f12
mov cl, byte [ebp + 0xc]
test cl, cl
jne 0x408f2a
cmp byte [0x44621f], 5
jb 0x408f2a
push 0xf44
push str.WritePort
push ecx
mov edx, edi
mov ecx, 0x2a95300
call fcn.00409680
mov cl, byte [ebp + 0xc]
add esp, 0xc
mov al, byte [0x449484]
cmp al, 2
jne 0x408f3a
cmp cl, 1
je 0x408f42
jmp 0x408f8b
cmp al, 1
jne 0x408f8b
test cl, cl
jne 0x408f8b
push edi
push str._nINTERACTIVE_Press_any_key_to_SEND_the_above__d_bytes__q_to_quit_interactive_:
call fcn.00414c52
add esp, 8
call fcn.0041648f
push 2
push 0
mov bl, al
call fcn.0041478d
push eax
call fcn.00415e23
movzx ecx, byte [0x449484]
xor eax, eax
add esp, 0xc
cmp bl, 0x71
cmove ecx, eax
mov byte [0x449484], cl
push 0x42edc0
call fcn.00414c52
add esp, 4
cmp byte [0x448c26], 0
je 0x408fa3
mov esi, edi
mov dword [esp + 0xc], esi
test esi, esi
jne 0x40900c
jmp 0x40934f
xor ebx, ebx
push 0
lea eax, [esp + 0x10]
push eax
push edi
push esi
push dword [0x4494f4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov esi, dword [esp + 0xc]
test eax, eax
jne 0x408fc6
add dword [esp + 0x10], esi
cmp esi, edi
jae 0x408fef
push 0x64
lea eax, [ebx + 1]
push eax
push edi
push esi
push str.Only__d_bytes_written_of__d_requested__attempt__d_of__d
push 0xf78
push str.WritePort
push 5
call fcn.004011c0
mov esi, dword [esp + 0x2c]
add esp, 0x20
sub edi, esi
je 0x409002
mov esi, dword [esp + 0x10]
inc ebx
cmp ebx, 0x64
jb 0x408fa5
jmp 0x409372
cmp ebx, 0x64
jb 0x408f9a
jmp 0x409372
cmp byte [0x4494bd], 0
je 0x4092fe
xor eax, eax
cmp eax, 0x2784740
je 0x409069
push 0x8c
push eax
push 0x2784740
call fcn.00418cc0
movdqu xmm0, xmmword [0x434834]
add esp, 0xc
mov dword [0x2784740], 0
mov dword [0x2784744], 0
movdqu xmmword [0x2784748], xmm0
movdqu xmm0, xmmword [0x434844]
movdqu xmmword [0x2784758], xmm0
push esi
push 0x2a95300
mov edx, 0x2784788
mov ecx, 0x2784740
call fcn.004023a0
mov edx, 0x2784788
mov ecx, 0x2784740
call fcn.004024b0
push 0x4494c0
mov edx, 0x2784788
mov ecx, 0x2784740
call fcn.004025a0
add esp, 0xc
cmp byte [ebp + 0xc], 0
jne 0x4090cf
push 0x100000
push 0x100000
push 0x80
push 0x30
push 0
mov edx, 0x2a95300
mov ecx, 0x2d8f3c0
call fcn.00409950
add esp, 0x14
mov edx, 0x2d8f3c0
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x4090d7
sub edx, ecx
cmp edx, 0x80
jae 0x409108
mov ecx, 0x80
lea edi, [edx + 0x2d8f3c0]
sub ecx, edx
mov eax, 0x20202020
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, 0x2d8f3c0
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x409110
sub ecx, edx
mov eax, 0xffff7
sub eax, ecx
cmp eax, 6
jb 0x409144
mov eax, dword [str._____]
mov dword [ecx + 0x2d8f3c0], eax
mov ax, word [0x42fdd0]
mov word [ecx + 0x2d8f3c4], ax
mov byte [ecx + 0x2d8f3c6], 0
mov edi, 0x2d8f3c0
lea ecx, [edi + 1]
lea esp, [esp]
mov al, byte [edi]
inc edi
test al, al
jne 0x409150
sub edi, ecx
lea eax, [edi + 0x40]
cmp eax, 0x100000
jg 0x4091aa
xor esi, esi
jmp 0x409170
movzx eax, byte [esi + 0x4494c0]
push eax
lea eax, [esi*2 + 0x2d8f3c0]
add eax, edi
push 0x42f954
push eax
call fcn.00413ba6
inc esi
add esp, 0xc
cmp esi, 0x20
jl 0x409170
lea eax, [edi + esi*2]
cmp eax, 0x100000
jae 0x40934a
mov byte [eax + 0x2d8f3c0], 0
mov ecx, 0x2d8f3c0
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4091b2
sub ecx, edx
cmp ecx, 0x100000
ja 0x4091ec
xor eax, eax
test ecx, ecx
je 0x4091ec
lea esp, [esp]
mov dl, byte [eax + 0x2d8f3c0]
cmp dl, 0xa
je 0x4091e0
cmp dl, 0xd
jne 0x4091e7
mov byte [eax + 0x2d8f3c0], 0x20
inc eax
cmp eax, ecx
jb 0x4091d0
cmp byte [0x448c39], 0
je 0x4092aa
mov edx, str.command_trace.txt
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x409201
sub edx, ecx
mov ecx, str.command_trace.txt
push 0x42fdd4
call fcn.0040eb90
mov ecx, dword [0x448c2c]
add esp, 4
mov edx, dword [0x449440]
dec ecx
mov esi, eax
mov dword [0x4494e8], esi
cmp edx, ecx
jne 0x409277
push dword [0x4372fc]
push dword [0x2681ecc]
push edx
push dword [0x449480]
push str._P_.4ld___H_.5ld____7d_bytes____________________NEW_HASH_TABLE_SENT_HERE___3i_______________________XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX_n
push esi
call fcn.0041504b
mov eax, dword [0x449480]
add esp, 0x18
inc dword [0x4372fc]
inc eax
mov esi, dword [0x4494e8]
xor edx, edx
mov dword [0x449480], eax
mov dword [0x449440], edx
jmp 0x40927c
mov eax, dword [0x449480]
push 0x2d8f3c0
push dword [esp + 0x10]
push edx
push eax
push str._P_.4ld___H_.5ld____7d_bytes___s_n
push esi
call fcn.0041504b
push dword [0x4494e8]
call fcn.00415fc1
add esp, 0x1c
mov dword [0x4494e8], 0
cmp byte [0x4494bd], 0
je 0x4092fa
push 0x42fea4
mov edx, 0x10
mov ecx, str.DIGEST_TABLE.bin
call fcn.0040eb90
add esp, 4
mov dword [0x448c30], eax
test eax, eax
je 0x4092fa
push eax
push 1
push 0x20
push 0x4494c0
call fcn.004154ca
push dword [0x448c30]
call fcn.00415fc1
add esp, 0x14
mov dword [0x448c30], 0
mov esi, dword [esp + 0xc]
mov ecx, dword [esp + 0x81c]
mov eax, esi
inc dword [0x449480]
inc dword [0x449440]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00413b97
mov esp, ebp
pop ebp
ret
push 0x100000
push edi
push str.In_WritePort_and_length__d_bytes_is_greater_than_buffer_size_of__d_bytes
push 0xf16
push str.WritePort
push 1
call fcn.004011c0
add esp, 0x18
mov ecx, 1
call fcn.004016b0
call fcn.00415295
push str.WriteFile_failed__reported_0_bytes_written
push 0xf8b
push str.WritePort
push 1
call fcn.004011c0
add esp, 0x10
mov ecx, 1
call fcn.004016b0
push ebx
push 0x50cc420
push str.Could_not_write_to__s__Windows_API_WriteFile_failed__Your_device_is_probably_not_on_this_port__attempted__d_times
push 0xf84
push str.WritePort
push 1
call fcn.004011c0
add esp, 0x18
mov ecx, 1
call fcn.004016b0
int3