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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x2c
mov ebx, dword [esp + 0x40]
mov ebp, dword [ebx + 0xc]
mov edx, dword [ebx + 0x10]
cmp ebp, edx
jae 0x41ea00
lea esi, [ebp + 1]
cmp esi, edx
mov dword [ebx + 0xc], esi
movzx edi, byte [ebp]
jae 0x41eabd
lea eax, [esi + 1]
mov dword [ebx + 0xc], eax
movzx eax, byte [esi]
shl eax, 8
add esp, 0x2c
or eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [ebx + 0x38]
mov ebp, dword [ebx + 4]
mov eax, 0x8000
mov edi, edx
mov esi, dword [ebx + 8]
test ecx, ecx
mov dword [esp + 0x10], ebp
cmovne eax, ecx
sub edi, ebp
mov dword [esp + 0x14], edi
add eax, dword [esp + 0x14]
mov edi, esi
cmp eax, esi
jl 0x41ead3
mov eax, dword [ebx + 0x18]
test eax, eax
mov dword [esp + 0x14], eax
je 0x41ece0
mov eax, dword [ebx + 0x30]
test eax, eax
jne 0x41eae0
cmp dword [esp + 0x10], ebp
mov ecx, dword [ebx + 0x44]
jne 0x41ea58
test ecx, ecx
jne 0x41ecf0
mov esi, dword [ebx + 0x78]
test esi, esi
je 0x41ea74
cmp esi, dword [ebx + 8]
jge 0x41ea74
cmp esi, edi
jg 0x41ea74
cmp ebp, dword [esp + 0x10]
je 0x41ec70
mov edi, esi
mov dword [esp + 8], edi
mov dword [esp + 4], ebp
mov edx, dword [ebx + 0x14]
mov eax, dword [esp + 0x14]
mov dword [esp], edx
call eax
test eax, eax
jne 0x41ec00
mov eax, dword [ebx + 0x38]
test eax, eax
je 0x41ec20
mov edx, ebp
xor esi, esi
xor edi, edi
add dword [ebx + 0x28], esi
mov dword [ebx + 0xc], ebp
adc dword [ebx + 0x2c], edi
mov dword [ebx + 0x10], edx
add dword [ebx + 0x68], esi
adc dword [ebx + 0x6c], edi
cmp ebp, edx
jb 0x41e9d5
xor edi, edi
mov eax, dword [ebx + 4]
mov ecx, dword [ebx + 0x38]
mov esi, dword [ebx + 8]
mov dword [esp + 0x10], eax
mov eax, dword [ebx + 0x18]
mov dword [esp + 0x14], eax
jmp 0x41eae2
sub edi, dword [esp + 0x14]
mov ebp, edx
jmp 0x41ea2d
xor edi, edi
test ecx, ecx
mov ebp, 0x8000
mov eax, edx
cmove ecx, ebp
mov ebp, dword [esp + 0x10]
mov dword [esp + 0x18], esi
sub eax, ebp
mov dword [esp + 0x1c], ebp
mov ebp, eax
mov eax, esi
mov esi, dword [esp + 0x10]
add ecx, ebp
cmp ecx, eax
jge 0x41eb14
mov ecx, eax
mov esi, edx
sub ecx, ebp
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x41ebd0
mov ebp, dword [ebx + 0x30]
xor eax, eax
test ebp, ebp
jne 0x41e9f3
mov ebp, dword [ebx + 0x44]
test ebp, ebp
je 0x41eb3e
cmp dword [esp + 0x10], esi
je 0x41ed30
mov ebp, dword [ebx + 0x78]
test ebp, ebp
je 0x41eb60
cmp ebp, dword [ebx + 8]
jge 0x41eb60
cmp ebp, dword [esp + 0x18]
jg 0x41eb60
cmp esi, dword [esp + 0x1c]
je 0x41ed6f
mov dword [esp + 0x18], ebp
nop
mov eax, dword [esp + 0x18]
mov dword [esp + 4], esi
mov dword [esp + 8], eax
mov eax, dword [ebx + 0x14]
mov dword [esp], eax
call ecx
test eax, eax
jne 0x41ebe0
mov eax, dword [ebx + 0x38]
test eax, eax
je 0x41ebab
mov eax, esi
xor edx, edx
xor ecx, ecx
add dword [ebx + 0x28], edx
mov dword [ebx + 0xc], esi
adc dword [ebx + 0x2c], ecx
mov dword [ebx + 0x10], eax
add dword [ebx + 0x68], edx
adc dword [ebx + 0x6c], ecx
cmp eax, esi
ja 0x41e9e7
add esp, 0x2c
xor eax, eax
pop ebx
or eax, edi
pop esi
pop edi
pop ebp
ret
mov dword [esp + 8], str.Invalid_return_value_0_for_stream_protocol_n
mov dword [esp + 4], 0x18
mov dword [esp], 0
call fcn.0056b9c0
mov esi, esi
lea edi, [edi]
mov dword [ebx + 0x30], 1
mov esi, dword [ebx + 0xc]
mov eax, dword [ebx + 0x10]
jmp 0x41eb97
cmp eax, 0xdfb9b0bb
je 0x41ebd0
test eax, eax
jns 0x41ec62
mov dword [ebx + 0x48], eax
mov dword [ebx + 0x30], 1
mov esi, dword [ebx + 0xc]
mov eax, dword [ebx + 0x10]
jmp 0x41eb97
cmp eax, 0xdfb9b0bb
je 0x41ec40
test eax, eax
jns 0x41ec52
mov dword [ebx + 0x30], 1
mov dword [ebx + 0x48], eax
mov ebp, dword [ebx + 0xc]
mov edx, dword [ebx + 0x10]
jmp 0x41eab3
mov dword [esp + 8], str.Invalid_return_value_0_for_stream_protocol_n
mov dword [esp + 4], 0x18
mov dword [esp], 0
call fcn.0056b9c0
lea esi, [esi]
mov dword [ebx + 0x30], 1
mov ebp, dword [ebx + 0xc]
mov edx, dword [ebx + 0x10]
jmp 0x41eab3
mov edi, eax
mov esi, eax
lea edx, [ebp + eax]
sar edi, 0x1f
jmp 0x41eaa1
mov ecx, eax
mov edx, eax
add eax, esi
sar ecx, 0x1f
jmp 0x41eb85
cmp ebp, dword [ebx + 0xc]
je 0x41ea72
mov dword [esp], esi
call fcn.0056e030
test eax, eax
mov ebp, eax
je 0x41ede3
mov eax, dword [ebx + 4]
mov dword [esp], eax
call sub.msvcrt.dll__aligned_free
mov eax, dword [ebx + 0x34]
mov dword [ebx + 4], ebp
mov dword [ebx + 8], esi
mov dword [ebx + 0x78], esi
mov dword [ebx + 0xb0], ebp
mov dword [ebx + 0xc], ebp
test eax, eax
je 0x41edd0
lea eax, [ebp + esi]
mov dword [ebx + 0x34], 1
mov edi, esi
mov dword [ebx + 0x10], eax
mov eax, dword [ebx + 0x18]
mov dword [ebx + 0x40], ebp
test eax, eax
mov dword [esp + 0x14], eax
jne 0x41ea74
mov eax, 0xffffffea
jmp 0x41ec0b
mov dword [ebx + 0x30], 1
xor edi, edi
jmp 0x41eae2
mov esi, dword [ebx + 0x40]
cmp edx, esi
jbe 0x41ed1a
sub edx, esi
mov dword [esp + 4], esi
mov dword [esp + 8], edx
mov eax, dword [ebx + 0x3c]
mov dword [esp], eax
call ecx
mov dword [ebx + 0x3c], eax
mov eax, dword [ebx + 4]
mov dword [esp + 0x10], eax
mov eax, dword [ebx + 0x18]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x10]
mov dword [ebx + 0x40], eax
mov eax, dword [esp + 0x14]
test eax, eax
je 0x41ecd5
jmp 0x41ea58
mov eax, dword [ebx + 0x40]
cmp eax, edx
jae 0x41ed56
sub edx, eax
mov dword [esp + 4], eax
mov dword [esp + 8], edx
mov eax, dword [ebx + 0x3c]
mov dword [esp], eax
call ebp
mov dword [ebx + 0x3c], eax
mov eax, dword [ebx + 4]
mov ecx, dword [ebx + 0x18]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x1c]
test ecx, ecx
mov dword [ebx + 0x40], eax
jne 0x41eb3e
mov eax, 0xffffffea
jmp 0x41ebeb
cmp esi, dword [ebx + 0xc]
je 0x41eb5a
mov dword [esp], ebp
call fcn.0056e030
test eax, eax
mov esi, eax
je 0x41ee06
mov eax, dword [ebx + 4]
mov dword [esp], eax
call sub.msvcrt.dll__aligned_free
mov edx, dword [ebx + 0x34]
mov dword [ebx + 4], esi
mov dword [ebx + 8], ebp
mov dword [ebx + 0x78], ebp
mov dword [ebx + 0xb0], esi
mov dword [ebx + 0xc], esi
test edx, edx
je 0x41edda
lea eax, [esi + ebp]
mov dword [ebx + 0x34], 1
mov dword [esp + 0x18], ebp
mov dword [ebx + 0x10], eax
mov ecx, dword [ebx + 0x18]
mov dword [ebx + 0x40], esi
test ecx, ecx
jne 0x41eb60
jmp 0x41ed65
mov dword [ebx + 0x10], ebp
mov edi, esi
jmp 0x41ecc3
mov dword [ebx + 0x10], esi
mov dword [esp + 0x18], ebp
jmp 0x41edbf
mov dword [esp + 8], str.Failed_to_decrease_buffer_size_n
mov dword [esp + 4], 0x18
mov dword [esp], ebx
call fcn.0056b9c0
mov ebp, dword [ebx + 4]
mov edi, dword [ebx + 0x78]
jmp 0x41ecc3
mov dword [esp + 8], str.Failed_to_decrease_buffer_size_n
mov dword [esp + 4], 0x18
mov dword [esp], ebx
call fcn.0056b9c0
mov eax, dword [ebx + 0x78]
mov esi, dword [ebx + 4]
mov dword [esp + 0x18], eax
jmp 0x41edbf