Function at 0x515700
Capabilities:
Get hostname

Disassembly:
sub esp, 0x608
mov al, byte [0x5937a0]
push ebx
push ebp
push esi
mov ebp, ecx
push edi
mov byte [esp + 0x418], al
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x419]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
cmp dword [ebp + 4], 0xffffffff
je 0x515b7f
mov esi, dword [esp + 0x61c]
test esi, esi
je 0x515b7f
mov edi, dword [esp + 0x620]
test edi, edi
je 0x515b7f
lea ecx, [esp + 0x10]
push 0x1f4
push ecx
mov ecx, ebp
call fcn.0050abd0
cmp eax, 1
jne 0x51579b
lea edx, [esp + 0x10]
push edx
call dword [sym.imp.MSVCRT.dll_atoi]
add esp, 4
cmp eax, 0xdc
jne 0x5157d9
cmp byte [esp + 0x13], 0x20
je 0x51579b
lea eax, [esp + 0x10]
push 0x1f4
push eax
mov ecx, ebp
call fcn.0050abd0
cmp eax, 1
je 0x515769
lea ecx, [esp + 0x518]
push 0xfa
push ecx
call sub.WS2_32.dll_gethostname
mov al, byte [esi]
mov byte [esp + 0x612], 0
test al, al
je 0x5157ef
cmp byte [edi], 0
je 0x5157ef
lea edx, [esp + 0x518]
lea eax, [esp + 0x10]
push edx
push str.EHLO__s_r_n
push 0x207
push eax
jmp 0x515806
mov ecx, ebp
call fcn.00508240
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x608
ret 8
lea ecx, [esp + 0x518]
lea edx, [esp + 0x10]
push ecx
push str.HELO__s_r_n
push 0x207
push edx
call dword [sym.imp.MSVCRT.dll__snprintf]
lea edi, [esp + 0x20]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x10
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + 0x10]
push ecx
push eax
mov ecx, ebp
call fcn.0050ad60
test eax, eax
je 0x515b7f
lea ecx, [esp + 0x10]
push 0x1f4
push ecx
mov ecx, ebp
call fcn.0050abd0
cmp eax, 1
jne 0x5158c5
mov ebx, dword [sym.imp.MSVCRT.dll__strupr]
lea edx, [esp + 0x10]
push edx
call ebx
mov esi, dword [sym.imp.MSVCRT.dll_atoi]
lea eax, [esp + 0x14]
push eax
call esi
add esp, 8
cmp eax, 0xfa
jne 0x5158e2
mov ecx, 5
mov edi, str.AUTH
lea esi, [esp + 0x14]
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x5158a8
lea edi, [esp + 0x19]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x418]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
cmp byte [esp + 0x13], 0x20
je 0x5158c5
lea ecx, [esp + 0x10]
push 0x1f4
push ecx
mov ecx, ebp
call fcn.0050abd0
cmp eax, 1
je 0x51584e
mov al, byte [esp + 0x418]
test al, al
jne 0x5158f7
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x608
ret 8
lea edx, [esp + 0x10]
push edx
call esi
add esp, 4
push eax
push str.Mail:_invalid_answer___d_
jmp 0x515b70
lea eax, [esp + 0x418]
push str.LOGIN
push eax
call dword [sym.imp.MSVCRT.dll_strstr]
add esp, 8
test eax, eax
je 0x515b63
mov ecx, str.AUTH_LOGIN_r_n
test ecx, ecx
je 0x515b7f
mov edi, ecx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.AUTH_LOGIN_r_n
mov ecx, ebp
call fcn.0050ad60
test eax, eax
je 0x515b7f
lea edx, [esp + 0x218]
push 0x1ff
push edx
mov ecx, ebp
call fcn.0050abd0
test eax, eax
je 0x515b7f
cmp byte [esp + 0x21b], 0x20
je 0x51598e
lea eax, [esp + 0x218]
push 0x1ff
push eax
mov ecx, ebp
call fcn.0050abd0
test eax, eax
jne 0x51595f
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x608
ret 8
mov esi, dword [sym.imp.MSVCRT.dll_strncpy]
lea ecx, [esp + 0x10]
test ecx, ecx
je 0x5159bb
lea edx, [esp + 0x218]
push 0xfa
lea eax, [esp + 0x14]
push edx
push eax
call esi
add esp, 0xc
mov byte [esp + 0x10a], 0
mov ebx, dword [sym.imp.MSVCRT.dll_atoi]
lea ecx, [esp + 0x218]
push ecx
call ebx
add esp, 4
cmp eax, 0x140
jne 0x515b7f
mov eax, dword [esp + 0x61c]
lea edx, [esp + 0x10]
push edx
push eax
mov ecx, ebp
mov byte [esp + 0x18], 0
call fcn.00515510
lea ecx, [esp + 0x10]
test ecx, ecx
je 0x515a96
lea edi, [esp + 0x10]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
mov ecx, ebp
call fcn.0050ad60
test eax, eax
je 0x515a96
lea eax, [esp + 0x218]
push 0x1ff
push eax
mov ecx, ebp
call fcn.0050abd0
test eax, eax
je 0x515a96
cmp byte [esp + 0x21b], 0x20
je 0x515a66
lea ecx, [esp + 0x218]
push 0x1ff
push ecx
mov ecx, ebp
call fcn.0050abd0
test eax, eax
jne 0x515a35
lea edx, [esp + 0x10]
push edx
push str.Mail:__s
jmp 0x515b70
lea edx, [esp + 0x218]
push 0xfa
lea eax, [esp + 0x14]
push edx
push eax
call esi
lea ecx, [esp + 0x224]
mov byte [esp + 0x116], 0
push ecx
call ebx
add esp, 0x10
cmp eax, 0x140
je 0x515aa5
lea edx, [esp + 0x10]
push edx
push str.Mail:__s
jmp 0x515b70
mov ecx, dword [esp + 0x620]
lea eax, [esp + 0x10]
push eax
push ecx
mov ecx, ebp
mov byte [esp + 0x18], 0
call fcn.00515510
lea edi, [esp + 0x10]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
mov ecx, ebp
call fcn.0050ad60
test eax, eax
je 0x515b57
lea eax, [esp + 0x218]
push 0x1ff
push eax
mov ecx, ebp
call fcn.0050abd0
test eax, eax
je 0x515b57
cmp byte [esp + 0x21b], 0x20
je 0x515b23
lea ecx, [esp + 0x218]
push 0x1ff
push ecx
mov ecx, ebp
call fcn.0050abd0
test eax, eax
jne 0x515af5
lea edx, [esp + 0x10]
push edx
push str.Mail:__s
jmp 0x515b70
lea edx, [esp + 0x218]
push 0xfa
lea eax, [esp + 0x14]
push edx
push eax
call esi
lea ecx, [esp + 0x224]
mov byte [esp + 0x116], 0
push ecx
call ebx
add esp, 0x10
cmp eax, 0xeb
je 0x5158d0
lea edx, [esp + 0x10]
push edx
push str.Mail:__s
jmp 0x515b70
lea eax, [esp + 0x418]
push eax
push str.Mail:_unsupported_authorization_mode__s
push 1
push 0x596558
call fcn.004aa400
add esp, 0x10
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x608
ret 8