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

Disassembly:
sub esp, 0x40
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x54]
mov eax, dword [edi + 0x78]
mov esi, dword [eax + 0xb8]
test esi, esi
jns 0x474c2e
mov esi, dword [eax + 0xc]
shl esi, 2
lea eax, [esp + 0x30]
xor ebp, ebp
push eax
call fcn.00481d70
mov edx, dword [esp + 0x5c]
add esp, 4
mov ecx, dword [eax]
mov dword [edx + 0x1b0], ecx
mov ecx, dword [eax + 4]
mov dword [edx + 0x1b4], ecx
mov ecx, dword [eax + 8]
mov dword [edx + 0x1b8], ecx
mov eax, dword [eax + 0xc]
mov dword [edx + 0x1bc], eax
test esi, esi
je 0x474e56
cmp dword [edi + 0x80], ebp
je 0x474c81
push 2
push 5
push edi
call fcn.0047f110
add esp, 0xc
mov eax, dword [edi + 0xca0]
mov ebx, dword [eax + 0x18]
cmp dword [edi + 0x80], ebp
je 0x474c9d
push 5
push edi
call fcn.0047f150
add esp, 8
cmp ebx, esi
jbe 0x474e52
push str.Connection_cache_is_full__closing_the_oldest_one._n
push edi
call fcn.0047b620
mov eax, dword [edi + 0xca0]
or ebx, 0xffffffff
mov dword [esp + 0x20], eax
xor esi, esi
lea eax, [esp + 0x48]
mov dword [esp + 0x1c], ebx
push eax
xor ebp, ebp
mov dword [esp + 0x1c], esi
call fcn.00481d70
add esp, 0xc
mov ecx, dword [eax]
mov dword [esp + 0x1c], ecx
mov ecx, dword [eax + 4]
mov dword [esp + 0x20], ecx
mov ecx, dword [eax + 8]
mov eax, dword [eax + 0xc]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], eax
cmp dword [edi + 0x80], esi
je 0x474d06
push 2
push 5
push edi
call fcn.0047f110
add esp, 0xc
lea eax, [esp + 0x30]
push eax
push dword [esp + 0x1c]
call fcn.004824a0
lea eax, [esp + 0x38]
push eax
call fcn.004823e0
add esp, 0xc
test eax, eax
je 0x474e2e
lea esp, [esp]
mov eax, dword [eax + 0xc]
mov dword [esp + 0x2c], eax
mov edi, dword [eax + 8]
test edi, edi
je 0x474df7
jmp 0x474d50
mov esi, dword [edi]
cmp dword [esi + 0x37c], 0
jne 0x474de8
cmp dword [esi], 0
jne 0x474de8
cmp byte [esi + 0x2a4], 0
jne 0x474de8
cmp byte [esi + 0x2c4], 0
jne 0x474de8
mov eax, dword [esi + 0x1b0]
sub esp, 0x10
mov ecx, esp
sub esp, 0x10
mov dword [ecx], eax
mov eax, dword [esi + 0x1b4]
mov dword [ecx + 4], eax
mov eax, dword [esi + 0x1b8]
mov dword [ecx + 8], eax
mov eax, dword [esi + 0x1bc]
mov dword [ecx + 0xc], eax
mov eax, esp
mov ecx, dword [esp + 0x3c]
mov dword [eax], ecx
mov ecx, dword [esp + 0x40]
mov dword [eax + 4], ecx
mov ecx, dword [esp + 0x44]
mov dword [eax + 8], ecx
mov ecx, dword [esp + 0x48]
mov dword [eax + 0xc], ecx
call fcn.00481e20
add esp, 0x20
cmp edx, dword [esp + 0x14]
jl 0x474de8
jg 0x474dd6
cmp eax, ebx
jbe 0x474de8
mov ebp, esi
mov dword [esp + 0x14], edx
mov esi, dword [esp + 0x2c]
mov ebx, eax
mov dword [esp + 0x10], esi
jmp 0x474dec
mov esi, dword [esp + 0x10]
mov edi, dword [edi + 8]
test edi, edi
jne 0x474d50
lea eax, [esp + 0x30]
push eax
call fcn.004823e0
add esp, 4
test eax, eax
jne 0x474d30
test ebp, ebp
je 0x474e2a
push ebp
push esi
call fcn.00474ed0
mov eax, dword [esp + 0x20]
add esp, 8
mov edi, dword [esp + 0x54]
dec dword [eax + 0x18]
mov dword [ebp], edi
jmp 0x474e2e
mov edi, dword [esp + 0x54]
cmp dword [edi + 0x80], 0
je 0x474e42
push 5
push edi
call fcn.0047f150
add esp, 8
test ebp, ebp
je 0x474e52
push 0
push ebp
push edi
call fcn.00477620
add esp, 0xc
mov edx, dword [esp + 0x58]
pop edi
pop esi
cmp ebp, edx
pop ebp
setne al
pop ebx
add esp, 0x40
ret