Function at 0x404713
Capabilities:
Hide graphical window
Receive data
Receive data on socket
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x170
mov eax, dword [ebp + 8]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0x48c]
mov dword [ebp - 0x38], edx
mov eax, dword [ebp - 0x10]
add eax, 0x80
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x24], 1
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x1c], 0
push 0
push 0x4045d8
push 0
push 0x6e
mov ecx, dword [0x40eda4]
push ecx
call dword [sym.imp.USER32.dll_CreateDialogParamA]
mov dword [0x42ee40], eax
push 1
mov edx, dword [0x42ee40]
push edx
call dword [sym.imp.USER32.dll_ShowWindow]
mov eax, dword [ebp - 0x10]
xor ecx, ecx
mov cx, word [eax + 0x49c]
shl ecx, 0x10
push ecx
push 0
push 0x401
push 0x3f2
mov edx, dword [0x42ee40]
push edx
call dword [sym.imp.USER32.dll_SendDlgItemMessageA]
lea eax, [ebp - 0x24]
push eax
push 0x8004667e
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0x48c]
push edx
call sub.WSOCK32.dll_ioctlsocket
lea eax, [ebp - 0x34]
push eax
mov ecx, dword [ebp - 0x10]
mov dx, word [ecx + 0x48a]
push edx
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x484]
push ecx
call fcn.00402d0e
add esp, 0xc
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0x498]
push eax
lea ecx, [ebp - 0x34]
push ecx
mov edx, dword [ebp - 0xc]
push edx
mov eax, dword [ebp - 0x38]
push eax
call fcn.00404518
add esp, 0x10
mov dword [ebp - 8], eax
mov ecx, 1
test ecx, ecx
je 0x404b7d
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x54], 0x10
lea edx, [ebp - 0x54]
push edx
lea eax, [ebp - 0x4c]
push eax
push 0
push 0x400
mov ecx, dword [ebp - 0xc]
push ecx
mov edx, dword [ebp - 0x38]
push edx
call sub.WSOCK32.dll_recvfrom
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jle 0x4048aa
lea eax, [ebp - 0x3c]
push eax
lea ecx, [ebp - 0x50]
push ecx
lea edx, [ebp - 0x4c]
push edx
call fcn.00402d53
add esp, 0xc
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x50]
cmp ecx, dword [eax + 0x484]
jne 0x40488e
mov edx, dword [ebp - 0x3c]
and edx, 0xffff
mov eax, dword [ebp - 0x10]
xor ecx, ecx
mov cx, word [eax + 0x48a]
cmp edx, ecx
jne 0x40488e
mov edx, dword [ebp - 0xc]
push edx
call fcn.00404d61
add esp, 4
and eax, 0xffff
mov dword [ebp - 0x5c], eax
jmp 0x4048a8
mov eax, dword [ebp - 0x3c]
and eax, 0xffff
push eax
mov ecx, dword [ebp - 0x50]
push ecx
push str.Unknown_source_request_in_session:__x:_u
call fcn.00402d04
add esp, 0xc
jmp 0x4048d9
push 1
push 0
push 0
mov edx, dword [0x42ee40]
push edx
lea eax, [ebp - 0x78]
push eax
call dword [sym.imp.USER32.dll_PeekMessageA]
test eax, eax
je 0x4048d9
lea ecx, [ebp - 0x78]
push ecx
call dword [sym.imp.USER32.dll_TranslateMessage]
lea edx, [ebp - 0x78]
push edx
call dword [sym.imp.USER32.dll_DispatchMessageA]
cmp dword [ebp - 0x5c], 4
jne 0x404aa0
mov eax, dword [ebp - 0xc]
add eax, 2
push eax
call fcn.00404d61
add esp, 4
and eax, 0xffff
mov dword [ebp - 0x58], eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x58]
cmp edx, dword [ecx + 0x494]
jne 0x404a9b
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x1c], 0
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x494]
add ecx, 1
mov edx, dword [ebp - 0x10]
mov dword [edx + 0x494], ecx
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x4a0]
mov edx, dword [ebp - 0x10]
add ecx, dword [edx + 0x4a8]
mov eax, dword [ebp - 0x10]
mov dword [eax + 0x4a0], ecx
push 0
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0x494]
push edx
push 0x402
push 0x3f2
mov eax, dword [0x42ee40]
push eax
call dword [sym.imp.USER32.dll_SendDlgItemMessageA]
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0x498]
push edx
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x4a0]
push ecx
push 0x42f680
push str.Uploading_Firmware_to_SPA__s__d__d_Bytes
lea edx, [ebp - 0xf8]
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x14
lea eax, [ebp - 0xf8]
push eax
mov ecx, dword [0x42ee40]
push ecx
call dword [sym.imp.USER32.dll_SetWindowTextA]
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x10]
mov ecx, dword [edx + 0x494]
cmp ecx, dword [eax + 0x49c]
ja 0x404a79
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x10]
mov ecx, dword [edx + 0x494]
cmp ecx, dword [eax + 0x49c]
jne 0x4049eb
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0x4a4]
mov dword [ebp - 0x170], eax
jmp 0x4049f5
mov dword [ebp - 0x170], 0x200
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x170]
mov dword [ecx + 0x4a8], edx
mov eax, dword [ebp - 0x10]
cmp dword [eax + 0x494], 1
jne 0x404a1b
mov ecx, dword [0x42f220]
mov dword [ebp - 0x18], ecx
jmp 0x404a27
mov edx, dword [ebp - 0x18]
add edx, 0x200
mov dword [ebp - 0x18], edx
lea eax, [ebp - 0x34]
push eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0x494]
push edx
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x4a8]
push ecx
mov edx, dword [ebp - 0x18]
push edx
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp - 0x38]
push ecx
call fcn.004044a0
add esp, 0x18
mov dword [ebp - 8], eax
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0x4a8]
push eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0x494]
push edx
push str.Send_block__d___d__n
call fcn.00402d04
add esp, 0xc
jmp 0x404a9b
push str.All_blocks_ackd_n
call fcn.00402d04
add esp, 4
mov eax, dword [ebp - 0x38]
push eax
call sub.WSOCK32.dll_closesocket
mov dword [ebp - 0x20], 0
jmp 0x404b7d
jmp 0x404b78
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [ebp - 0x14]
add ecx, 1
mov dword [ebp - 0x14], ecx
cmp dword [ebp - 0x14], 0x64
jne 0x404b78
mov edx, dword [ebp - 0x1c]
add edx, 1
mov dword [ebp - 0x1c], edx
cmp dword [ebp - 0x1c], 0x1e
jge 0x404b52
mov eax, dword [ebp - 0x10]
cmp dword [eax + 0x494], 0
jne 0x404b0a
push str.ReSend_option_ack_n
call fcn.00402d04
add esp, 4
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0x498]
push edx
lea eax, [ebp - 0x34]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
mov edx, dword [ebp - 0x38]
push edx
call fcn.00404518
add esp, 0x10
mov dword [ebp - 8], eax
jmp 0x404b50
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x494]
push ecx
push str.ReSend_block__d_n
call fcn.00402d04
add esp, 8
lea edx, [ebp - 0x34]
push edx
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x494]
push ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0x4a8]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
mov edx, dword [ebp - 0xc]
push edx
mov eax, dword [ebp - 0x38]
push eax
call fcn.004044a0
add esp, 0x18
mov dword [ebp - 8], eax
jmp 0x404b71
push str.Timeout_for_ack__upgrade_failed_n
call fcn.00402d04
add esp, 4
mov ecx, dword [ebp - 0x38]
push ecx
call sub.WSOCK32.dll_closesocket
mov dword [ebp - 0x20], 1
jmp 0x404b7d
mov dword [ebp - 0x14], 0
jmp 0x4047fd
call dword [sym.imp.WINMM.dll_timeGetTime]
shr eax, 5
mov dword [ebp - 4], eax
push 0x61a0000
push 0
push 0x401
push 0x3f2
mov edx, dword [0x42ee40]
push edx
call dword [sym.imp.USER32.dll_SendDlgItemMessageA]
push 0
push 0
push 0x402
push 0x3f2
mov eax, dword [0x42ee40]
push eax
call dword [sym.imp.USER32.dll_SendDlgItemMessageA]
push 0x42f680
push str.Updating_Firmware_to_SPA__s
lea ecx, [ebp - 0x148]
push ecx
call fcn.00405962
add esp, 0xc
lea edx, [ebp - 0x148]
push edx
mov eax, dword [0x42ee40]
push eax
call dword [sym.imp.USER32.dll_SetWindowTextA]
mov ecx, 1
test ecx, ecx
je 0x404cb9
call dword [sym.imp.WINMM.dll_timeGetTime]
shr eax, 5
mov dword [ebp - 0x14c], eax
mov edx, dword [ebp - 0x14c]
cmp edx, dword [ebp - 4]
jae 0x404c25
mov eax, dword [ebp - 0x14c]
add eax, 0x8000000
mov dword [ebp - 0x14c], eax
mov ecx, dword [ebp - 0x14c]
sub ecx, dword [ebp - 4]
mov dword [ebp - 0x16c], ecx
push 0
mov edx, dword [ebp - 0x16c]
push edx
push 0x402
push 0x3f2
mov eax, dword [0x42ee40]
push eax
call dword [sym.imp.USER32.dll_SendDlgItemMessageA]
mov ecx, 1
test ecx, ecx
je 0x404c9a
push 1
push 0
push 0
mov edx, dword [0x42ee40]
push edx
lea eax, [ebp - 0x168]
push eax
call dword [sym.imp.USER32.dll_PeekMessageA]
test eax, eax
je 0x404c96
lea ecx, [ebp - 0x168]
push ecx
call dword [sym.imp.USER32.dll_TranslateMessage]
lea edx, [ebp - 0x168]
push edx
call dword [sym.imp.USER32.dll_DispatchMessageA]
jmp 0x404c98
jmp 0x404c9a
jmp 0x404c53
mov eax, dword [ebp - 4]
add eax, 0x61a
cmp dword [ebp - 0x14c], eax
jb 0x404cac
jmp 0x404cb9
push 0x20
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x404bed
mov ecx, dword [0x42ee40]
push ecx
call dword [sym.imp.USER32.dll_DestroyWindow]
cmp dword [ebp - 0x20], 0
jne 0x404d3b
push 0x1ffff
push 0x40ee40
push str._admin_advanced
push 0x50
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0x484]
push eax
push 0x5ba0
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0x480]
push edx
mov eax, dword [0x40eda4]
push eax
call fcn.00403e0d
add esp, 0x20
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jle 0x404d2a
push 0
push 0x404647
push 0
push 0x6f
mov ecx, dword [0x40eda4]
push ecx
call dword [sym.imp.USER32.dll_DialogBoxParamA]
mov dword [ebp - 8], eax
jmp 0x404d39
push 0
push str.Upgrade_Failed:_SPA_not_responding_after_firmware_upload
call fcn.00402c6a
add esp, 8
jmp 0x404d4a
push 0
push str.Upgrade_Failed:_Firmware_Upload_Incomplete
call fcn.00402c6a
add esp, 8
mov edx, dword [ebp - 0x10]
push edx
call fcn.00406085
add esp, 4
push 0
call fcn.0040588d
mov esp, ebp
pop ebp
ret