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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x3c
mov ebp, dword [esp + 0x58]
mov edi, dword [esp + 0x50]
test ebp, ebp
jle 0x41dde2
mov eax, dword [esp + 0x58]
mov edx, dword [edi + 0xc]
mov dword [esp + 0x20], eax
mov eax, dword [edi + 0x10]
mov esi, dword [esp + 0x20]
mov dword [esp + 0x28], edx
mov ebx, eax
mov dword [esp + 0x24], eax
sub ebx, edx
cmp ebx, esi
cmovg ebx, esi
test ebx, ebx
je 0x41da69
mov esi, dword [edi + 0x34]
test esi, esi
je 0x41dbc0
mov ebx, dword [edi + 0x60]
mov ecx, dword [edi + 0x18]
test ebx, ebx
mov dword [esp + 0x1c], ecx
jne 0x41da80
mov ebx, dword [edi + 8]
cmp ebx, dword [esp + 0x20]
jge 0x41da8e
mov ecx, dword [edi + 0x44]
test ecx, ecx
je 0x41dcb0
mov ebx, dword [edi + 8]
mov ecx, dword [edi + 0x38]
mov ebp, dword [edi + 4]
mov esi, 0x8000
test ecx, ecx
mov dword [esp + 0x2c], ebp
cmove ecx, esi
mov esi, eax
sub esi, ebp
add ecx, esi
cmp ecx, ebx
jge 0x41dab0
sub ebx, esi
mov ebp, eax
cmp eax, edx
ja 0x41dac0
mov esi, dword [esp + 0x1c]
test esi, esi
je 0x41dd01
mov ecx, dword [edi + 0x30]
test ecx, ecx
jne 0x41db45
cmp dword [esp + 0x2c], ebp
mov edx, dword [edi + 0x44]
jne 0x41dad8
test edx, edx
jne 0x41dd10
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x41dca0
mov edx, dword [edi + 0x78]
test edx, edx
je 0x41db00
cmp edx, dword [edi + 8]
jge 0x41db00
cmp edx, ebx
jle 0x41dc30
nop
lea esi, [esi]
mov dword [esp + 8], ebx
mov dword [esp + 4], ebp
mov eax, dword [edi + 0x14]
mov dword [esp], eax
mov eax, dword [esp + 0x1c]
call eax
test eax, eax
jne 0x41db94
mov ebx, dword [edi + 0x38]
test ebx, ebx
je 0x41dbf2
mov eax, ebp
xor ecx, ecx
xor ebx, ebx
add dword [edi + 0x28], ecx
mov dword [edi + 0xc], ebp
mov edx, ebp
adc dword [edi + 0x2c], ebx
mov dword [edi + 0x10], eax
add dword [edi + 0x68], ecx
mov dword [esp + 0x24], eax
adc dword [edi + 0x6c], ebx
mov dword [esp + 0x28], ebp
mov ecx, dword [esp + 0x24]
cmp dword [esp + 0x28], ecx
jne 0x41da42
mov eax, dword [esp + 0x20]
cmp dword [esp + 0x58], eax
jne 0x41db84
mov eax, dword [edi + 0x48]
test eax, eax
jne 0x41db8c
mov edx, dword [edi + 0x30]
test edx, edx
je 0x41db84
mov eax, edi
mov dword [edi + 0x30], 0
call fcn.00418cb0
mov eax, dword [edi + 0x30]
test eax, eax
jne 0x41ddd8
mov eax, dword [esp + 0x58]
sub eax, dword [esp + 0x20]
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
cmp eax, 0xdfb9b0bb
je 0x41dc10
test eax, eax
jns 0x41dd70
mov dword [edi + 0x48], eax
mov edx, dword [edi + 0xc]
mov eax, dword [edi + 0x10]
mov dword [edi + 0x30], 1
mov dword [esp + 0x28], edx
mov dword [esp + 0x24], eax
jmp 0x41db45
mov eax, dword [esp + 0x54]
mov dword [esp + 4], edx
mov dword [esp + 8], ebx
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov edx, dword [edi + 0xc]
add dword [esp + 0x54], ebx
sub dword [esp + 0x20], ebx
add edx, ebx
mov dword [edi + 0xc], edx
mov ecx, dword [esp + 0x20]
test ecx, ecx
jg 0x41da42
jmp 0x41db84
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
nop
mov eax, dword [edi + 0x10]
mov edx, dword [edi + 0xc]
mov dword [edi + 0x30], 1
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], edx
jmp 0x41db45
cmp ebp, dword [esp + 0x2c]
jne 0x41dd80
cmp ebp, dword [edi + 0xc]
je 0x41dd80
mov dword [esp], edx
mov dword [esp + 0x1c], edx
call fcn.0056e030
test eax, eax
mov ebp, eax
je 0x41ddef
mov eax, dword [edi + 4]
mov dword [esp], eax
call sub.msvcrt.dll__aligned_free
mov esi, dword [edi + 0x34]
mov edx, dword [esp + 0x1c]
mov dword [edi + 4], ebp
mov dword [edi + 0xb0], ebp
mov dword [edi + 0xc], ebp
test esi, esi
mov dword [edi + 8], edx
mov dword [edi + 0x78], edx
jne 0x41ddc3
mov dword [edi + 0x10], ebp
mov ebx, edx
mov eax, dword [edi + 0x18]
mov dword [edi + 0x40], ebp
test eax, eax
mov dword [esp + 0x1c], eax
jne 0x41db00
lea esi, [esi]
mov eax, 0xffffffea
jmp 0x41dba3
mov edx, dword [esp + 0x1c]
test edx, edx
je 0x41ddaf
mov eax, dword [esp + 0x20]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 4], eax
mov eax, dword [edi + 0x14]
mov dword [esp], eax
call edx
test eax, eax
jne 0x41dd50
mov ebp, dword [edi + 0x38]
test ebp, ebp
je 0x41dd87
xor ecx, ecx
xor ebx, ebx
mov edx, dword [edi + 4]
add dword [edi + 0x28], ecx
adc dword [edi + 0x2c], ebx
add dword [edi + 0x68], ecx
adc dword [edi + 0x6c], ebx
mov dword [edi + 0xc], edx
mov dword [edi + 0x10], edx
jmp 0x41dbe4
mov dword [edi + 0x30], 1
jmp 0x41db45
mov ecx, dword [edi + 0x40]
cmp eax, ecx
jbe 0x41dd3a
sub eax, ecx
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
mov eax, dword [edi + 0x3c]
mov dword [esp], eax
call edx
mov dword [edi + 0x3c], eax
mov eax, dword [edi + 4]
mov dword [esp + 0x2c], eax
mov eax, dword [edi + 0x18]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x2c]
mov dword [edi + 0x40], eax
jmp 0x41dad8
cmp eax, 0xdfb9b0bb
je 0x41dda3
test eax, eax
js 0x41ddb4
mov ebx, eax
mov ecx, eax
sub dword [esp + 0x20], eax
sar ebx, 0x1f
add dword [esp + 0x54], eax
jmp 0x41dce7
mov ebx, eax
mov ecx, eax
add eax, ebp
sar ebx, 0x1f
jmp 0x41db29
mov ebx, edx
jmp 0x41db00
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 dword [edi + 0x30], 1
jmp 0x41db53
mov eax, 0xffffffea
mov dword [edi + 0x30], 1
mov dword [edi + 0x48], eax
jmp 0x41db53
lea eax, [ebp + edx]
mov dword [edi + 0x34], 1
mov ebx, edx
mov dword [edi + 0x10], eax
jmp 0x41dc8a
mov eax, 0xdfb9b0bb
jmp 0x41db8c
mov eax, dword [esp + 0x58]
mov dword [esp + 0x20], eax
jmp 0x41db5d
mov dword [esp + 8], str.Failed_to_decrease_buffer_size_n
mov dword [esp + 4], 0x18
mov dword [esp], edi
call fcn.0056b9c0
mov ebp, dword [edi + 4]
mov ebx, dword [edi + 0x78]
jmp 0x41dc8a