Function at 0x401940
Capabilities:
Reference cloudflare dns server

Disassembly:
sub esp, 8
mov eax, dword [0x437348]
push ebx
push ebp
push esi
mov esi, ecx
push edi
xor edi, edi
mov dword [esp + 0x10], esi
mov dword [esi + 0x38], eax
mov ecx, dword [0x437348]
lea ebp, [esi + 0x3c]
lea ebx, [esi + 0x40]
mov eax, str.1.0.0.1
mov dword [ebp], ecx
mov edx, dword [0x437348]
mov dword [ebx], edx
mov dword [esi], 0x43439c
test eax, eax
mov dword [esi + 4], edi
jne 0x401986
mov dword [esp + 0x14], edi
jmp 0x401997
push str.1.0.0.1
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov dword [esp + 0x14], eax
mov edi, eax
mov eax, dword [ebp]
cmp dword [eax - 0xc], 1
jg 0x4019a5
cmp edi, dword [eax - 4]
jle 0x4019b8
mov ecx, ebp
call fcn.00402400
push edi
mov ecx, ebp
call fcn.004023a0
test eax, eax
je 0x4019e5
mov ecx, edi
mov edi, dword [ebp]
mov edx, ecx
mov esi, str.1.0.0.1
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0x14]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp]
mov esi, dword [esp + 0x10]
mov dword [ecx - 8], eax
mov edx, dword [ebp]
mov byte [edx + eax], 0
mov eax, 0x43babc
test eax, eax
jne 0x4019f2
xor ebp, ebp
jmp 0x4019ff
push 0x43babc
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ebp, eax
mov eax, dword [ebx]
mov edx, dword [eax - 0xc]
lea ecx, [eax - 0xc]
cmp edx, 1
jg 0x401a11
cmp ebp, dword [eax - 4]
jle 0x401a4b
mov edx, dword [0x43734c]
add eax, 0xfffffff4
cmp eax, edx
je 0x401a3f
push ecx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x401a37
mov ecx, dword [ebx]
sub ecx, 0xc
push ecx
call fcn.004292c0
add esp, 4
mov edx, dword [0x437348]
mov dword [ebx], edx
push ebp
mov ecx, ebx
call fcn.004023a0
test eax, eax
je 0x401a71
mov edi, dword [ebx]
mov ecx, ebp
mov eax, ecx
mov esi, 0x43babc
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx]
mov esi, dword [esp + 0x10]
mov dword [ecx - 8], ebp
mov edx, dword [ebx]
mov byte [edx + ebp], 0
mov eax, 0x43babc
test eax, eax
jne 0x401a7e
xor ebx, ebx
jmp 0x401a8b
push 0x43babc
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ebx, eax
mov eax, dword [esi + 0x38]
lea edi, [esi + 0x38]
mov edx, dword [eax - 0xc]
lea ecx, [eax - 0xc]
cmp edx, 1
jg 0x401aa1
cmp ebx, dword [eax - 4]
jle 0x401adb
mov edx, dword [0x43734c]
add eax, 0xfffffff4
cmp eax, edx
je 0x401acf
push ecx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x401ac7
mov ecx, dword [edi]
sub ecx, 0xc
push ecx
call fcn.004292c0
add esp, 4
mov edx, dword [0x437348]
mov dword [edi], edx
push ebx
mov ecx, edi
call fcn.004023a0
test eax, eax
je 0x401b07
mov edi, dword [edi]
mov ecx, ebx
mov eax, ecx
mov esi, 0x43babc
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x10]
mov esi, ecx
mov edx, dword [ecx + 0x38]
lea eax, [ecx + 0x38]
mov dword [edx - 8], ebx
mov eax, dword [eax]
mov byte [ebx + eax], 0
mov ecx, 0x19
xor eax, eax
lea edi, [esi + 0x44]
rep stosd dword es:[edi], eax
mov ecx, esi
call fcn.00401e80
mov dword [esi + 0xa8], 0
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret