Function at 0x497b20
Capabilities:
Initialize winsock library
Resolve dns

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e725b
mov eax, dword fs:[0]
push eax
sub esp, 0x2c8
mov eax, dword [0x53d9f8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 0xc]
lea eax, [ebp - 0x110]
mov edi, dword [ebp + 8]
push 0x100
push 0
push eax
mov dword [ebp - 0x2cc], ebx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
test edi, edi
je 0x497bd3
mov ecx, edi
lea edx, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x497b80
sub ecx, edx
sar ecx, 1
inc ecx
cmp ecx, 0x3fffffff
jg 0x497bd3
lea ebx, [ecx + ecx]
mov eax, ebx
call fcn.004bf6c0
mov esi, esp
test esi, esi
je 0x497bcd
push 0
push 0
push ebx
push esi
push 0xffffffffffffffff
push edi
push 0
push 3
mov byte [esi], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ebx, dword [ebp - 0x2cc]
xor ecx, ecx
test eax, eax
cmove esi, ecx
jmp 0x497bd5
mov ebx, dword [ebp - 0x2cc]
xor esi, esi
push esi
lea eax, [ebp - 0x110]
push 0x100
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcpy_s]
add esp, 0xc
lea eax, [ebp - 0x2b8]
push eax
push 0x101
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x497c23
push str.wsastartup___failed__
push str.KHostNameToIpGetter::_getIpListFromHostName
push 0x45
push str.H:_rc_v12_i18n_20231201_branchCoding_supportwpsupdateUpdateClient_srcweb_khostnametoipgetter.h
push 9
call fcn.00412750
add esp, 0x14
xor eax, eax
jmp 0x497e3d
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov edi, eax
mov dword [ebp - 0x2d4], edi
test edi, edi
jne 0x497c4a
push str.gethostbyname___error__
push str.KHostNameToIpGetter::_getIpListFromHostName
push 0x4c
jmp 0x497c0d
movsx eax, word [edi + 0xa]
push eax
movsx eax, word [edi + 8]
push eax
push dword [edi + 4]
push dword [edi]
push str.name:_s_nalianses:_s_naddrtype:_d_nlength:_d
push str.KHostNameToIpGetter::_getIpListFromHostName
push 0x50
push str.H:_rc_v12_i18n_20231201_branchCoding_supportwpsupdateUpdateClient_srcweb_khostnametoipgetter.h
push 9
call fcn.00412750
mov ecx, dword [edi + 0xc]
add esp, 0x24
mov dword [ebp - 0x2d0], 0
cmp dword [ecx], 0
je 0x497e21
xor edx, edx
movsx eax, word [edi + 0xa]
mov esi, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo]
mov ebx, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ecx, dword [edx + ecx]
test eax, eax
je 0x497ce6
test ecx, ecx
je 0x497cbf
cmp eax, 4
ja 0x497cbf
push eax
push ecx
lea eax, [ebp - 0x2c4]
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
jmp 0x497ce6
mov dword [ebp - 0x2c4], 0
test ecx, ecx
jne 0x497cd7
call ebx
mov dword [eax], 0x16
jmp 0x497ce4
cmp eax, 4
jbe 0x497ce6
call ebx
mov dword [eax], 0x22
call esi
push dword [ebp - 0x2c4]
call dword [sym.imp.WS2_32.dll_inet_ntoa]
mov ebx, eax
test ebx, ebx
jne 0x497cfc
xor esi, esi
jmp 0x497d47
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x497d01
sub ecx, edx
lea edi, [ecx + 1]
cmp edi, 0x3fffffff
jg 0x497d3f
lea eax, [edi + edi]
call fcn.004bf6c0
mov esi, esp
test esi, esi
je 0x497d3f
push edi
push esi
push 0xffffffffffffffff
xor eax, eax
push ebx
push eax
push 3
mov word [esi], ax
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
xor ecx, ecx
test eax, eax
cmove esi, ecx
jmp 0x497d41
xor esi, esi
mov edi, dword [ebp - 0x2d4]
mov ecx, esi
mov dword [ebp - 0x118], 0
xor eax, eax
mov dword [ebp - 0x114], 7
mov word [ebp - 0x128], ax
lea edx, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x497d70
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x128]
call fcn.004033b0
mov ebx, dword [ebp - 0x2cc]
lea ecx, [ebp - 0x128]
mov dword [ebp - 4], 0
push ecx
mov eax, dword [ebx + 4]
cmp eax, dword [ebx + 8]
je 0x497db5
mov ecx, eax
call fcn.00413820
add dword [ebx + 4], 0x18
jmp 0x497dbd
push eax
mov ecx, ebx
call fcn.0040e830
mov edx, dword [ebp - 0x114]
mov dword [ebp - 4], 0xffffffff
cmp edx, 8
jb 0x497e00
mov ecx, dword [ebp - 0x128]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x497df6
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x497e61
push edx
push ecx
call fcn.004bee2d
add esp, 8
mov esi, dword [ebp - 0x2d0]
mov ecx, dword [edi + 0xc]
inc esi
mov dword [ebp - 0x2d0], esi
lea edx, [esi*4]
cmp dword [edx + ecx], 0
jne 0x497c8c
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov ecx, dword [ebx + 4]
mov eax, 0x2aaaaaab
sub ecx, dword [ebx]
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
lea esp, [ebp - 0x2e4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004bee49
mov esp, ebp
pop ebp
ret 8
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3