Function at 0x41fbe0
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 0x41fc20
lea esi, [ebp + 1]
mov dword [ebx + 0xc], esi
movzx ebp, byte [ebp]
shl ebp, 8
cmp esi, edx
jae 0x41fcdd
lea eax, [esi + 1]
mov dword [ebx + 0xc], eax
movzx eax, byte [esi]
add esp, 0x2c
or eax, ebp
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 0x41fcf3
mov eax, dword [ebx + 0x18]
test eax, eax
mov dword [esp + 0x14], eax
je 0x41ff00
mov eax, dword [ebx + 0x30]
test eax, eax
jne 0x41fd00
cmp dword [esp + 0x10], ebp
mov ecx, dword [ebx + 0x44]
jne 0x41fc78
test ecx, ecx
jne 0x41ff10
mov esi, dword [ebx + 0x78]
test esi, esi
je 0x41fc94
cmp esi, dword [ebx + 8]
jge 0x41fc94
cmp esi, edi
jg 0x41fc94
cmp ebp, dword [esp + 0x10]
je 0x41fe90
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 0x41fe20
mov eax, dword [ebx + 0x38]
test eax, eax
je 0x41fe40
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 0x41fbf5
xor ebp, ebp
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 0x41fd02
sub edi, dword [esp + 0x14]
mov ebp, edx
jmp 0x41fc4d
xor ebp, ebp
test ecx, ecx
mov edi, 0x8000
mov eax, edx
cmove ecx, edi
mov edi, dword [esp + 0x10]
mov dword [esp + 0x18], esi
sub eax, edi
mov dword [esp + 0x1c], edi
mov edi, eax
mov eax, esi
mov esi, dword [esp + 0x10]
add ecx, edi
cmp ecx, eax
jge 0x41fd34
mov ecx, eax
mov esi, edx
sub ecx, edi
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x41fdf0
mov edi, dword [ebx + 0x30]
xor eax, eax
test edi, edi
jne 0x41fc13
mov edi, dword [ebx + 0x44]
test edi, edi
je 0x41fd5e
cmp dword [esp + 0x10], esi
je 0x41ff50
mov edi, dword [ebx + 0x78]
test edi, edi
je 0x41fd80
cmp edi, dword [ebx + 8]
jge 0x41fd80
cmp dword [esp + 0x18], edi
jl 0x41fd80
cmp esi, dword [esp + 0x1c]
je 0x41ff8f
mov dword [esp + 0x18], edi
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 0x41fe00
mov eax, dword [ebx + 0x38]
test eax, eax
je 0x41fdcb
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 esi, eax
jb 0x41fc0a
add esp, 0x2c
xor eax, eax
pop ebx
or eax, ebp
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 0x41fdb7
cmp eax, 0xdfb9b0bb
je 0x41fdf0
test eax, eax
jns 0x41fe82
mov dword [ebx + 0x48], eax
mov dword [ebx + 0x30], 1
mov esi, dword [ebx + 0xc]
mov eax, dword [ebx + 0x10]
jmp 0x41fdb7
cmp eax, 0xdfb9b0bb
je 0x41fe60
test eax, eax
jns 0x41fe72
mov dword [ebx + 0x30], 1
mov dword [ebx + 0x48], eax
mov ebp, dword [ebx + 0xc]
mov edx, dword [ebx + 0x10]
jmp 0x41fcd3
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 0x41fcd3
mov edi, eax
mov esi, eax
lea edx, [ebp + eax]
sar edi, 0x1f
jmp 0x41fcc1
mov ecx, eax
mov edx, eax
add eax, esi
sar ecx, 0x1f
jmp 0x41fda5
cmp ebp, dword [ebx + 0xc]
je 0x41fc92
mov dword [esp], esi
call fcn.0056e030
test eax, eax
mov ebp, eax
je 0x420003
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 0x41fff0
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 0x41fc94
mov eax, 0xffffffea
jmp 0x41fe2b
mov dword [ebx + 0x30], 1
xor ebp, ebp
jmp 0x41fd02
mov esi, dword [ebx + 0x40]
cmp edx, esi
jbe 0x41ff3a
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 0x41fef5
jmp 0x41fc78
mov eax, dword [ebx + 0x40]
cmp eax, edx
jae 0x41ff76
sub edx, eax
mov dword [esp + 4], eax
mov dword [esp + 8], edx
mov eax, dword [ebx + 0x3c]
mov dword [esp], eax
call edi
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 0x41fd5e
mov eax, 0xffffffea
jmp 0x41fe0b
cmp esi, dword [ebx + 0xc]
je 0x41fd7a
mov dword [esp], edi
call fcn.0056e030
test eax, eax
mov esi, eax
je 0x420026
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], edi
mov dword [ebx + 0x78], edi
mov dword [ebx + 0xb0], esi
mov dword [ebx + 0xc], esi
test edx, edx
je 0x41fffa
lea eax, [esi + edi]
mov dword [ebx + 0x34], 1
mov dword [esp + 0x18], edi
mov dword [ebx + 0x10], eax
mov ecx, dword [ebx + 0x18]
mov dword [ebx + 0x40], esi
test ecx, ecx
jne 0x41fd80
jmp 0x41ff85
mov dword [ebx + 0x10], ebp
mov edi, esi
jmp 0x41fee3
mov dword [ebx + 0x10], esi
mov dword [esp + 0x18], edi
jmp 0x41ffdf
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 0x41fee3
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 0x41ffdf