Function at 0x522470
Capabilities:
Access peb ldr_data

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x6218a8
push eax
mov dword fs:[0], esp
sub esp, 0x24
push esi
push edi
mov edi, dword [esp + 0x3c]
mov ax, word [edi]
and eax, 0xfff
cmp eax, 0x24
jne 0x5224ae
pop edi
xor eax, eax
pop esi
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
add esp, 0x30
ret
mov esi, dword [esp + 0x40]
push esi
call fcn.00522440
add esp, 4
test eax, eax
je 0x5224f0
mov esi, 0x10030
lea eax, [esp + 8]
push ebx
push eax
call dword [sym.imp.OLEAUT32.dll_VariantClear]
lea ecx, [esp + 0xc]
push edi
push ecx
mov ebx, 1
call dword [sym.imp.OLEAUT32.dll_VariantChangeType]
test eax, eax
jge 0x522570
xor ebx, ebx
jmp 0x522876
cmp esi, 0x10031
jne 0x5224c4
mov eax, dword [esp + 0x48]
test eax, eax
je 0x522531
mov ecx, dword [esp + 0x44]
mov edx, dword [ecx]
mov esi, dword [edx]
test esi, esi
je 0x52255a
push esi
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
push edi
push esi
call dword [sym.imp.OLEAUT32.dll_VariantChangeType]
pop edi
mov eax, 1
pop esi
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
add esp, 0x30
ret
push 0x10
call fcn.005469d0
mov esi, eax
xor eax, eax
mov ecx, esi
add esp, 4
mov dword [ecx], eax
push edi
push esi
mov dword [ecx + 4], eax
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], eax
call dword [sym.imp.OLEAUT32.dll_VariantChangeType]
mov edx, dword [esp + 0x44]
mov dword [edx], esi
pop edi
mov eax, 1
pop esi
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
add esp, 0x30
ret
cmp esi, 0x80000201
ja 0x5225ce
je 0x5225c7
cmp esi, reloc.WS2_32.dll_closesocket
ja 0x5225a9
je 0x5225a2
cmp esi, 0x10030
je 0x52259b
cmp esi, reloc.WS2_32.dll_bind
jne 0x5225fe
mov eax, 0xb
jmp 0x52260a
mov eax, 0xd
jmp 0x52260a
mov eax, 7
jmp 0x52260a
cmp esi, reloc.WS2_32.dll_connect
je 0x5225c0
cmp esi, 0x80000101
jne 0x5225fe
mov eax, 0x11
jmp 0x52260a
mov eax, 8
jmp 0x52260a
mov eax, 2
jmp 0x52260a
cmp esi, 0x80000501
ja 0x5225f6
je 0x5225ef
cmp esi, 0x80000301
je 0x5225e8
cmp esi, 0x80000401
jne 0x5225fe
mov eax, 3
jmp 0x52260a
mov eax, 4
jmp 0x52260a
cmp esi, 0x80000601
je 0x522605
xor ebx, ebx
jmp 0x522876
mov eax, 5
push eax
lea edx, [esp + 0x10]
push 0
lea eax, [esp + 0x14]
push edx
push eax
call dword [sym.imp.OLEAUT32.dll_VariantTimeToDosDateTime]
test eax, eax
jge 0x522628
xor ebx, ebx
jmp 0x522876
cmp esi, 0x80000201
ja 0x5227d0
je 0x5227a8
cmp esi, reloc.WS2_32.dll_closesocket
ja 0x5226fe
je 0x5226ed
cmp esi, 0x10030
je 0x522694
cmp esi, reloc.WS2_32.dll_bind
jne 0x522876
mov eax, dword [esp + 0x4c]
test eax, eax
je 0x52267f
mov edx, dword [esp + 0x48]
xor ecx, ecx
cmp word [esp + 0x14], cx
mov eax, dword [edx]
setne cl
mov dword [eax], ecx
jmp 0x522876
mov edx, dword [esp + 0x48]
xor ecx, ecx
cmp word [esp + 0x14], cx
setne cl
mov dword [edx], ecx
jmp 0x522876
mov eax, dword [esp + 0x4c]
test eax, eax
je 0x5226b9
mov eax, dword [esp + 0x48]
push 0
mov ecx, dword [eax]
mov esi, dword [ecx]
push esi
push 0x7f3
call fcn.0053f0c0
mov edx, dword [esp + 0x14]
mov dword [esi], edx
jmp 0x5226d6
push 8
call fcn.005469d0
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x4c]
mov dword [eax], ecx
mov dword [eax + 4], 0
add esp, 4
mov dword [edx], eax
mov eax, dword [esp + 0x14]
test eax, eax
je 0x522876
mov ecx, dword [eax]
push eax
call dword [ecx + 4]
jmp 0x522876
mov eax, dword [esp + 0x4c]
test eax, eax
je 0x52286c
jmp 0x522857
cmp esi, reloc.WS2_32.dll_connect
je 0x522736
cmp esi, 0x80000101
jne 0x522876
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0x48]
test eax, eax
je 0x52272b
mov edx, dword [ecx]
mov al, byte [esp + 0x14]
mov byte [edx], al
jmp 0x522876
mov dl, byte [esp + 0x14]
mov byte [ecx], dl
jmp 0x522876
lea ecx, [esp + 0x1c]
call fcn.00523400
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x1c]
push eax
push ecx
mov dword [esp + 0x40], 0
call fcn.005483f0
push eax
call fcn.0053ac30
mov edi, eax
mov eax, dword [esp + 0x58]
add esp, 0xc
test eax, eax
je 0x522784
mov esi, dword [esp + 0x48]
push 0
mov edx, dword [esi]
mov eax, dword [edx]
push eax
push 0x7e9
call fcn.0053f0c0
mov ecx, dword [esi]
mov dword [ecx], edi
jmp 0x52278a
mov edx, dword [esp + 0x48]
mov dword [edx], edi
lea ecx, [esp + 0x1c]
mov dword [esp + 0x38], 0xffffffff
mov dword [esp + 0x1c], 0x12839ec
call fcn.00523600
jmp 0x522876
mov eax, dword [esp + 0x4c]
test eax, eax
mov eax, dword [esp + 0x48]
je 0x5227c3
mov ecx, dword [eax]
mov dx, word [esp + 0x14]
mov word [ecx], dx
jmp 0x522876
mov cx, word [esp + 0x14]
mov word [eax], cx
jmp 0x522876
cmp esi, 0x80000501
ja 0x522847
je 0x522825
cmp esi, 0x80000301
je 0x52280f
cmp esi, 0x80000401
jne 0x522876
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0x48]
test eax, eax
mov eax, dword [esp + 0x14]
cdq
je 0x522808
mov ecx, dword [ecx]
mov dword [ecx], eax
mov dword [ecx + 4], edx
jmp 0x522876
mov dword [ecx], eax
mov dword [ecx + 4], edx
jmp 0x522876
mov eax, dword [esp + 0x4c]
mov edx, dword [esp + 0x48]
test eax, eax
je 0x522833
mov eax, dword [edx]
mov ecx, dword [esp + 0x14]
mov dword [eax], ecx
jmp 0x522876
mov eax, dword [esp + 0x4c]
test eax, eax
je 0x52283b
mov ecx, dword [esp + 0x48]
mov edx, dword [ecx]
mov eax, dword [esp + 0x14]
mov dword [edx], eax
jmp 0x522876
fld dword [esp + 0x14]
mov ecx, dword [esp + 0x48]
fstp dword [ecx]
jmp 0x522876
cmp esi, 0x80000601
jne 0x522876
mov eax, dword [esp + 0x4c]
test eax, eax
je 0x52286c
mov edx, dword [esp + 0x48]
mov ecx, dword [esp + 0x14]
mov eax, dword [edx]
mov edx, dword [esp + 0x18]
mov dword [eax], ecx
mov dword [eax + 4], edx
jmp 0x522876
fld qword [esp + 0x14]
mov eax, dword [esp + 0x48]
fstp qword [eax]
lea ecx, [esp + 0xc]
push ecx
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
mov ecx, dword [esp + 0x30]
mov eax, ebx
pop ebx
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x30
ret