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

Disassembly:
sub esp, 0x84
mov eax, dword [0x6d7160]
xor eax, esp
mov dword [esp + 0x80], eax
push ebp
mov eax, 2
push esi
mov esi, ecx
xor ecx, ecx
push edi
mov edi, 1
add dword [esi + 0xe4], edi
mov edx, 4
mov ebp, 8
mov dword [esp + 0x3c], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x78], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
mov eax, dword [esi + 0xe4]
cmp eax, dword [esi + 0xd0]
mov dword [esp + 0x30], ecx
mov dword [esp + 0x34], edx
mov dword [esp + 0x38], ecx
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], edi
mov dword [esp + 0x48], ecx
mov dword [esp + 0x14], ebp
mov dword [esp + 0x18], ebp
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], edx
mov dword [esp + 0x2c], edi
mov dword [esp + 0x68], ecx
mov dword [esp + 0x6c], ecx
mov dword [esp + 0x70], edx
mov dword [esp + 0x74], ecx
mov dword [esp + 0x7c], ecx
mov dword [esp + 0x80], edi
mov dword [esp + 0x4c], ebp
mov dword [esp + 0x50], ebp
mov dword [esp + 0x54], ebp
mov dword [esp + 0x58], edx
mov dword [esp + 0x5c], edx
jb 0x50b95f
cmp byte [esi + 0x123], cl
push ebx
je 0x50b75a
mov eax, dword [esi + 0xd8]
mov dword [esi + 0xe4], ecx
mov ecx, dword [esi + 0xe8]
add eax, edi
call fcn.00508690
add byte [esi + 0x124], 1
mov bl, byte [esi + 0x124]
cmp bl, 7
jae 0x50b75a
mov eax, dword [esi + 0xc8]
movzx ecx, bl
add ecx, ecx
add ecx, ecx
sub eax, dword [esp + ecx + 0x34]
mov edi, dword [esp + ecx + 0x18]
lea eax, [eax + edi - 1]
xor edx, edx
div edi
mov edi, eax
mov al, byte [esi + 0x129]
cmp al, 8
mov dword [esi + 0xe0], edi
movzx eax, al
jb 0x50b710
shr eax, 3
imul eax, edi
jmp 0x50b719
imul eax, edi
add eax, 7
shr eax, 3
add eax, 1
test byte [esi + 0x70], 2
mov dword [esi + 0xdc], eax
jne 0x50b751
mov edx, dword [esi + 0xcc]
sub edx, dword [esp + ecx + 0x6c]
mov ebp, dword [esp + ecx + 0x50]
lea eax, [edx + ebp - 1]
xor edx, edx
div ebp
test edi, edi
mov ebp, 8
mov dword [esi + 0xd0], eax
je 0x50b6c0
cmp bl, 7
jb 0x50b95e
test byte [esi + 0x6c], 0x20
jne 0x50b93a
lea eax, [esp + 0x13]
mov byte [esp + 0x88], 0x49
mov byte [esp + 0x89], 0x44
mov byte [esp + 0x8a], 0x41
mov byte [esp + 0x8b], 0x54
mov byte [esp + 0x8c], 0
mov dword [esi + 0x80], eax
mov dword [esi + 0x84], 1
cmp dword [esi + 0x78], 0
jne 0x50b8dd
cmp dword [esi + 0x10c], 0
jne 0x50b8a6
lea ebx, [esi + 0x11c]
lea ecx, [ecx]
push 0
mov eax, esi
call fcn.005087d0
lea ecx, [esp + 0x18]
push ecx
mov edx, 4
mov ecx, esi
call fcn.005083c0
push esi
lea eax, [esp + 0x20]
call fcn.005086c0
push esi
mov dword [esi + 0x10c], eax
call fcn.00504840
add esp, 0x10
mov edi, 4
mov eax, esi
call fcn.005087b0
mov eax, edi
lea ecx, [esp + 0x88]
mov edx, ebx
lea ebx, [ebx]
mov edi, dword [edx]
cmp edi, dword [ecx]
jne 0x50b828
sub eax, 4
add ecx, 4
add edx, 4
cmp eax, 4
jae 0x50b810
test eax, eax
je 0x50b885
movzx ebp, byte [ecx]
movzx edi, byte [edx]
sub edi, ebp
jne 0x50b877
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x50b885
movzx ebp, byte [ecx]
movzx edi, byte [edx]
sub edi, ebp
jne 0x50b877
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x50b885
movzx ebp, byte [ecx]
movzx edi, byte [edx]
sub edi, ebp
jne 0x50b877
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x50b885
movzx eax, byte [ecx]
movzx edi, byte [edx]
sub edi, eax
je 0x50b885
test edi, edi
mov eax, 1
jg 0x50b887
or eax, 0xffffffff
jmp 0x50b887
xor eax, eax
test eax, eax
je 0x50b899
push esi
mov ecx, str.Not_enough_image_data
call fcn.00507e90
add esp, 4
cmp dword [esi + 0x10c], 0
je 0x50b7c0
mov eax, dword [esi + 0xb0]
mov ecx, dword [esi + 0x10c]
cmp eax, ecx
mov ebx, dword [esi + 0xac]
mov dword [esi + 0x78], eax
mov dword [esi + 0x74], ebx
jbe 0x50b8c5
mov dword [esi + 0x78], ecx
mov edi, dword [esi + 0x78]
mov eax, esi
call fcn.005087b0
mov ecx, dword [esi + 0x78]
sub dword [esi + 0x10c], ecx
mov ebp, 8
lea eax, [esi + 0x74]
push 1
push eax
call fcn.0043f860
add esp, 8
cmp eax, 1
je 0x50b977
test eax, eax
je 0x50b912
mov eax, dword [esi + 0x8c]
test eax, eax
jne 0x50b907
mov eax, str.Decompression_Error
push esi
mov ecx, eax
call fcn.00507e90
add esp, 4
cmp dword [esi + 0x84], 0
jne 0x50b7a0
mov ecx, str.Extra_compressed_data.
call fcn.00507f50
or dword [esi + 0x68], ebp
or dword [esi + 0x6c], 0x20
mov dword [esi + 0x84], 0
cmp dword [esi + 0x10c], 0
jne 0x50b949
cmp dword [esi + 0x78], 0
je 0x50b953
mov ecx, str.Extra_compression_data
call fcn.00507f50
lea edx, [esi + 0x74]
call fcn.0043f620
or dword [esi + 0x68], ebp
pop ebx
mov ecx, dword [esp + 0x8c]
pop edi
pop esi
pop ebp
xor ecx, esp
call fcn.00607d6d
add esp, 0x84
ret
cmp dword [esi + 0x84], 0
je 0x50b98f
cmp dword [esi + 0x78], 0
jne 0x50b98f
cmp dword [esi + 0x10c], 0
je 0x50b929
mov ecx, str.Extra_compressed_data
jmp 0x50b924