Function at 0x40419d
Capabilities:
Extract resource via kernel32 functions
Get hostname
Initialize winsock library
Resolve dns
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1b8
mov word [ebp - 0x19c], 0x50
mov word [ebp - 0x19a], 0x800
mov word [ebp - 0x1a0], 0x101
lea eax, [ebp - 0x198]
push eax
mov cx, word [ebp - 0x1a0]
push ecx
call sub.WSOCK32.dll_WSAStartup
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x4041f4
push 0
push str.Upgrade_Failed:_Winsock_init_error
call fcn.00402c6a
add esp, 8
push 0
call fcn.0040588d
push 0x7f
push 0x42ef80
call sub.WSOCK32.dll_gethostname
mov dword [ebp - 8], eax
push 0x42ef80
call sub.WSOCK32.dll_gethostbyname
mov dword [ebp - 0x1ac], eax
mov dword [ebp - 0x1a8], 0
jmp 0x40422e
mov edx, dword [ebp - 0x1a8]
add edx, 1
mov dword [ebp - 0x1a8], edx
cmp dword [ebp - 0x1a8], 8
jge 0x40424a
mov eax, dword [ebp - 0x1a8]
mov dword [eax*4 + 0x42ee60], 0
jmp 0x40421f
cmp dword [ebp - 0x1ac], 0
je 0x4042e8
mov dword [ebp - 0x1a8], 0
jmp 0x404272
mov ecx, dword [ebp - 0x1a8]
add ecx, 1
mov dword [ebp - 0x1a8], ecx
cmp dword [ebp - 0x1a8], 8
jge 0x4042e8
mov edx, dword [ebp - 0x1ac]
mov eax, dword [edx + 0xc]
mov ecx, dword [ebp - 0x1a8]
cmp dword [eax + ecx*4], 0
jne 0x404292
jmp 0x4042e8
push 4
mov edx, dword [ebp - 0x1ac]
mov eax, dword [edx + 0xc]
mov ecx, dword [ebp - 0x1a8]
mov edx, dword [eax + ecx*4]
push edx
lea eax, [ebp - 0x1b0]
push eax
call fcn.00405d50
add esp, 0xc
mov ecx, dword [ebp - 0x1b0]
push ecx
call sub.WSOCK32.dll_ntohl
mov edx, dword [ebp - 0x1a8]
mov dword [edx*4 + 0x42ee60], eax
mov eax, dword [ebp - 0x1b0]
push eax
push str.Client_IP___x_n
call fcn.00402d04
add esp, 8
jmp 0x404263
mov ecx, dword [0x42ee60]
mov dword [0x40eaf8], ecx
push 0x424
push 0
push 0x42f240
call fcn.00405cf0
add esp, 0xc
call dword [sym.imp.WINMM.dll_timeGetTime]
push eax
call fcn.004059b4
add esp, 4
mov dword [ebp - 0x1b8], 8
mov dword [ebp - 0x1b4], 0x820
lea edx, [ebp - 0x1b8]
push edx
call dword [sym.imp.COMCTL32.dll_InitCommonControlsEx]
push str.SPA_FIRMWARE
push 0x70
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov dword [ebp - 0x1a4], eax
mov eax, dword [ebp - 0x1a4]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [0x42f000], eax
mov ecx, dword [ebp - 0x1a4]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 4], eax
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [0x42f220], eax
push 0x80
mov eax, dword [0x42f220]
push eax
push 0x42f020
call fcn.00405d50
add esp, 0xc
push 7
push 0x42f020
push str.spa3000
call fcn.00405c40
add esp, 0xc
test eax, eax
jne 0x4043c9
push str.SPA_3000
push 0x40ead4
call fcn.004059e0
add esp, 8
jmp 0x40448e
push 7
push 0x42f020
push str.spa2000
call fcn.00405c40
add esp, 0xc
test eax, eax
jne 0x4043f8
push str.SPA_1000_2000
push 0x40ead4
call fcn.004059e0
add esp, 8
jmp 0x40448e
push 7
push 0x42f020
push str.spa2100
call fcn.00405c40
add esp, 0xc
test eax, eax
jne 0x404424
push str.SPA_2100
push 0x40ead4
call fcn.004059e0
add esp, 8
jmp 0x40448e
push 7
push 0x42f020
push str.spa2002
call fcn.00405c40
add esp, 0xc
test eax, eax
jne 0x404450
push str.SPA_2002
push 0x40ead4
call fcn.004059e0
add esp, 8
jmp 0x40448e
push 7
push 0x42f020
push str.spa1001
call fcn.00405c40
add esp, 0xc
test eax, eax
jne 0x40447c
push str.SPA_1001
push 0x40ead4
call fcn.004059e0
add esp, 8
jmp 0x40448e
push str.ODM_Product
push 0x40ead4
call fcn.004059e0
add esp, 8
mov esp, ebp
pop ebp
ret