Function at 0x4ade00
Capabilities:
Check for peb beingdebugged flag

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
test edi, edi
je 0x4ae72a
cmp dword [edi + 0x20], 0
je 0x4ae72a
cmp dword [edi + 0x24], 0
je 0x4ae72a
mov esi, dword [edi + 0x1c]
test esi, esi
je 0x4ae72a
cmp dword [esi], edi
jne 0x4ae72a
mov ebx, dword [esi + 0x20]
cmp ebx, 0x2a
je 0x4ade6d
cmp ebx, 0x39
je 0x4ade6d
cmp ebx, 0x45
je 0x4ade6d
cmp ebx, 0x49
je 0x4ade6d
cmp ebx, 0x5b
je 0x4ade6d
cmp ebx, 0x67
je 0x4ade6d
cmp ebx, 0x71
je 0x4ade6d
cmp ebx, 0x29a
jne 0x4ae72a
mov eax, dword [ebp + 0xc]
cmp eax, 5
ja 0x4ae72a
cmp dword [edi + 0xc], 0
je 0x4ae722
cmp dword [edi + 4], 0
je 0x4ade92
cmp dword [edi], 0
je 0x4ae722
cmp ebx, 0x29a
jne 0x4adea3
cmp eax, 4
jne 0x4ae722
cmp dword [edi + 0x10], 0
je 0x4adf16
cmp dword [esi + 0x10], 0
mov edx, dword [esi + 0x24]
mov dword [esi + 0x24], eax
je 0x4adecd
push edi
call fcn.004aee40
add esp, 4
cmp dword [edi + 0x10], 0
je 0x4ae712
mov eax, dword [esi + 0x20]
jmp 0x4adf05
cmp dword [edi + 4], 0
mov eax, ebx
jne 0x4adf05
xor eax, eax
mov ecx, 9
cmp edx, 4
mov dword [ebp + 8], ecx
cmovg eax, ecx
add edx, edx
sub edx, eax
xor ecx, ecx
mov eax, dword [ebp + 0xc]
cmp eax, 4
cmovg ecx, dword [ebp + 8]
add eax, eax
sub eax, ecx
cmp eax, edx
mov eax, ebx
jg 0x4adf05
cmp dword [ebp + 0xc], 4
jne 0x4adf16
cmp eax, 0x29a
jne 0x4adf2a
cmp dword [edi + 4], 0
je 0x4adfff
mov eax, dword [str.buffer_error]
mov dword [edi + 0x18], eax
mov eax, 0xfffffffb
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, 0x2a
jne 0x4adfff
cmp dword [esi + 0x14], 0
jne 0x4adf45
mov dword [esi + 0x20], 0x71
jmp 0x4adfff
mov edx, dword [esi + 0x34]
shl edx, 0xc
add edx, 0xffff8800
cmp dword [esi + 0x8c], 2
jge 0x4adf8a
mov eax, dword [esi + 0x88]
cmp eax, 2
jl 0x4adf8a
cmp eax, 6
jge 0x4adf74
mov eax, 0x40
lea ecx, [eax + 0x20]
jmp 0x4adf91
jne 0x4adf80
mov eax, 0x80
lea ecx, [eax + 0x20]
jmp 0x4adf91
mov eax, 0xc0
lea ecx, [eax + 0x20]
jmp 0x4adf91
xor eax, eax
mov ecx, 0x20
cmp dword [esi + 0x68], 0
cmove ecx, eax
mov eax, 0x8421085
or ecx, edx
mul ecx
sub ecx, edx
shr ecx, 1
add ecx, edx
shr ecx, 4
inc ecx
mov eax, ecx
shl eax, 5
sub eax, ecx
mov ecx, dword [esi + 0x10]
mov dh, al
mov dl, ah
mov eax, dword [esi + 4]
mov word [ecx + eax], dx
mov edx, dword [esi + 0x10]
add edx, 2
cmp dword [esi + 0x68], 0
mov dword [esi + 0x10], edx
je 0x4adfde
mov ecx, dword [edi + 0x30]
mov eax, dword [esi + 4]
bswap ecx
mov dword [edx + eax], ecx
add dword [esi + 0x10], 4
mov dword [edi + 0x30], 1
push edi
mov dword [esi + 0x20], 0x71
call fcn.004aee40
add esp, 4
cmp dword [esi + 0x10], 0
jne 0x4ae712
mov eax, dword [esi + 0x20]
cmp eax, 0x39
jne 0x4ae0d2
mov eax, dword fs:[0x2c]
mov ecx, dword [0x6a3d5c]
mov ecx, dword [eax + ecx*4]
lea eax, [esi + 0xa0]
push eax
mov eax, dword [ecx + 0x30]
call eax
mov ecx, dword [esi + 0x10]
add esp, 4
mov eax, dword [esi + 4]
mov byte [ecx + eax], 0x1f
inc dword [esi + 0x10]
mov ecx, dword [esi + 0x10]
mov eax, dword [esi + 4]
mov byte [ecx + eax], 0x8b
inc dword [esi + 0x10]
mov ecx, dword [esi + 0x10]
mov eax, dword [esi + 4]
mov byte [ecx + eax], 8
mov ebx, dword [esi + 0x10]
mov edx, dword [esi + 0x1c]
inc ebx
mov dword [esi + 0x10], ebx
test edx, edx
jne 0x4ae221
mov eax, dword [esi + 4]
mov dword [ebx + eax], edx
add dword [esi + 0x10], 4
mov ecx, dword [esi + 0x10]
mov eax, dword [esi + 4]
mov byte [ecx + eax], dl
mov edx, dword [esi + 0x10]
mov eax, dword [esi + 0x88]
inc edx
mov dword [esi + 0x10], edx
cmp eax, 9
jne 0x4ae08b
mov cl, 2
jmp 0x4ae09f
cmp dword [esi + 0x8c], 2
jge 0x4ae09d
cmp eax, 2
jl 0x4ae09d
xor cl, cl
jmp 0x4ae09f
mov cl, 4
mov eax, dword [esi + 4]
push edi
mov byte [edx + eax], cl
inc dword [esi + 0x10]
mov ecx, dword [esi + 0x10]
mov eax, dword [esi + 4]
mov byte [ecx + eax], 0xa
inc dword [esi + 0x10]
mov dword [esi + 0x20], 0x71
call fcn.004aee40
add esp, 4
cmp dword [esi + 0x10], 0
jne 0x4ae712
mov eax, dword [esi + 0x20]
cmp eax, 0x45
jne 0x4ae300
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x10], 0
je 0x4ae215
movzx edx, word [eax + 0x14]
sub edx, dword [esi + 0x18]
mov ebx, dword [esi + 0x10]
mov ecx, dword [esi + 0xc]
mov dword [ebp + 8], edx
lea eax, [ebx + edx]
cmp eax, ecx
jbe 0x4ae1c6
mov eax, ebx
mov dword [ebp - 4], ebx
sub ecx, eax
mov eax, dword [esi + 0x1c]
push ecx
mov dword [ebp - 8], ecx
mov eax, dword [eax + 0x10]
add eax, dword [esi + 0x18]
push eax
mov eax, dword [esi + 4]
add eax, dword [ebp - 4]
push eax
call fcn.005d67e0
mov eax, dword [esi + 0x1c]
add esp, 0xc
mov ecx, dword [esi + 0xc]
mov dword [esi + 0x10], ecx
cmp dword [eax + 0x2c], 0
je 0x4ae151
cmp ecx, ebx
jbe 0x4ae151
mov eax, dword [esi + 4]
sub ecx, ebx
push ecx
add eax, ebx
push eax
push dword [edi + 0x30]
call fcn.004adcf0
add esp, 0xc
mov dword [edi + 0x30], eax
mov eax, dword [ebp - 8]
add dword [esi + 0x18], eax
mov ebx, dword [edi + 0x1c]
push ebx
mov dword [ebp - 4], ebx
call fcn.004b4f60
mov eax, dword [ebx + 0x10]
add esp, 4
mov ebx, dword [edi + 0x10]
cmp eax, ebx
cmovbe ebx, eax
test ebx, ebx
je 0x4ae1a1
mov eax, dword [ebp - 4]
push ebx
push dword [eax + 8]
push dword [edi + 0xc]
call fcn.005d67e0
mov ecx, dword [ebp - 4]
add esp, 0xc
add dword [edi + 0xc], ebx
add dword [ecx + 8], ebx
add dword [edi + 0x14], ebx
sub dword [edi + 0x10], ebx
sub dword [ecx + 0x10], ebx
jne 0x4ae1a1
mov eax, dword [ecx + 4]
mov dword [ecx + 8], eax
cmp dword [esi + 0x10], 0
jne 0x4ae712
mov edx, dword [ebp + 8]
xor eax, eax
sub edx, dword [ebp - 8]
xor ebx, ebx
mov ecx, dword [esi + 0xc]
mov dword [ebp + 8], edx
mov dword [ebp - 4], eax
cmp edx, ecx
ja 0x4ae108
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x18]
push edx
mov eax, dword [eax + 0x10]
add eax, ecx
push eax
mov eax, dword [esi + 4]
add eax, ebx
push eax
call fcn.005d67e0
mov ecx, dword [ebp + 8]
add esp, 0xc
mov eax, dword [esi + 0x1c]
add ecx, dword [esi + 0x10]
mov dword [esi + 0x10], ecx
cmp dword [eax + 0x2c], 0
je 0x4ae20e
cmp ecx, ebx
jbe 0x4ae20e
mov eax, dword [esi + 4]
sub ecx, ebx
push ecx
add eax, ebx
push eax
push dword [edi + 0x30]
call fcn.004adcf0
add esp, 0xc
mov dword [edi + 0x30], eax
mov dword [esi + 0x18], 0
mov dword [esi + 0x20], 0x49
jmp 0x4ae309
mov ecx, dword [edx + 0x24]
mov eax, dword [edx + 0x2c]
neg ecx
sbb cl, cl
and cl, 0x10
neg eax
sbb al, al
and al, 2
add cl, al
mov eax, dword [edx + 0x1c]
neg eax
sbb al, al
and al, 8
add cl, al
mov eax, dword [edx + 0x10]
neg eax
sbb al, al
and al, 4
add cl, al
cmp dword [edx], 0
setne al
add cl, al
mov eax, dword [esi + 4]
mov byte [ebx + eax], cl
inc dword [esi + 0x10]
mov edx, dword [esi + 0x10]
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 4]
mov eax, dword [eax + 4]
mov dword [edx + ecx], eax
mov edx, dword [esi + 0x10]
mov eax, dword [esi + 0x88]
add edx, 4
mov dword [esi + 0x10], edx
cmp eax, 9
jne 0x4ae284
mov cl, 2
jmp 0x4ae298
cmp dword [esi + 0x8c], 2
jge 0x4ae296
cmp eax, 2
jl 0x4ae296
xor cl, cl
jmp 0x4ae298
mov cl, 4
mov eax, dword [esi + 4]
mov byte [edx + eax], cl
inc dword [esi + 0x10]
mov eax, dword [esi + 0x1c]
mov edx, dword [esi + 0x10]
mov ecx, dword [esi + 4]
mov al, byte [eax + 0xc]
mov byte [edx + ecx], al
mov edx, dword [esi + 0x10]
mov eax, dword [esi + 0x1c]
inc edx
mov dword [esi + 0x10], edx
cmp dword [eax + 0x10], 0
je 0x4ae2d5
mov ecx, dword [esi + 4]
mov ax, word [eax + 0x14]
mov word [edx + ecx], ax
add dword [esi + 0x10], 2
mov edx, dword [esi + 0x10]
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], 0
je 0x4ae2ed
push edx
push dword [esi + 4]
push dword [edi + 0x30]
call fcn.004adcf0
add esp, 0xc
mov dword [edi + 0x30], eax
mov dword [esi + 0x18], 0
mov dword [esi + 0x20], 0x45
jmp 0x4ae0db
cmp eax, 0x49
jne 0x4ae40c
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x1c], 0
je 0x4ae403
mov ecx, dword [esi + 0x10]
mov ebx, ecx
mov dword [ebp + 8], ecx
nop
cmp ebx, dword [esi + 0xc]
jne 0x4ae3aa
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], 0
je 0x4ae34d
cmp ebx, ecx
jbe 0x4ae34d
mov eax, dword [esi + 4]
sub ebx, ecx
push ebx
add eax, ecx
push eax
push dword [edi + 0x30]
call fcn.004adcf0
add esp, 0xc
mov dword [edi + 0x30], eax
mov ebx, dword [edi + 0x1c]
push ebx
mov dword [ebp + 8], ebx
call fcn.004b4f60
mov eax, dword [ebx + 0x10]
add esp, 4
mov ebx, dword [edi + 0x10]
cmp eax, ebx
cmovbe ebx, eax
test ebx, ebx
je 0x4ae397
mov eax, dword [ebp + 8]
push ebx
push dword [eax + 8]
push dword [edi + 0xc]
call fcn.005d67e0
mov ecx, dword [ebp + 8]
add esp, 0xc
add dword [edi + 0xc], ebx
add dword [ecx + 8], ebx
add dword [edi + 0x14], ebx
sub dword [edi + 0x10], ebx
sub dword [ecx + 0x10], ebx
jne 0x4ae397
mov eax, dword [ecx + 4]
mov dword [ecx + 8], eax
cmp dword [esi + 0x10], 0
jne 0x4ae712
mov dword [ebp + 8], 0
xor ebx, ebx
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x18]
mov eax, dword [eax + 0x1c]
mov dl, byte [ecx + eax]
lea eax, [ecx + 1]
mov dword [esi + 0x18], eax
mov eax, dword [esi + 4]
mov byte [ebx + eax], dl
mov ebx, dword [esi + 0x10]
inc ebx
mov dword [esi + 0x10], ebx
test dl, dl
je 0x4ae3d5
mov ecx, dword [ebp + 8]
jmp 0x4ae320
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], 0
je 0x4ae3fc
mov ecx, dword [ebp + 8]
cmp ebx, ecx
jbe 0x4ae3fc
mov eax, dword [esi + 4]
sub ebx, ecx
push ebx
add eax, ecx
push eax
push dword [edi + 0x30]
call fcn.004adcf0
add esp, 0xc
mov dword [edi + 0x30], eax
mov dword [esi + 0x18], 0
mov dword [esi + 0x20], 0x5b
jmp 0x4ae415
cmp eax, 0x5b
jne 0x4ae515
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x24], 0
je 0x4ae50c
mov ecx, dword [esi + 0x10]
mov ebx, ecx
mov dword [ebp + 8], ecx
nop word [eax + eax]
cmp ebx, dword [esi + 0xc]
jne 0x4ae4ba
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], 0
je 0x4ae45d
cmp ebx, ecx
jbe 0x4ae45d
mov eax, dword [esi + 4]
sub ebx, ecx
push ebx
add eax, ecx
push eax
push dword [edi + 0x30]
call fcn.004adcf0
add esp, 0xc
mov dword [edi + 0x30], eax
mov ebx, dword [edi + 0x1c]
push ebx
mov dword [ebp + 8], ebx
call fcn.004b4f60
mov eax, dword [ebx + 0x10]
add esp, 4
mov ebx, dword [edi + 0x10]
cmp eax, ebx
cmovbe ebx, eax
test ebx, ebx
je 0x4ae4a7
mov eax, dword [ebp + 8]
push ebx
push dword [eax + 8]
push dword [edi + 0xc]
call fcn.005d67e0
mov ecx, dword [ebp + 8]
add esp, 0xc
add dword [edi + 0xc], ebx
add dword [ecx + 8], ebx
add dword [edi + 0x14], ebx
sub dword [edi + 0x10], ebx
sub dword [ecx + 0x10], ebx
jne 0x4ae4a7
mov eax, dword [ecx + 4]
mov dword [ecx + 8], eax
cmp dword [esi + 0x10], 0
jne 0x4ae712
mov dword [ebp + 8], 0
xor ebx, ebx
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x18]
mov eax, dword [eax + 0x24]
mov dl, byte [ecx + eax]
lea eax, [ecx + 1]
mov dword [esi + 0x18], eax
mov eax, dword [esi + 4]
mov byte [ebx + eax], dl
mov ebx, dword [esi + 0x10]
inc ebx
mov dword [esi + 0x10], ebx
test dl, dl
je 0x4ae4e5
mov ecx, dword [ebp + 8]
jmp 0x4ae430
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], 0
je 0x4ae50c
mov ecx, dword [ebp + 8]
cmp ebx, ecx
jbe 0x4ae50c
mov eax, dword [esi + 4]
sub ebx, ecx
push ebx
add eax, ecx
push eax
push dword [edi + 0x30]
call fcn.004adcf0
add esp, 0xc
mov dword [edi + 0x30], eax
mov dword [esi + 0x20], 0x67
jmp 0x4ae51a
cmp eax, 0x67
jne 0x4ae58c
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], 0
je 0x4ae572
mov edx, dword [esi + 0x10]
lea eax, [edx + 2]
cmp eax, dword [esi + 0xc]
jbe 0x4ae542
push edi
call fcn.004aee40
mov edx, dword [esi + 0x10]
add esp, 4
test edx, edx
jne 0x4ae712
mov ecx, dword [esi + 4]
mov ax, word [edi + 0x30]
mov word [edx + ecx], ax
mov eax, dword [0x6a3d5c]
mov ecx, dword fs:[0x2c]
add dword [esi + 0x10], 2
mov ecx, dword [ecx + eax*4]
lea eax, [esi + 0xa0]
push eax
mov eax, dword [ecx + 0x30]
call eax
add esp, 4
push edi
mov dword [esi + 0x20], 0x71
call fcn.004aee40
add esp, 4
cmp dword [esi + 0x10], 0
jne 0x4ae712
cmp dword [edi + 4], 0
mov ebx, dword [ebp + 0xc]
jne 0x4ae5b0
cmp dword [esi + 0x3c], 0
jne 0x4ae5b0
test ebx, ebx
je 0x4ae719
cmp dword [esi + 0x20], 0x29a
je 0x4ae682
mov eax, dword [esi + 0x88]
push ebx
push esi
test eax, eax
jne 0x4ae5c3
call fcn.004b1a70
jmp 0x4ae5ed
mov ecx, dword [esi + 0x8c]
cmp ecx, 2
jne 0x4ae5d5
call fcn.004b5590
jmp 0x4ae5ed
cmp ecx, 3
jne 0x4ae5e1
call fcn.004b52f0
jmp 0x4ae5ed
lea eax, [eax + eax*2]
mov eax, dword [eax*4 + 0x60d4f0]
call eax
add esp, 8
cmp eax, 2
je 0x4ae5fa
cmp eax, 3
jne 0x4ae601
mov dword [esi + 0x20], 0x29a
test eax, eax
je 0x4ae70c
cmp eax, 2
je 0x4ae70c
cmp eax, 1
jne 0x4ae682
cmp ebx, eax
jne 0x4ae626
push esi
call fcn.004b4e30
add esp, 4
jmp 0x4ae66f
cmp ebx, 5
je 0x4ae66f
push 0
push 0
push 0
push esi
call fcn.004b5280
add esp, 0x10
cmp ebx, 3
jne 0x4ae66f
push 0x20000
push 0
push dword [esi + 0x50]
call fcn.005d6d60
add esp, 0xc
cmp dword [esi + 0x3c], 0
jne 0x4ae66f
mov dword [esi + 0x68], 0
mov dword [esi + 0x58], 0
mov dword [esi + 0x1714], 0
push edi
call fcn.004aee40
add esp, 4
cmp dword [edi + 0x10], 0
je 0x4ae712
cmp ebx, 4
jne 0x4ae719
mov eax, dword [esi + 0x14]
cmp eax, 2
jne 0x4ae6d1
mov eax, dword [0x6a3d5c]
mov ecx, dword fs:[0x2c]
mov ecx, dword [ecx + eax*4]
lea eax, [esi + 0xa0]
push eax
mov eax, dword [ecx + 0x3c]
call eax
mov dword [edi + 0x30], eax
add esp, 4
mov edx, dword [esi + 0x10]
mov ecx, dword [esi + 4]
mov dword [edx + ecx], eax
add dword [esi + 0x10], ebx
mov edx, dword [esi + 0x10]
mov ecx, dword [esi + 4]
mov eax, dword [edi + 8]
mov dword [edx + ecx], eax
jmp 0x4ae6e4
cmp eax, 1
jne 0x4ae6e8
mov edx, dword [edi + 0x30]
mov ecx, dword [esi + 4]
mov eax, dword [esi + 0x10]
bswap edx
mov dword [ecx + eax], edx
add dword [esi + 0x10], 4
push edi
call fcn.004aee40
mov eax, dword [esi + 0x14]
add esp, 4
test eax, eax
jle 0x4ae6fd
neg eax
mov dword [esi + 0x14], eax
xor eax, eax
cmp dword [esi + 0x10], eax
pop edi
pop esi
sete al
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [edi + 0x10], 0
jne 0x4ae719
mov dword [esi + 0x24], 0xffffffff
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [str.stream_error]
mov dword [edi + 0x18], eax
pop edi
pop esi
mov eax, 0xfffffffe
pop ebx
mov esp, ebp
pop ebp
ret