Function at 0x50f040
Capabilities:
Terminate process

Disassembly:
mov eax, dword [0x6b78f8]
xor ecx, ecx
cmp eax, ecx
je 0x50f068
mov eax, 0x100
mov dword [0xadb3b0], ecx
mov dword [0xadb3a8], eax
mov dword [0xadb3ac], eax
mov byte [0xadb3b4], cl
jmp 0x50f099
mov eax, dword [0x6b5804]
mov ecx, dword [0x6b5808]
mov edx, dword [0x6b5810]
mov dword [0xadb3a8], eax
mov eax, dword [0x6b57dc]
mov dword [0xadb3ac], ecx
shr eax, 5
and al, 1
mov dword [0xadb3b0], edx
mov byte [0xadb3b4], al
jmp 0x5101b0
sub esp, 0x21c
mov ecx, 2
push esi
push edi
xor edi, edi
xor eax, eax
cmp eax, edi
jne 0x5101cd
mov dword [0x568898], ecx
jmp 0x5101da
lea edx, [eax + eax*8]
lea edx, [eax + edx*2]
mov dword [edx*4 + 0x568898], edi
inc eax
cmp eax, 5
jl 0x5101c1
mov eax, dword [0x6b791c]
lea edx, [esp + 0x24]
mov dword [0xac12b0], edi
push edx
mov ecx, dword [eax]
push 0x5104f0
push eax
call dword [ecx + 0x10]
mov eax, dword [0xac12b0]
cmp eax, edi
jle 0x51038b
push ebx
lea ebx, [esp + 0x38]
push ebp
mov dword [esp + 0x10], ebx
mov dword [esp + 0x24], eax
test byte [ebx - 0xc], 0x40
je 0x510373
mov eax, dword [ebx]
xor edx, edx
mov ecx, eax
mov dword [esp + 0x1c], edx
cmp ecx, edi
je 0x51023d
mov esi, ecx
and esi, 1
add edx, esi
shr ecx, 1
jne 0x51022e
mov dword [esp + 0x1c], edx
mov edx, dword [ebx + 4]
xor esi, esi
mov ecx, edx
mov dword [esp + 0x28], esi
cmp ecx, edi
je 0x51025b
mov ebp, ecx
and ebp, 1
add esi, ebp
shr ecx, 1
jne 0x51024c
mov dword [esp + 0x28], esi
mov ecx, dword [ebx + 8]
mov dword [esp + 0x14], edi
mov esi, ecx
cmp esi, edi
je 0x510277
mov ebp, esi
and ebp, 1
add edi, ebp
shr esi, 1
jne 0x510268
mov dword [esp + 0x14], edi
mov edi, dword [ebx + 0xc]
xor ebp, ebp
mov esi, edi
mov dword [esp + 0x20], ebp
test esi, esi
je 0x510299
mov ebx, esi
and ebx, 1
add ebp, ebx
shr esi, 1
jne 0x510286
mov ebx, dword [esp + 0x10]
mov dword [esp + 0x20], ebp
xor ebp, ebp
cmp eax, ebp
jne 0x5102a5
mov dword [esp + 0x18], ebp
jmp 0x5102b6
xor esi, esi
test al, 1
jne 0x5102b2
shr eax, 1
inc esi
test al, 1
je 0x5102ab
mov dword [esp + 0x18], esi
cmp edx, ebp
jne 0x5102c0
mov dword [esp + 0x10], ebp
jmp 0x5102d3
xor eax, eax
test dl, 1
jne 0x5102cf
shr edx, 1
inc eax
test dl, 1
je 0x5102c7
mov dword [esp + 0x10], eax
cmp ecx, ebp
je 0x5102e8
xor eax, eax
test cl, 1
jne 0x5102e6
shr ecx, 1
inc eax
test cl, 1
je 0x5102de
mov ebp, eax
mov eax, edi
test eax, eax
jne 0x5102f2
xor edx, edx
jmp 0x510301
xor ecx, ecx
test al, 1
jne 0x5102ff
shr eax, 1
inc ecx
test al, 1
je 0x5102f8
mov edx, ecx
mov eax, 0x56887c
mov ecx, dword [esp + 0x20]
mov esi, dword [eax - 4]
cmp ecx, esi
jne 0x510367
mov ecx, dword [esp + 0x1c]
mov esi, dword [eax]
cmp ecx, esi
jne 0x510367
mov ecx, dword [esp + 0x28]
mov esi, dword [eax + 4]
cmp ecx, esi
jne 0x510367
mov ecx, dword [esp + 0x14]
mov esi, dword [eax + 8]
cmp ecx, esi
jne 0x510367
cmp edx, dword [eax + 0xc]
jne 0x510367
mov ecx, dword [esp + 0x18]
mov esi, dword [eax + 0x10]
cmp ecx, esi
jne 0x510367
mov ecx, dword [esp + 0x10]
mov esi, dword [eax + 0x14]
cmp ecx, esi
jne 0x510367
cmp ebp, dword [eax + 0x18]
jne 0x510367
mov ecx, dword [eax + 0x1c]
lea esi, [ebx - 0x10]
or ecx, 4
lea edi, [eax + 0x20]
mov dword [eax + 0x1c], ecx
mov ecx, 8
rep movsd dword es:[edi], dword [esi]
add eax, 0x4c
cmp eax, 0x5689f8
jl 0x510306
xor edi, edi
mov eax, dword [esp + 0x24]
add ebx, 0x20
dec eax
mov dword [esp + 0x10], ebx
mov dword [esp + 0x24], eax
jne 0x510216
pop ebp
pop ebx
cmp dword [0x6b78f8], edi
je 0x5103f1
mov eax, dword [0x568898]
or al, 1
test al, 4
mov dword [0x568898], eax
jne 0x51040f
mov dword [0x56889c], 0x20
mov dword [0x5688a0], 0x41
mov dword [0x5688a4], edi
mov dword [0x5688a8], 0x10
mov dword [0x5688ac], 0x7c00
mov dword [0x5688b0], 0x3e0
mov dword [0x5688b4], 0x1f
mov dword [0x5688b8], 0x8000
jmp 0x51040f
mov ecx, 0x568898
mov eax, dword [ecx]
test al, 4
je 0x510400
or al, 1
jmp 0x510402
and al, 0xfe
mov dword [ecx], eax
add ecx, 0x4c
cmp ecx, 0x568a14
jl 0x5103f6
test byte [0x568898], 1
je 0x510427
mov dword [0xadb36c], edi
pop edi
pop esi
add esp, 0x21c
ret
test byte [0x5689c8], 1
je 0x510443
pop edi
mov dword [0xadb36c], 4
pop esi
add esp, 0x21c
ret
test byte [0x5688e4], 1
je 0x51045f
pop edi
mov dword [0xadb36c], 1
pop esi
add esp, 0x21c
ret
push 0xffffffffffffffff
call dword [sym.imp.USER32.dll_MessageBeep]
push str.D3DTEX:_Did_not_find_acceptable_16_bit_Alpha_format_r_n
call fcn.004015b0
add esp, 4
xor esi, esi
mov eax, 0x568898
test byte [eax], 1
jne 0x51049f
add eax, 0x4c
inc esi
cmp eax, 0x568a14
jl 0x51047b
push str.__NONE_OF_OUR_FORMATS_ARE_SUPPORTED___CANT_RUN_THE_GAME__r_n
call fcn.004015b0
add esp, 4
push 1
call fcn.0052a101
cmp esi, 5
jge 0x51048b
lea edx, [esi + esi*8]
lea eax, [esi + edx*2]
shl eax, 2
mov ecx, dword [eax + 0x568884]
mov edx, dword [eax + 0x568880]
push ecx
mov ecx, dword [eax + 0x56887c]
push edx
mov edx, dword [eax + 0x568878]
push ecx
push edx
push str.__Using_alternate_format:_ARGB__i__i__i__i_r_n
call fcn.004015b0
add esp, 0x14
mov dword [0xadb36c], esi
pop edi
pop esi
add esp, 0x21c
ret