Function at 0x420050
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 ecx, dword [ebx + 0xc]
mov edx, dword [ebx + 0x10]
cmp ecx, edx
jae 0x4200b0
lea ebp, [ecx + 1]
mov dword [ebx + 0xc], ebp
movzx esi, byte [ecx]
shl esi, 8
cmp ebp, edx
mov dword [esp + 0x14], esi
jae 0x420173
mov edx, dword [ebx + 0x10]
lea edi, [ebp + 1]
mov dword [ebx + 0xc], edi
movzx esi, byte [ebp]
or esi, dword [esp + 0x14]
shl esi, 8
cmp edi, edx
jae 0x42023a
lea eax, [edi + 1]
mov dword [ebx + 0xc], eax
movzx eax, byte [edi]
add esp, 0x2c
or eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov esi, dword [ebx + 0x38]
mov ecx, dword [ebx + 4]
mov eax, 0x8000
mov edi, edx
test esi, esi
mov dword [esp + 0x18], ecx
cmovne eax, esi
sub edi, ecx
mov dword [esp + 0x14], edi
add eax, dword [esp + 0x14]
mov edi, dword [ebx + 8]
cmp eax, edi
mov ebp, edi
jl 0x420310
mov eax, dword [ebx + 0x18]
test eax, eax
je 0x4205b0
cmp dword [ebx + 0x30], 0
jne 0x420185
cmp dword [esp + 0x18], ecx
mov esi, dword [ebx + 0x44]
jne 0x420103
test esi, esi
jne 0x420640
mov esi, dword [ebx + 0x78]
test esi, esi
je 0x420120
cmp esi, dword [ebx + 8]
jge 0x420120
cmp esi, ebp
jg 0x420120
cmp ecx, dword [esp + 0x18]
je 0x4204ca
mov ebp, esi
nop
mov dword [esp + 4], ecx
mov dword [esp + 8], ebp
mov edx, dword [ebx + 0x14]
mov dword [esp + 0x14], ecx
mov dword [esp], edx
call eax
test eax, eax
mov ecx, dword [esp + 0x14]
jne 0x420390
mov esi, dword [ebx + 0x38]
test esi, esi
je 0x4203f4
mov edx, ecx
xor esi, esi
xor edi, edi
add dword [ebx + 0x28], esi
mov dword [ebx + 0xc], ecx
adc dword [ebx + 0x2c], edi
mov dword [ebx + 0x10], edx
add dword [ebx + 0x68], esi
adc dword [ebx + 0x6c], edi
cmp ecx, edx
jb 0x420065
mov dword [esp + 0x14], 0
mov eax, dword [ebx + 4]
mov esi, dword [ebx + 0x38]
mov edi, dword [ebx + 8]
mov dword [esp + 0x18], eax
mov eax, dword [ebx + 0x18]
jmp 0x42018d
mov dword [esp + 0x14], 0
mov ebp, dword [esp + 0x18]
test esi, esi
mov ecx, 0x8000
cmove esi, ecx
mov ecx, edx
sub ecx, ebp
mov dword [esp + 0x1c], ebp
add esi, ecx
cmp esi, edi
jge 0x4201ad
sub edi, ecx
mov ebp, edx
test eax, eax
je 0x420340
mov ecx, dword [ebx + 0x30]
test ecx, ecx
jne 0x420382
mov ecx, dword [ebx + 0x44]
test ecx, ecx
je 0x4201d1
cmp dword [esp + 0x18], ebp
je 0x420602
mov esi, dword [ebx + 0x78]
test esi, esi
je 0x4201f0
cmp esi, dword [ebx + 8]
jge 0x4201f0
cmp esi, edi
jg 0x4201f0
cmp ebp, dword [esp + 0x1c]
je 0x42053a
mov edi, esi
lea esi, [esi]
mov dword [esp + 8], edi
mov dword [esp + 4], ebp
mov edx, dword [ebx + 0x14]
mov dword [esp], edx
call eax
test eax, eax
jne 0x4203b4
mov eax, dword [ebx + 0x38]
test eax, eax
je 0x42031b
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 edx, ebp
ja 0x420080
mov esi, dword [esp + 0x14]
shl esi, 8
mov eax, dword [ebx + 0x38]
mov edi, dword [ebx + 4]
mov ecx, 0x8000
mov ebp, dword [ebx + 8]
test eax, eax
mov dword [esp + 0x14], edi
cmove eax, ecx
mov ecx, edx
sub ecx, edi
add eax, ecx
cmp eax, ebp
jl 0x420300
mov ecx, dword [ebx + 0x18]
test ecx, ecx
je 0x420370
xor eax, eax
cmp dword [ebx + 0x30], 0
jne 0x4200a2
mov eax, dword [ebx + 0x44]
test eax, eax
mov dword [esp + 0x18], eax
je 0x42028b
cmp dword [esp + 0x14], edi
je 0x4205c4
mov edx, dword [ebx + 0x78]
test edx, edx
je 0x4202b0
cmp edx, dword [ebx + 8]
jge 0x4202b0
cmp edx, ebp
jg 0x4202b0
cmp edi, dword [esp + 0x14]
je 0x42044f
mov ebp, edx
mov esi, esi
lea edi, [edi]
mov dword [esp + 8], ebp
mov dword [esp + 4], edi
mov eax, dword [ebx + 0x14]
mov dword [esp], eax
call ecx
test eax, eax
jne 0x4203d4
mov eax, dword [ebx + 0x38]
test eax, eax
je 0x420352
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 eax, edi
ja 0x420099
add esp, 0x2c
xor eax, eax
pop ebx
or eax, esi
pop esi
pop edi
pop ebp
ret
sub ebp, ecx
mov edi, edx
jmp 0x42025f
sub ebp, dword [esp + 0x14]
mov ecx, edx
jmp 0x4200dd
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 ebp, dword [ebx + 0xc]
mov edx, dword [ebx + 0x10]
jmp 0x42022b
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 dword [ebx + 0x30], 1
mov edi, dword [ebx + 0xc]
mov eax, dword [ebx + 0x10]
jmp 0x4202eb
mov edx, dword [ebx + 0x10]
mov edi, dword [ebx + 0xc]
xor esi, esi
jmp 0x42008a
cmp eax, 0xdfb9b0bb
je 0x420410
test eax, eax
jns 0x420422
mov dword [ebx + 0x30], 1
mov dword [ebx + 0x48], eax
mov ecx, dword [ebx + 0xc]
mov edx, dword [ebx + 0x10]
jmp 0x420163
cmp eax, 0xdfb9b0bb
je 0x420340
test eax, eax
jns 0x420431
mov dword [ebx + 0x30], 1
mov dword [ebx + 0x48], eax
mov ebp, dword [ebx + 0xc]
mov edx, dword [ebx + 0x10]
jmp 0x42022b
cmp eax, 0xdfb9b0bb
je 0x420370
test eax, eax
jns 0x420441
mov dword [ebx + 0x48], eax
mov dword [ebx + 0x30], 1
mov edi, dword [ebx + 0xc]
mov eax, dword [ebx + 0x10]
jmp 0x4202eb
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 [ebx + 0x30], 1
mov ecx, dword [ebx + 0xc]
mov edx, dword [ebx + 0x10]
jmp 0x420163
mov edi, eax
mov esi, eax
lea edx, [ecx + eax]
sar edi, 0x1f
jmp 0x420151
mov edi, eax
mov esi, eax
lea edx, [ebp + eax]
sar edi, 0x1f
jmp 0x420219
mov ecx, eax
mov edx, eax
add eax, edi
sar ecx, 0x1f
jmp 0x4202d9
cmp edi, dword [ebx + 0xc]
je 0x4202a5
mov dword [esp], edx
mov dword [esp + 0x14], edx
call fcn.0056e030
test eax, eax
mov edi, eax
je 0x4206a0
mov eax, dword [ebx + 4]
mov dword [esp], eax
call sub.msvcrt.dll__aligned_free
mov ecx, dword [ebx + 0x34]
mov edx, dword [esp + 0x14]
mov dword [ebx + 4], edi
mov dword [ebx + 0xb0], edi
mov dword [ebx + 0xc], edi
test ecx, ecx
mov dword [ebx + 8], edx
mov dword [ebx + 0x78], edx
je 0x420682
lea eax, [edi + edx]
mov dword [ebx + 0x34], 1
mov ebp, edx
mov dword [ebx + 0x10], eax
mov ecx, dword [ebx + 0x18]
mov dword [ebx + 0x40], edi
test ecx, ecx
jne 0x4202b0
mov esi, esi
lea edi, [edi]
mov eax, 0xffffffea
jmp 0x4203df
cmp ecx, dword [ebx + 0xc]
je 0x42011d
mov dword [esp], esi
call fcn.0056e030
test eax, eax
je 0x4206e6
mov dword [esp + 0x14], eax
mov eax, dword [ebx + 4]
mov dword [esp], eax
call sub.msvcrt.dll__aligned_free
mov edi, dword [ebx + 0x34]
mov ecx, dword [esp + 0x14]
mov dword [ebx + 8], esi
mov dword [ebx + 0x78], esi
test edi, edi
mov dword [ebx + 4], ecx
mov dword [ebx + 0xb0], ecx
mov dword [ebx + 0xc], ecx
je 0x420696
lea eax, [ecx + esi]
mov dword [ebx + 0x34], 1
mov ebp, esi
mov dword [ebx + 0x10], eax
mov eax, dword [ebx + 0x18]
mov dword [ebx + 0x40], ecx
test eax, eax
jne 0x420120
mov eax, 0xffffffea
jmp 0x42039f
cmp ebp, dword [ebx + 0xc]
je 0x4201eb
mov dword [esp], esi
call fcn.0056e030
test eax, eax
mov ebp, eax
je 0x4206c3
mov eax, dword [ebx + 4]
mov dword [esp], eax
call sub.msvcrt.dll__aligned_free
mov edx, 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 edx, edx
je 0x42068c
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
jne 0x4201f0
nop
lea esi, [esi]
mov eax, 0xffffffea
jmp 0x4203bf
mov dword [ebx + 0x30], 1
mov dword [esp + 0x14], 0
jmp 0x42018d
mov eax, dword [ebx + 0x40]
cmp eax, edx
jae 0x4205ee
sub edx, eax
mov dword [esp + 4], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 8], edx
mov edx, dword [ebx + 0x3c]
mov dword [esp], edx
call eax
mov dword [ebx + 0x3c], eax
mov eax, dword [ebx + 4]
mov ecx, dword [ebx + 0x18]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x14]
test ecx, ecx
mov dword [ebx + 0x40], eax
je 0x4204c0
jmp 0x42028b
mov esi, dword [ebx + 0x40]
cmp esi, edx
jae 0x420628
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 + 0x1c], eax
mov eax, dword [ebx + 0x18]
mov edx, dword [esp + 0x1c]
test eax, eax
mov dword [ebx + 0x40], edx
je 0x4205a0
jmp 0x4201d1
mov edi, dword [ebx + 0x40]
cmp edx, edi
jbe 0x42066e
sub edx, edi
mov dword [esp + 4], edi
mov dword [esp + 0x14], ecx
mov dword [esp + 8], edx
mov eax, dword [ebx + 0x3c]
mov dword [esp], eax
call esi
mov dword [ebx + 0x3c], eax
mov eax, dword [ebx + 4]
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x18], eax
mov eax, dword [ebx + 0x18]
mov edx, dword [esp + 0x18]
test eax, eax
mov dword [ebx + 0x40], edx
je 0x420530
jmp 0x420103
mov dword [ebx + 0x10], edi
mov ebp, edx
jmp 0x4204a9
mov dword [ebx + 0x10], ebp
mov edi, esi
jmp 0x42058d
mov dword [ebx + 0x10], ecx
mov ebp, esi
jmp 0x420522
mov dword [esp + 8], str.Failed_to_decrease_buffer_size_n
mov dword [esp + 4], 0x18
mov dword [esp], ebx
call fcn.0056b9c0
mov edi, dword [ebx + 4]
mov ebp, dword [ebx + 0x78]
jmp 0x4204a9
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 0x42058d
mov dword [esp + 8], str.Failed_to_decrease_buffer_size_n
mov dword [esp + 4], 0x18
mov dword [esp], ebx
call fcn.0056b9c0
mov ecx, dword [ebx + 4]
mov ebp, dword [ebx + 0x78]
jmp 0x420522