Function at 0x505220
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x68
mov eax, dword [0x57906c]
xor eax, esp
mov dword [esp + 0x64], eax
push ebx
push ebp
mov ebp, dword [esp + 0x78]
push esi
mov esi, dword [esp + 0x78]
mov ebx, esi
mov dword [esp + 0x10], ebp
mov byte [esp + 0xd], 0
mov byte [esp + 0xf], 0
mov byte [esp + 0xe], 0
lea ecx, [ebx + 1]
mov dword [esp + 0x20], 0
mov dword [esp + 0x14], 0
mov al, byte [ebx]
inc ebx
test al, al
jne 0x505261
sub ebx, ecx
cmp ebx, 0x7a1200
jbe 0x505289
pop esi
pop ebp
mov eax, 3
pop ebx
mov ecx, dword [esp + 0x64]
xor ecx, esp
call fcn.004c61ad
add esp, 0x68
ret
lea eax, [ebx*2 + 2]
push edi
push eax
call dword [0x5790a0]
mov edi, eax
add esp, 4
mov dword [ebp + 0x28], edi
mov dword [esp + 0x1c], edi
test edi, edi
je 0x5055a1
lea ebp, [ebx + 1]
push 0x29
lea eax, [esp + 0x38]
add ebp, edi
push eax
push esi
mov byte [ebp], 0
call fcn.00503c70
mov edx, dword [esp + 0x90]
add esp, 0xc
test al, al
je 0x5054a0
lea ecx, [esp + 0x34]
mov byte [esp + 0x12], 1
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x5052e0
sub ecx, edx
lea eax, [esp + 0x34]
mov dword [esp + 0x18], ecx
mov ecx, str.file
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x505316
test dl, dl
je 0x505312
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x505316
add eax, 2
add ecx, 2
test dl, dl
jne 0x5052f6
xor eax, eax
jmp 0x50531b
sbb eax, eax
or eax, 1
test eax, eax
jne 0x505499
cmp ebx, 6
jbe 0x505481
add esi, 5
mov ecx, edi
sub ecx, esi
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [ecx + esi - 1], al
test al, al
jne 0x505333
push str.file
call dword [0x5790ac]
mov ebx, dword [esp + 0x18]
add esp, 4
mov dword [ebx], eax
test eax, eax
je 0x5055a1
mov cl, byte [edi]
cmp cl, 0x2f
jne 0x505412
cmp byte [edi + 1], cl
jne 0x505412
mov al, byte [edi + 2]
add edi, 2
cmp al, cl
je 0x505410
cmp al, 0x61
jl 0x505386
cmp al, 0x7a
jle 0x50538c
sub al, 0x41
cmp al, 0x19
ja 0x5053a6
mov al, byte [edi + 1]
cmp al, 0x3a
je 0x505397
cmp al, 0x7c
jne 0x5053a6
mov al, byte [edi + 2]
cmp al, 0x2f
je 0x505410
cmp al, 0x5c
je 0x505410
test al, al
je 0x505410
push 0xa
push str.localhost_
push edi
call fcn.004e1060
add esp, 0xc
test eax, eax
jne 0x50540d
push 0xa
push str.127.0.0.1_
push edi
call fcn.004e1060
add esp, 0xc
test eax, eax
jne 0x50540d
push str._:____
push edi
call fcn.0052fc50
mov esi, eax
add esp, 8
test esi, esi
je 0x505481
cmp byte [esi], 0x2f
jne 0x505481
sub esi, edi
je 0x505407
push esi
push edi
push ebp
call fcn.00516430
add esp, 0xc
mov byte [esi + ebp], 0
mov byte [esp + 0x13], 1
mov edi, dword [esp + 0x1c]
jmp 0x505410
add edi, 9
mov cl, byte [edi]
xor eax, eax
cmp byte [esp + 0x13], al
cmovne eax, ebp
mov ebp, eax
cmp cl, 0x2f
jne 0x505632
mov al, byte [edi + 1]
lea edx, [edi + 1]
cmp al, 0x61
jl 0x505434
cmp al, 0x7a
jle 0x50543e
sub al, 0x41
cmp al, 0x19
ja 0x505632
mov al, byte [edi + 2]
cmp al, 0x3a
je 0x50544d
cmp al, 0x7c
jne 0x505632
mov al, byte [edi + 3]
cmp al, 0x2f
je 0x505460
cmp al, 0x5c
je 0x505460
test al, al
jne 0x505632
mov ecx, edx
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x505465
sub ecx, esi
lea eax, [ecx + 1]
push eax
push edx
push edi
call fcn.005169b0
add esp, 0xc
jmp 0x505632
pop edi
pop esi
pop ebp
mov eax, 0x13
pop ebx
mov ecx, dword [esp + 0x64]
xor ecx, esp
call fcn.004c61ad
add esp, 0x68
ret
mov edx, dword [esp + 0x84]
cmp byte [esp + 0x12], 0
mov byte [edi], 0
je 0x5055d1
inc esi
xor eax, eax
add esi, dword [esp + 0x18]
je 0x5055b9
nop dword [eax + eax]
cmp byte [esi], 0x2f
jne 0x5054d0
cmp eax, 4
jge 0x5054d0
inc eax
add esi, 1
jne 0x5054c0
dec eax
cmp eax, 2
ja 0x5055b9
lea eax, [esp + 0x34]
push eax
mov dword [esp + 0x28], eax
call fcn.004d6dd0
add esp, 4
test eax, eax
mov eax, dword [esp + 0x84]
jne 0x505512
test al, 8
jne 0x505512
pop edi
pop esi
pop ebp
mov eax, 5
pop ebx
mov ecx, dword [esp + 0x64]
xor ecx, esp
call fcn.004c61ad
add esp, 0x68
ret
push eax
lea eax, [esp + 0x38]
push eax
call fcn.00505140
add esp, 8
test al, al
jne 0x5055d9
mov edx, dword [esp + 0x84]
mov al, byte [esi]
mov ecx, esi
test al, al
je 0x50554b
cmp al, 0x2f
je 0x50554b
cmp al, 0x3f
je 0x50554b
cmp al, 0x23
je 0x50554b
mov al, byte [esi + 1]
inc esi
test al, al
jne 0x505537
mov ebx, esi
sub ebx, ecx
je 0x50560a
push ebx
push ecx
push ebp
call fcn.00516430
add esp, 0xc
mov byte [ebx + ebp], 0
mov ecx, edi
sub ecx, esi
nop dword [eax + eax]
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [ecx + esi - 1], al
test al, al
jne 0x505570
mov eax, dword [esp + 0x24]
test eax, eax
je 0x50562e
push eax
call dword [0x5790ac]
mov ebx, dword [esp + 0x18]
add esp, 4
mov dword [ebx], eax
test eax, eax
jne 0x505632
mov eax, 7
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x64]
xor ecx, esp
call fcn.004c61ad
add esp, 0x68
ret
pop edi
pop esi
pop ebp
mov eax, 0x1c
pop ebx
mov ecx, dword [esp + 0x64]
xor ecx, esp
call fcn.004c61ad
add esp, 0x68
ret
test edx, 0x204
jne 0x5055f1
pop edi
pop esi
pop ebp
mov eax, 0x1b
pop ebx
mov ecx, dword [esp + 0x64]
xor ecx, esp
call fcn.004c61ad
add esp, 0x68
ret
test dl, 4
mov ebx, str.https
mov eax, 0
cmove ebx, eax
mov dword [esp + 0x24], ebx
jmp 0x50552f
test edx, 0x400
jne 0x505564
pop edi
pop esi
pop ebp
mov eax, 0xe
pop ebx
mov ecx, dword [esp + 0x64]
xor ecx, esp
call fcn.004c61ad
add esp, 0x68
ret
mov ebx, dword [esp + 0x14]
test byte [esp + 0x84], 0x80
je 0x50567c
cmp byte [edi], 0
je 0x50567c
mov ecx, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x505646
sub ecx, edx
lea eax, [ecx + ecx*2]
push eax
call dword [0x5790a0]
mov esi, eax
add esp, 4
test esi, esi
je 0x5055a1
push 1
push edi
push esi
mov byte [esp + 0x1d], 1
call fcn.00505cb0
add esp, 0xc
mov dword [ebx + 0x2c], esi
mov edi, esi
push 0x23
push edi
call fcn.00515d30
mov esi, eax
add esp, 8
test esi, esi
je 0x5056d7
push dword [esp + 0x84]
mov byte [esi], 0
inc esi
push esi
call fcn.00505140
add esp, 8
test al, al
je 0x5056bd
pop edi
pop esi
pop ebp
mov eax, 0x14
pop ebx
mov ecx, dword [esp + 0x64]
xor ecx, esp
call fcn.004c61ad
add esp, 0x68
ret
cmp byte [esi], 0
je 0x5056d7
push esi
call dword [0x5790ac]
add esp, 4
mov dword [ebx + 0x24], eax
test eax, eax
je 0x5055a1
push 0x3f
push edi
call fcn.00515d30
mov esi, eax
add esp, 8
test esi, esi
je 0x50572d
push dword [esp + 0x84]
mov byte [esi], 0
inc esi
push esi
call fcn.00505140
add esp, 8
test al, al
je 0x505718
pop edi
pop esi
pop ebp
mov eax, 0x1a
pop ebx
mov ecx, dword [esp + 0x64]
xor ecx, esp
call fcn.004c61ad
add esp, 0x68
ret
push esi
call dword [0x5790ac]
add esp, 4
mov dword [ebx + 0x20], eax
test eax, eax
je 0x5055a1
push dword [esp + 0x84]
push edi
call fcn.00505140
add esp, 8
test al, al
je 0x505759
pop edi
pop esi
pop ebp
mov eax, 0x19
pop ebx
mov ecx, dword [esp + 0x64]
xor ecx, esp
call fcn.004c61ad
add esp, 0x68
ret
cmp byte [edi], 0
je 0x5057f5
test byte [esp + 0x84], 0x10
jne 0x5057d0
push edi
call fcn.00512ee0
mov esi, eax
add esp, 4
test esi, esi
je 0x5055a1
mov edx, edi
mov ecx, esi
mov al, byte [ecx]
cmp al, byte [edx]
jne 0x5057a3
test al, al
je 0x50579f
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x5057a3
add ecx, 2
add edx, 2
test al, al
jne 0x505783
xor eax, eax
jmp 0x5057a8
sbb eax, eax
or eax, 1
test eax, eax
je 0x5057c6
cmp byte [esp + 0x11], 0
je 0x5057bf
push dword [ebx + 0x2c]
call dword [0x5790a4]
add esp, 4
mov edi, esi
mov dword [ebx + 0x2c], esi
jmp 0x5057e3
push esi
call dword [0x5790a4]
add esp, 4
cmp byte [esp + 0x11], 0
jne 0x5057e3
push edi
call dword [0x5790ac]
add esp, 4
mov edi, eax
mov dword [ebx + 0x1c], edi
test edi, edi
je 0x5055a1
mov dword [ebx + 0x2c], 0
test ebp, ebp
je 0x505c6b
xor esi, esi
push 0x40
push ebp
mov dword [esp + 0x28], esi
mov dword [esp + 0x24], esi
mov dword [esp + 0x20], esi
call fcn.00515d30
mov edi, eax
mov dword [esp + 0x1c], ebp
add esp, 8
test edi, edi
je 0x50592e
mov eax, dword [ebx]
inc edi
mov ebp, edi
test eax, eax
je 0x505849
push eax
call fcn.004d6dd0
add esp, 4
test eax, eax
je 0x505849
test dword [eax + 0x4c], 0x400
je 0x505849
lea eax, [esp + 0x18]
jmp 0x50584b
xor eax, eax
push eax
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x28]
push eax
mov eax, dword [esp + 0x20]
sub edi, eax
dec edi
push edi
push eax
call fcn.004d7b00
add esp, 0x14
test eax, eax
jne 0x505929
cmp dword [esp + 0x20], esi
je 0x5058ac
mov eax, dword [esp + 0x84]
test al, 0x20
je 0x50588a
mov esi, 8
jmp 0x50592e
push eax
push dword [esp + 0x24]
call fcn.00505140
add esp, 8
test al, al
je 0x5058a5
mov esi, 0x1d
jmp 0x50592e
mov eax, dword [esp + 0x20]
mov dword [ebx + 4], eax
mov eax, dword [esp + 0x1c]
mov esi, dword [esp + 0x84]
test eax, eax
je 0x5058d7
push esi
push eax
call fcn.00505140
add esp, 8
test al, al
je 0x5058d0
mov esi, 0x18
jmp 0x50592e
mov eax, dword [esp + 0x1c]
mov dword [ebx + 8], eax
mov eax, dword [esp + 0x18]
test eax, eax
je 0x5058f4
push esi
push eax
call fcn.00505140
add esp, 8
test al, al
jne 0x505929
mov eax, dword [esp + 0x18]
mov dword [ebx + 0xc], eax
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x15]
push eax
push str.__45_0123456789abcdefABCDEF:.__c_n
push ebp
call fcn.004d11f0
add esp, 0x10
cmp eax, 1
jne 0x5059e2
mov al, byte [esp + 0x11]
cmp al, 0x5d
jne 0x50597d
mov eax, dword [esp + 0x14]
lea esi, [eax + ebp]
jmp 0x5059b4
mov esi, 0x17
push dword [esp + 0x20]
call dword [0x5790a4]
push dword [esp + 0x20]
call dword [0x5790a4]
push dword [esp + 0x20]
call dword [0x5790a4]
add esp, 0xc
mov dword [ebx + 4], 0
mov dword [ebx + 8], 0
mov dword [ebx + 0xc], 0
test esi, esi
je 0x5058f4
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x64]
xor ecx, esp
call fcn.004c61ad
add esp, 0x68
ret
cmp al, 0x25
jne 0x5059ca
mov esi, dword [esp + 0x14]
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x15]
push eax
lea eax, [esi + ebp]
push str._____c_n
push eax
call fcn.004d11f0
add esp, 0x10
cmp eax, 1
jne 0x5059ca
cmp byte [esp + 0x11], 0x5d
jne 0x5059ca
mov eax, dword [esp + 0x14]
add esi, eax
add esi, ebp
test esi, esi
je 0x505aa8
mov al, byte [esi]
test al, al
je 0x505aa8
cmp al, 0x3a
je 0x5059ef
pop edi
pop esi
pop ebp
mov eax, 0x16
pop ebx
mov ecx, dword [esp + 0x64]
xor ecx, esp
call fcn.004c61ad
add esp, 0x68
ret
push 0x3a
push ebp
call fcn.00515d30
add esp, 8
mov esi, eax
test esi, esi
je 0x505aa8
mov al, byte [esi + 1]
lea edi, [esi + 1]
test al, al
jne 0x505a29
mov byte [esi], al
movzx eax, byte [esp + 0x12]
xor eax, 1
shl eax, 2
test eax, eax
je 0x505aa8
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x64]
xor ecx, esp
call fcn.004c61ad
add esp, 0x68
ret
movzx eax, al
push eax
call fcn.00505dd0
add esp, 4
test eax, eax
jne 0x505a51
pop edi
pop esi
pop ebp
mov eax, 4
pop ebx
mov ecx, dword [esp + 0x64]
xor ecx, esp
call fcn.004c61ad
add esp, 0x68
ret
push 0xa
lea eax, [esp + 0x2c]
push eax
push edi
call fcn.00523d4d
mov edi, eax
add esp, 0xc
cmp edi, 0xffff
jg 0x505a39
mov eax, dword [esp + 0x28]
cmp byte [eax], 0
jne 0x505a39
push edi
mov byte [esi], 0
push 0x54cf10
mov byte [eax], 0
lea eax, [esp + 0x34]
push 7
push eax
call fcn.004dfa30
lea eax, [esp + 0x3c]
mov dword [ebx + 0x30], edi
push eax
call dword [0x5790ac]
add esp, 0x14
mov dword [ebx + 0x18], eax
test eax, eax
je 0x5055a1
push dword [esp + 0x84]
push ebp
call fcn.00505140
add esp, 8
test al, al
jne 0x505b48
mov ecx, ebp
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x505ac5
sub ecx, edx
jne 0x505af3
test dword [esp + 0x84], 0x400
je 0x505af3
push 0x55faaf
call dword [0x5790ac]
add esp, 4
mov dword [ebx + 0x10], eax
jmp 0x505b88
push 0x11
lea eax, [esp + 0x64]
push eax
push ebp
lea esi, [ebx + 0x10]
call fcn.00504fa0
add esp, 0xc
test al, al
je 0x505b1c
lea eax, [esp + 0x60]
push eax
call dword [0x5790ac]
add esp, 4
mov dword [esi], eax
jmp 0x505b88
cmp byte [ebp], 0x5b
je 0x505b60
push 0x25
push ebp
call fcn.00515d30
add esp, 8
test eax, eax
je 0x505b60
push 3
lea eax, [esp + 0x2c]
push eax
push esi
push 0
push ebp
call fcn.00506540
add esp, 0x14
test eax, eax
je 0x505b74
pop edi
pop esi
pop ebp
mov eax, 0x15
pop ebx
mov ecx, dword [esp + 0x64]
xor ecx, esp
call fcn.004c61ad
add esp, 0x68
ret
push ebp
call dword [0x5790ac]
add esp, 4
mov dword [esi], eax
test eax, eax
je 0x5055a1
push dword [ebx + 0x10]
push ebx
call fcn.00504d90
add esp, 8
test eax, eax
jne 0x5055a6
cmp dword [ebx + 0x10], 0
je 0x5055a1
test dword [esp + 0x84], 0x200
je 0x505c6b
cmp dword [esp + 0x24], 0
jne 0x505c6b
push 4
push str.ftp.
push ebp
call fcn.004e1060
add esp, 0xc
test eax, eax
je 0x505bcc
mov ecx, 0x54df98
jmp 0x505c57
push 5
push str.dict.
push ebp
call fcn.004e1060
add esp, 0xc
test eax, eax
je 0x505be7
mov ecx, str.dict
jmp 0x505c57
push 5
push str.ldap.
push ebp
call fcn.004e1060
add esp, 0xc
test eax, eax
je 0x505c02
mov ecx, str.ldap
jmp 0x505c57
push 5
push str.imap.
push ebp
call fcn.004e1060
add esp, 0xc
test eax, eax
je 0x505c1d
mov ecx, str.imap
jmp 0x505c57
push 5
push str.smtp.
push ebp
call fcn.004e1060
add esp, 0xc
test eax, eax
je 0x505c38
mov ecx, str.smtp
jmp 0x505c57
push 5
push str.pop3.
push ebp
call fcn.004e1060
add esp, 0xc
mov ecx, str.pop3
test eax, eax
mov edx, str.http
cmove ecx, edx
push ecx
call dword [0x5790ac]
add esp, 4
mov dword [ebx], eax
test eax, eax
je 0x5055a1
push dword [ebx + 0x28]
call dword [0x5790a4]
push dword [ebx + 0x2c]
mov dword [ebx + 0x28], 0
call dword [0x5790a4]
mov ecx, dword [esp + 0x7c]
add esp, 8
mov dword [ebx + 0x2c], 0
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004c61ad
add esp, 0x68
ret