Function at 0x4768d0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x5125d8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x20
push ebx
push ebp
push esi
mov esi, ecx
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 0x10]
push edi
push eax
push ecx
push ecx
mov ecx, esp
mov dword [esp + 0x38], esp
push str.Halving_texture_size__original_size:__dx_d_
mov dword [esp + 0x2c], esi
call fcn.00402110
mov eax, dword [0x55cd0c]
lea edx, [esp + 0x2c]
push edx
push eax
call fcn.004a7680
add esp, 0x14
mov ecx, dword [eax]
push ecx
push str.MemoryImageFile::halveSize
push ecx
mov ecx, esp
mov dword [esp + 0x38], esp
push str._s__:__s
mov dword [esp + 0x48], 0
call fcn.00402110
mov edx, dword [0x55cd0c]
mov eax, dword [edx + 0x85c]
push eax
call fcn.00475320
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
add esp, 0x10
mov dword [esp + 0x38], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x47697a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esi + 0x10]
cdq
sub eax, edx
mov edi, eax
mov eax, dword [esi + 0x14]
cdq
sub eax, edx
mov ebx, eax
sar ebx, 1
sar edi, 1
mov eax, ebx
imul eax, edi
shl eax, 2
push eax
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], ebx
call fcn.004fd795
add esp, 4
test ebx, ebx
mov ebp, eax
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x14], 0
jle 0x476ac1
mov dword [esp + 0x20], ebp
xor ecx, ecx
test edi, edi
jle 0x476a9b
mov dword [esp + 0x18], ebp
nop
mov edx, dword [esi + 0x10]
mov esi, dword [esi + 0x18]
mov eax, edx
imul eax, dword [esp + 0x14]
add eax, ecx
lea eax, [esi + eax*8]
mov edi, eax
mov bl, byte [edi]
shr bl, 2
add eax, 4
lea esi, [eax + edx*4]
mov dl, byte [esi + 4]
shr dl, 2
add dl, bl
mov bl, byte [eax]
shr bl, 2
add dl, bl
mov ebp, esi
mov bl, byte [ebp]
add esi, 4
shr bl, 2
add dl, bl
mov bl, byte [esi + 1]
mov byte [esp + 0x10], dl
mov dl, byte [ebp + 1]
shr bl, 2
shr dl, 2
add dl, bl
mov bl, byte [edi + 1]
shr bl, 2
add dl, bl
mov bl, byte [eax + 1]
shr bl, 2
add dl, bl
mov bl, byte [esi + 2]
mov byte [esp + 0x11], dl
mov dl, byte [ebp + 2]
shr dl, 2
shr bl, 2
add dl, bl
mov bl, byte [edi + 2]
shr bl, 2
add dl, bl
mov bl, byte [eax + 2]
mov al, byte [eax + 3]
shr bl, 2
add dl, bl
mov bl, byte [esi + 3]
mov esi, dword [esp + 0x1c]
mov byte [esp + 0x12], dl
mov dl, byte [ebp + 3]
shr dl, 2
shr bl, 2
add dl, bl
mov bl, byte [edi + 3]
mov edi, dword [esp + 0x24]
shr bl, 2
shr al, 2
add dl, bl
add dl, al
mov eax, dword [esp + 0x18]
mov byte [esp + 0x13], dl
mov edx, dword [esp + 0x10]
mov dword [eax], edx
inc ecx
add eax, 4
cmp ecx, edi
mov dword [esp + 0x18], eax
jl 0x4769d0
mov ebx, dword [esp + 0x28]
mov ecx, dword [esp + 0x14]
mov ebp, dword [esp + 0x20]
inc ecx
lea eax, [edi*4]
add ebp, eax
cmp ecx, ebx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x20], ebp
jl 0x4769c1
mov ebp, dword [esp + 0x2c]
mov eax, dword [esi + 0x18]
test eax, eax
je 0x476ad8
push eax
call fcn.004fd790
add esp, 4
mov dword [esi + 0x18], 0
mov ecx, dword [esp + 0x30]
mov dword [esi + 0x10], edi
pop edi
mov dword [esi + 0x14], ebx
mov dword [esi + 0x18], ebp
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x2c
ret