Function at 0x420710
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 edx, dword [ebx + 0x10]
mov eax, dword [ebx + 0xc]
cmp eax, edx
mov ebp, edx
jae 0x420780
lea ecx, [eax + 1]
mov dword [ebx + 0xc], ecx
movzx edi, byte [eax]
shl edi, 8
cmp ecx, edx
jae 0x420795
lea esi, [ecx + 1]
mov dword [ebx + 0xc], esi
movzx eax, byte [ecx]
or edi, eax
shl edi, 0x10
cmp esi, edx
mov dword [esp + 0x14], edi
jae 0x4207af
lea edi, [esi + 1]
mov dword [ebx + 0xc], edi
movzx esi, byte [esi]
shl esi, 8
cmp edi, ebp
jae 0x42085a
lea eax, [edi + 1]
mov dword [ebx + 0xc], eax
movzx eax, byte [edi]
or eax, esi
or eax, dword [esp + 0x14]
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, ebx
call fcn.00418cb0
mov edx, dword [ebx + 0x10]
mov eax, dword [ebx + 0xc]
cmp eax, edx
mov ebp, edx
jb 0x420727
xor edi, edi
mov eax, ebx
call fcn.00418cb0
mov edx, dword [ebx + 0x10]
mov ecx, dword [ebx + 0xc]
cmp ecx, edx
mov ebp, edx
jb 0x420737
shl edi, 0x10
mov dword [esp + 0x14], edi
mov eax, dword [ebx + 0x38]
mov ecx, 0x8000
mov ebp, edx
mov edi, dword [ebx + 8]
test eax, eax
cmove eax, ecx
mov ecx, dword [ebx + 4]
sub ebp, ecx
mov esi, ecx
add eax, ebp
cmp eax, edi
jl 0x420934
mov eax, dword [ebx + 0x18]
test eax, eax
je 0x420a80
mov ebp, dword [ebx + 0x30]
test ebp, ebp
jne 0x420940
mov ebp, dword [ebx + 0x44]
cmp ecx, esi
mov dword [esp + 0x18], ebp
jne 0x4207fb
test ebp, ebp
jne 0x420ad0
mov ebp, dword [ebx + 0x78]
test ebp, ebp
je 0x420815
cmp ebp, dword [ebx + 8]
jge 0x420815
cmp ebp, edi
jg 0x420815
cmp esi, ecx
je 0x420a0f
mov edi, ebp
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov edx, dword [ebx + 0x14]
mov dword [esp], edx
call eax
test eax, eax
jne 0x4209a0
mov edi, dword [ebx + 0x38]
test edi, edi
je 0x4209c0
mov ebp, 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], ebp
add dword [ebx + 0x68], edx
adc dword [ebx + 0x6c], ecx
cmp ebp, esi
ja 0x42074d
xor esi, esi
mov eax, dword [ebx + 0x38]
mov edx, 0x8000
mov ecx, dword [ebx + 4]
mov edi, dword [ebx + 8]
test eax, eax
cmove eax, edx
mov edx, ebp
mov dword [esp + 0x18], ecx
sub edx, ecx
mov ecx, edi
mov dword [esp + 0x1c], edi
add eax, edx
mov edi, dword [esp + 0x18]
cmp eax, ecx
jl 0x420925
mov edx, dword [ebx + 0x18]
test edx, edx
je 0x420970
mov ecx, dword [ebx + 0x30]
xor eax, eax
test ecx, ecx
jne 0x42076a
mov eax, dword [ebx + 0x44]
test eax, eax
je 0x4208b2
cmp dword [esp + 0x18], edi
je 0x420a91
mov ebp, dword [ebx + 0x78]
test ebp, ebp
je 0x4208d2
cmp ebp, dword [ebx + 8]
jge 0x4208d2
cmp dword [esp + 0x1c], ebp
jl 0x4208d2
cmp edi, dword [esp + 0x18]
je 0x420b10
mov dword [esp + 0x1c], ebp
mov eax, dword [esp + 0x1c]
mov dword [esp + 4], edi
mov dword [esp + 8], eax
mov eax, dword [ebx + 0x14]
mov dword [esp], eax
call edx
test eax, eax
jne 0x420980
mov eax, dword [ebx + 0x38]
test eax, eax
je 0x42094c
mov eax, edi
xor edx, edx
xor ecx, ecx
add dword [ebx + 0x28], edx
mov dword [ebx + 0xc], edi
adc dword [ebx + 0x2c], ecx
mov dword [ebx + 0x10], eax
add dword [ebx + 0x68], edx
adc dword [ebx + 0x6c], ecx
cmp edi, eax
jb 0x420761
xor eax, eax
or eax, esi
or eax, dword [esp + 0x14]
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret
mov edi, ecx
sub edi, edx
mov dword [esp + 0x1c], edi
mov edi, ebp
jmp 0x420889
sub edi, ebp
mov esi, edx
jmp 0x4207d2
mov ebp, edx
mov edi, dword [ebx + 0xc]
xor esi, esi
jmp 0x420759
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
lea esi, [esi]
mov dword [ebx + 0x30], 1
mov edi, dword [ebx + 0xc]
mov eax, dword [ebx + 0x10]
jmp 0x42090d
cmp eax, 0xdfb9b0bb
je 0x420970
test eax, eax
jns 0x4209f2
mov dword [ebx + 0x48], eax
mov dword [ebx + 0x30], 1
mov edi, dword [ebx + 0xc]
mov eax, dword [ebx + 0x10]
jmp 0x42090d
cmp eax, 0xdfb9b0bb
je 0x4209e0
test eax, eax
jns 0x420a00
mov dword [ebx + 0x30], 1
mov dword [ebx + 0x48], eax
mov esi, dword [ebx + 0xc]
mov ebp, dword [ebx + 0x10]
jmp 0x420850
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 esi, dword [ebx + 0xc]
mov ebp, dword [ebx + 0x10]
jmp 0x420850
mov ecx, eax
mov edx, eax
add eax, edi
sar ecx, 0x1f
jmp 0x4208fb
mov ecx, eax
mov edx, eax
lea ebp, [esi + eax]
sar ecx, 0x1f
jmp 0x42083e
mov esi, dword [ebx + 0xc]
cmp esi, ecx
je 0x420813
mov dword [esp], ebp
call fcn.0056e030
test eax, eax
mov esi, eax
je 0x420b83
mov eax, dword [ebx + 4]
mov dword [esp], eax
call sub.msvcrt.dll__aligned_free
mov eax, 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 eax, eax
je 0x420b70
lea eax, [esi + ebp]
mov dword [ebx + 0x34], 1
mov edi, ebp
mov dword [ebx + 0x10], eax
mov eax, dword [ebx + 0x18]
mov dword [ebx + 0x40], esi
test eax, eax
jne 0x420815
mov eax, 0xffffffea
jmp 0x4209ab
mov dword [ebx + 0x30], 1
mov esi, dword [ebx + 0xc]
mov ebp, edx
jmp 0x420850
mov ecx, dword [ebx + 0x40]
cmp ecx, ebp
jae 0x420ab7
sub ebp, ecx
mov dword [esp + 4], ecx
mov dword [esp + 8], ebp
mov edx, dword [ebx + 0x3c]
mov dword [esp], edx
call eax
mov dword [ebx + 0x3c], eax
mov eax, dword [ebx + 4]
mov edx, dword [ebx + 0x18]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x18]
test edx, edx
mov dword [ebx + 0x40], eax
jne 0x4208b2
mov eax, 0xffffffea
jmp 0x42098b
mov ebp, dword [ebx + 0x40]
cmp ebp, edx
jae 0x420af6
sub edx, ebp
mov dword [esp + 4], ebp
mov dword [esp + 8], edx
mov eax, dword [ebx + 0x3c]
mov dword [esp], eax
mov eax, dword [esp + 0x18]
call eax
mov ecx, dword [ebx + 4]
mov dword [ebx + 0x3c], eax
mov eax, dword [ebx + 0x18]
test eax, eax
mov dword [ebx + 0x40], ecx
je 0x420a71
jmp 0x4207fb
cmp edi, dword [ebx + 0xc]
je 0x4208ce
mov dword [esp], ebp
call fcn.0056e030
test eax, eax
mov edi, eax
je 0x420ba6
mov eax, dword [ebx + 4]
mov dword [esp], eax
call sub.msvcrt.dll__aligned_free
mov edx, dword [ebx + 0x34]
mov dword [ebx + 4], edi
mov dword [ebx + 8], ebp
mov dword [ebx + 0x78], ebp
mov dword [ebx + 0xb0], edi
mov dword [ebx + 0xc], edi
test edx, edx
je 0x420b7a
lea eax, [edi + ebp]
mov dword [ebx + 0x34], 1
mov dword [esp + 0x1c], ebp
mov dword [ebx + 0x10], eax
mov edx, dword [ebx + 0x18]
mov dword [ebx + 0x40], edi
test edx, edx
jne 0x4208d2
jmp 0x420ac6
mov dword [ebx + 0x10], esi
mov edi, ebp
jmp 0x420a63
mov dword [ebx + 0x10], edi
mov dword [esp + 0x1c], ebp
jmp 0x420b5c
mov dword [esp + 8], str.Failed_to_decrease_buffer_size_n
mov dword [esp + 4], 0x18
mov dword [esp], ebx
call fcn.0056b9c0
mov esi, dword [ebx + 4]
mov edi, dword [ebx + 0x78]
jmp 0x420a63
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 edi, dword [ebx + 4]
mov dword [esp + 0x1c], eax
jmp 0x420b5c