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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x1c
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0x10], 1
mov ebx, dword [ebp + 8]
mov esi, dword [ebp + 0x14]
test eax, eax
je 0x50b760
cmp byte [eax], 0x31
setne al
cmp dword [ebp + 0x24], 0x38
setne dl
or eax, edx
test al, 1
jne 0x50b760
test ebx, ebx
mov eax, 0xfffffffe
je 0x50b765
mov dword [ebx + 0x18], 0
mov ecx, dword [ebx + 0x20]
test ecx, ecx
jne 0x50b431
mov dword [ebx + 0x20], sym._zcalloc
mov dword [ebx + 0x28], 0
mov edi, dword [ebx + 0x24]
test edi, edi
jne 0x50b43f
mov dword [ebx + 0x24], sym._zcfree
cmp dword [ebp + 0xc], 0xffffffff
je 0x50b780
test esi, esi
js 0x50b790
cmp esi, 0xf
jg 0x50b770
mov ecx, dword [ebp + 0x18]
dec ecx
cmp ecx, 8
seta dl
cmp dword [ebp + 0x10], 8
setne al
or eax, edx
test al, 1
jne 0x50b7a8
cmp esi, 7
setle al
cmp esi, 0xf
setg dl
or eax, edx
test al, 1
jne 0x50b7a8
mov edi, dword [ebp + 0xc]
xor ecx, ecx
shr edi, 0x1f
cmp dword [ebp + 0xc], 9
setg cl
or edi, ecx
jne 0x50b7a8
mov eax, dword [ebp + 0x1c]
xor edx, edx
shr eax, 0x1f
cmp dword [ebp + 0x1c], 3
setg dl
or eax, edx
jne 0x50b7a8
cmp esi, 8
je 0x50b79e
mov edx, 0x16b8
mov edi, 1
mov dword [esp + 4], edi
mov dword [esp + 8], edx
mov ecx, dword [ebx + 0x28]
mov dword [esp], ecx
call dword [ebx + 0x20]
mov edi, eax
test edi, edi
mov eax, 0xfffffffc
je 0x50b765
mov dword [edi + 0x28], esi
mov ecx, esi
mov eax, 1
mov dword [ebx + 0x1c], edi
mov edx, dword [ebp - 0x10]
shl eax, cl
mov dword [edi + 0x24], eax
mov ecx, dword [ebp + 0x18]
dec eax
mov dword [edi + 0x2c], eax
mov esi, dword [ebp + 0x18]
mov eax, 0xaaaaaaab
mov dword [edi + 0x18], edx
add ecx, 7
mov edx, 1
mov dword [edi + 0x48], ecx
shl edx, cl
add esi, 9
mov dword [edi + 0x44], edx
mov ecx, edx
dec ecx
mul esi
mov esi, 2
mov dword [edi + 0x4c], ecx
mov dword [edi], ebx
shr edx, 1
mov dword [edi + 0x50], edx
mov edx, 2
mov dword [ebp - 0x14], 1
mov dword [esp + 8], edx
mov ecx, dword [edi + 0x24]
mov dword [esp + 4], ecx
mov eax, dword [ebx + 0x28]
mov dword [esp], eax
call dword [ebx + 0x20]
mov dword [edi + 0x30], eax
mov dword [esp + 8], esi
mov edx, dword [edi + 0x24]
mov dword [esp + 4], edx
mov ecx, dword [ebx + 0x28]
mov dword [esp], ecx
call dword [ebx + 0x20]
mov dword [edi + 0x38], eax
mov eax, 2
mov dword [esp + 8], eax
mov esi, dword [edi + 0x44]
mov dword [esp + 4], esi
mov edx, dword [ebx + 0x28]
mov esi, 4
mov dword [esp], edx
call dword [ebx + 0x20]
mov ecx, dword [ebp + 0x18]
add ecx, 6
shl dword [ebp - 0x14], cl
mov dword [edi + 0x3c], eax
mov eax, dword [ebp - 0x14]
mov dword [edi + 0x1694], eax
mov dword [esp + 8], esi
mov edx, dword [edi + 0x1694]
mov dword [esp + 4], edx
mov ecx, dword [ebx + 0x28]
mov dword [esp], ecx
call dword [ebx + 0x20]
mov edx, dword [edi + 0x1694]
mov esi, dword [edi + 0x30]
mov ecx, eax
mov dword [edi + 8], eax
test esi, esi
lea eax, [edx*4]
mov dword [edi + 0xc], eax
je 0x50b7b5
mov esi, dword [edi + 0x38]
test esi, esi
je 0x50b7b5
mov eax, dword [edi + 0x3c]
test eax, eax
je 0x50b7b5
test ecx, ecx
je 0x50b7b5
mov eax, edx
lea esi, [edx + edx*2]
and eax, 0xfffffffe
add eax, ecx
lea edx, [ecx + esi]
mov esi, dword [ebp + 0x1c]
movzx ecx, byte [ebp + 0x10]
mov dword [edi + 0x169c], eax
mov eax, dword [ebp + 0xc]
test ebx, ebx
mov dword [edi + 0x1690], edx
mov dword [edi + 0x80], esi
mov dword [edi + 0x7c], eax
mov byte [edi + 0x1d], cl
je 0x50b7a8
mov esi, dword [ebx + 0x1c]
test esi, esi
je 0x50b7a8
mov edi, dword [ebx + 0x20]
test edi, edi
je 0x50b7a8
mov ecx, dword [ebx + 0x24]
test ecx, ecx
je 0x50b7a8
mov dword [ebx + 0x2c], 2
mov edx, dword [esi + 8]
mov dword [ebx + 0x14], 0
mov dword [ebx + 8], 0
mov dword [esi + 0x10], edx
mov edx, dword [esi + 0x18]
mov dword [ebx + 0x18], 0
mov dword [esi + 0x14], 0
test edx, edx
js 0x50b896
cmp edx, 1
sbb eax, eax
and eax, 0x47
add eax, 0x2a
cmp edx, 2
mov dword [esi + 4], eax
je 0x50b879
mov dword [esp], 0
xor eax, eax
xor edx, edx
mov dword [esp + 8], eax
mov dword [esp + 4], edx
call sym._adler32
mov dword [ebx + 0x30], eax
mov dword [esi + 0x20], 0
mov dword [esp], esi
call sym.__tr_init
mov eax, dword [esi + 0x24]
xor ecx, ecx
mov ebx, dword [esi + 0x44]
mov edi, dword [esi + 0x3c]
add eax, eax
lea edx, [ebx + ebx - 2]
mov word [edi + ebx*2 - 2], 0
mov dword [esi + 0x34], eax
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov dword [esp], edi
call sym._memset
mov dword [esi + 0x64], 0
mov eax, dword [esi + 0x7c]
mov dword [esi + 0x54], 0
mov dword [esi + 0x6c], 0
lea edi, [eax + eax*2]
shl edi, 2
movzx ebx, word [edi + 0x559b22]
xor eax, eax
movzx edx, word [edi + 0x559b20]
movzx ecx, word [edi + 0x559b24]
mov dword [esi + 0x70], 2
mov dword [esi + 0x78], ebx
movzx ebx, word [edi + 0x559b26]
mov dword [esi + 0x84], edx
mov dword [esi + 0x88], ecx
mov dword [esi + 0x58], 2
mov dword [esi + 0x74], ebx
mov dword [esi + 0x60], 0
mov dword [esi + 0x40], 0
jmp 0x50b765
mov eax, 0xfffffffa
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [ebp - 0x10], 2
sub esi, 0x10
jmp 0x50b45a
mov dword [ebp + 0xc], 6
test esi, esi
jns 0x50b451
nop
mov dword [ebp - 0x10], 0
neg esi
jmp 0x50b45a
mov esi, 9
jmp 0x50b4c2
add esp, 0x1c
mov eax, 0xfffffffe
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [edi + 4], 0x29a
mov edi, dword [str.insufficient_memory]
test ebx, ebx
mov dword [ebx + 0x18], edi
je 0x50b7ed
mov ecx, dword [ebx + 0x1c]
test ecx, ecx
je 0x50b7ed
mov esi, dword [ecx + 4]
cmp esi, 0x2a
setne al
xor edx, edx
cmp esi, 0x71
setne dl
test eax, edx
je 0x50b7f7
cmp esi, 0x29a
je 0x50b7f7
mov eax, 0xfffffffc
jmp 0x50b765
mov eax, dword [ecx + 8]
test eax, eax
jne 0x50b831
mov eax, dword [ecx + 0x3c]
test eax, eax
jne 0x50b867
mov eax, dword [ecx + 0x38]
test eax, eax
jne 0x50b855
mov eax, dword [ecx + 0x30]
test eax, eax
jne 0x50b843
mov dword [esp + 4], ecx
mov edx, dword [ebx + 0x28]
mov dword [esp], edx
call dword [ebx + 0x24]
mov dword [ebx + 0x1c], 0
mov eax, 0xfffffffc
jmp 0x50b765
mov dword [esp + 4], eax
mov ecx, dword [ebx + 0x28]
mov dword [esp], ecx
call dword [ebx + 0x24]
mov ecx, dword [ebx + 0x1c]
jmp 0x50b7fe
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x28]
mov dword [esp], eax
call dword [ebx + 0x24]
mov ecx, dword [ebx + 0x1c]
jmp 0x50b813
mov dword [esp + 4], eax
mov edi, dword [ebx + 0x28]
mov dword [esp], edi
call dword [ebx + 0x24]
mov ecx, dword [ebx + 0x1c]
jmp 0x50b80c
mov dword [esp + 4], eax
mov esi, dword [ebx + 0x28]
mov dword [esp], esi
call dword [ebx + 0x24]
mov ecx, dword [ebx + 0x1c]
jmp 0x50b805
mov dword [esp], 0
xor ecx, ecx
xor edi, edi
mov dword [esp + 8], ecx
mov dword [esp + 4], edi
call sym._crc32
jmp 0x50b6b7
neg edx
mov dword [esi + 0x18], edx
jmp 0x50b688