Function at 0x401fb0
Capabilities:
Contain obfuscated stackstrings

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov eax, dword [0x4099c0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
push 0x17101803
push 0
push eax
push eax
push 0
mov dword [ebp - 0x20], 0x32315659
mov dword [ebp - 0x1c], 0x56555949
mov dword [ebp - 0x18], 0x3231564e
mov dword [ebp - 0x14], 0x3132564e
mov dword [ebp - 0x10], 0x32595559
mov dword [ebp - 0xc], 0x59565955
mov dword [ebp - 8], 0x55595659
call sub.SDL2.dll_SDL_CreateRGBSurfaceWithFormat
mov edi, eax
add esp, 0x14
test edi, edi
je 0x402110
mov eax, dword [edi + 0xc]
lea ecx, [edi + 8]
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x34], ecx
test eax, eax
jle 0x402081
mov esi, dword [ecx]
xor ecx, ecx
mov dword [ebp - 0x40], 3
mov eax, ecx
xor ebx, ebx
cdq
sub eax, edx
sar eax, 1
cdq
idiv dword [ebp - 0x40]
mov dword [ebp - 0x2c], edx
lea eax, [ebx + ecx]
xor ecx, ecx
imul eax, dword [edi + 0x10]
add eax, edx
add eax, dword [edi + 0x14]
test esi, esi
jle 0x402066
mov byte [eax], 0xff
lea eax, [eax + 3]
mov esi, dword [edi + 8]
inc ecx
cmp ecx, esi
jl 0x402055
mov edx, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x28]
inc ebx
cmp ebx, 2
jl 0x402043
mov eax, dword [edi + 0xc]
add ecx, 2
mov dword [ebp - 0x28], ecx
cmp ecx, eax
jl 0x402033
lea ecx, [edi + 8]
jmp 0x402084
mov dword [ebp - 0x34], ecx
or dl, 0xff
mov dword [ebp - 0x24], 2
cmp dword [ecx], 2
mov byte [ebp - 0x2d], dl
jle 0x402110
mov ebx, 6
mov dword [ebp - 0x38], ebx
nop
mov ecx, ebx
mov dword [ebp - 0x28], 2
mov dword [ebp - 0x3c], ecx
nop dword [eax]
mov esi, dword [edi + 0x14]
xor ebx, ebx
add esi, ecx
test eax, eax
jle 0x4020e1
movzx ecx, dl
mov dword [ebp - 0x40], ecx
push 3
push ecx
push esi
call sub.SDL2.dll_SDL_memset
add esi, dword [edi + 0x10]
inc ebx
mov eax, dword [edi + 0xc]
add esp, 0xc
mov ecx, dword [ebp - 0x40]
cmp ebx, eax
jl 0x4020c1
mov ecx, dword [ebp - 0x3c]
mov dl, byte [ebp - 0x2d]
add ecx, 3
sub dword [ebp - 0x28], 1
mov dword [ebp - 0x3c], ecx
jne 0x4020b0
mov esi, dword [ebp - 0x24]
mov ebx, dword [ebp - 0x38]
add esi, 4
mov ecx, dword [ebp - 0x34]
add ebx, 0xc
test dl, dl
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x38], ebx
setne dl
dec dl
mov byte [ebp - 0x2d], dl
cmp esi, dword [ecx]
jl 0x4020a0
mov ecx, dword [ebp + 0xc]
mov eax, dword [edi + 8]
inc ecx
add eax, ecx
imul eax, dword [edi + 0xc]
shl eax, 2
cdq
sub eax, edx
mov esi, eax
sar esi, 1
push esi
call sub.SDL2.dll_SDL_malloc
mov ebx, eax
push esi
mov dword [ebp - 0x28], ebx
call sub.SDL2.dll_SDL_malloc
add esp, 8
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x40], 0xffffffff
test ebx, ebx
je 0x40252e
test eax, eax
je 0x40252e
xor esi, esi
mov eax, dword [ebp + esi*4 - 0x20]
push 0x64
push 0
push dword [edi + 0xc]
mov dword [ebp - 0x2c], eax
push dword [edi + 8]
call sub.SDL2.dll_SDL_GetYUVConversionModeForResolution
add esp, 8
push eax
push dword [edi + 0xc]
push dword [edi + 8]
push ebx
push dword [edi + 0x10]
push dword [edi + 0x14]
push dword [ebp + esi*4 - 0x20]
call fcn.004011d1
add esp, 0x24
test eax, eax
je 0x402514
push dword [edi + 8]
push dword [ebp + esi*4 - 0x20]
call fcn.00401050
push edi
push eax
push ebx
push dword [ebp + esi*4 - 0x20]
call fcn.004026e0
add esp, 0x18
test eax, eax
je 0x4024fa
inc esi
cmp esi, 7
jb 0x402157
xor esi, esi
nop dword [eax]
push dword [edi + 8]
mov eax, dword [ebp + esi*4 - 0x20]
push eax
mov dword [ebp - 0x2c], eax
call fcn.00401050
add eax, dword [ebp + 0xc]
push eax
push ebx
push dword [ebp + esi*4 - 0x20]
mov dword [ebp - 0x34], eax
push dword [edi + 0x10]
mov eax, dword [edi + 4]
push dword [edi + 0x14]
push dword [eax]
push dword [edi + 0xc]
push dword [edi + 8]
call sub.SDL2.dll_SDL_ConvertPixels
add esp, 0x28
test eax, eax
js 0x4024c9
push edi
push dword [ebp - 0x34]
push ebx
push dword [ebp + esi*4 - 0x20]
call fcn.004026e0
add esp, 0x10
test eax, eax
je 0x4024af
inc esi
cmp esi, 7
jb 0x4021c0
xor eax, eax
mov dword [ebp - 0x24], eax
xor esi, esi
push dword [edi + 8]
push dword [ebp + eax*4 - 0x20]
call fcn.00401050
add eax, dword [ebp + 0xc]
push dword [edi + 8]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp + esi*4 - 0x20]
push eax
mov dword [ebp - 0x2c], eax
call fcn.00401050
add eax, dword [ebp + 0xc]
push dword [ebp - 0x34]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x24]
push ebx
push dword [ebp + eax*4 - 0x20]
mov eax, dword [edi + 4]
push dword [edi + 0x10]
push dword [edi + 0x14]
push dword [eax]
push dword [edi + 0xc]
push dword [edi + 8]
call sub.SDL2.dll_SDL_ConvertPixels
add esp, 0x30
test eax, eax
js 0x4024a0
push dword [ebp - 0x38]
mov eax, dword [ebp - 0x24]
push dword [ebp - 0x3c]
push dword [ebp + esi*4 - 0x20]
push dword [ebp - 0x34]
push ebx
push dword [ebp + eax*4 - 0x20]
push dword [edi + 0xc]
push dword [edi + 8]
call sub.SDL2.dll_SDL_ConvertPixels
add esp, 0x20
test eax, eax
js 0x402485
push edi
push dword [ebp - 0x38]
push dword [ebp - 0x3c]
push dword [ebp + esi*4 - 0x20]
call fcn.004026e0
add esp, 0x10
test eax, eax
je 0x402455
mov eax, dword [ebp - 0x24]
inc esi
cmp esi, 7
jb 0x402223
inc eax
mov dword [ebp - 0x24], eax
cmp eax, 7
jb 0x402221
xor ecx, ecx
mov dword [ebp - 0x2c], ecx
nop dword [eax]
mov ebx, dword [ebp + ecx*4 - 0x20]
xor eax, eax
mov dword [ebp - 0x24], eax
nop dword [eax]
cmp ebx, 0x32595559
je 0x40230c
cmp ebx, 0x59565955
je 0x40230c
cmp ebx, 0x55595659
je 0x40230c
xor edx, edx
jmp 0x402311
mov edx, 1
mov esi, dword [ebp + eax*4 - 0x20]
cmp esi, 0x32595559
je 0x402331
cmp esi, 0x59565955
je 0x402331
cmp esi, 0x55595659
je 0x402331
xor ecx, ecx
jmp 0x402336
mov ecx, 1
cmp edx, ecx
jne 0x4023b6
push dword [edi + 8]
push ebx
call fcn.00401050
push dword [edi + 8]
add eax, dword [ebp + 0xc]
push esi
mov dword [ebp - 0x34], eax
call fcn.00401050
push dword [ebp - 0x34]
add eax, dword [ebp + 0xc]
push dword [ebp - 0x28]
mov dword [ebp - 0x38], eax
mov eax, dword [edi + 4]
push ebx
push dword [edi + 0x10]
push dword [edi + 0x14]
push dword [eax]
push dword [edi + 0xc]
push dword [edi + 8]
call sub.SDL2.dll_SDL_ConvertPixels
add esp, 0x30
test eax, eax
js 0x402420
push dword [ebp - 0x38]
mov eax, dword [ebp - 0x28]
push eax
push esi
push dword [ebp - 0x34]
push eax
push ebx
push dword [edi + 0xc]
push dword [edi + 8]
call sub.SDL2.dll_SDL_ConvertPixels
add esp, 0x20
test eax, eax
js 0x40240d
push edi
push dword [ebp - 0x38]
push dword [ebp - 0x28]
push esi
call fcn.004026e0
add esp, 0x10
test eax, eax
je 0x4023e2
mov eax, dword [ebp - 0x24]
inc eax
mov dword [ebp - 0x24], eax
cmp eax, 7
jb 0x4022f0
mov ecx, dword [ebp - 0x2c]
inc ecx
mov dword [ebp - 0x2c], ecx
cmp ecx, 7
jb 0x4022e0
mov ebx, dword [ebp - 0x28]
mov dword [ebp - 0x40], 0
jmp 0x40253d
push esi
call sub.SDL2.dll_SDL_GetPixelFormatName
add esp, 4
push eax
push ebx
call sub.SDL2.dll_SDL_GetPixelFormatName
add esp, 4
push eax
push str.Failed_conversion_from__s_to__s_n
push 0
call sub.SDL2.dll_SDL_LogError
mov ebx, dword [ebp - 0x28]
add esp, 0x10
jmp 0x40253d
call sub.SDL2.dll_SDL_GetError
push eax
push esi
call sub.SDL2.dll_SDL_GetPixelFormatName
add esp, 4
push eax
push ebx
jmp 0x402435
call sub.SDL2.dll_SDL_GetError
push eax
push ebx
call sub.SDL2.dll_SDL_GetPixelFormatName
add esp, 4
push eax
mov eax, dword [edi + 4]
push dword [eax]
call sub.SDL2.dll_SDL_GetPixelFormatName
add esp, 4
push eax
push str.Couldnt_convert__s_to__s:__s_n
push 0
call sub.SDL2.dll_SDL_LogError
mov ebx, dword [ebp - 0x28]
add esp, 0x14
jmp 0x40253d
push dword [ebp - 0x2c]
call sub.SDL2.dll_SDL_GetPixelFormatName
add esp, 4
push eax
mov eax, dword [ebp - 0x24]
push dword [ebp + eax*4 - 0x20]
call sub.SDL2.dll_SDL_GetPixelFormatName
add esp, 4
push eax
push str.Failed_conversion_from__s_to__s_n
push 0
call sub.SDL2.dll_SDL_LogError
add esp, 0x10
jmp 0x40253d
call sub.SDL2.dll_SDL_GetError
push eax
push dword [ebp - 0x2c]
call sub.SDL2.dll_SDL_GetPixelFormatName
add esp, 4
push eax
mov eax, dword [ebp - 0x24]
push dword [ebp + eax*4 - 0x20]
jmp 0x4024e0
call sub.SDL2.dll_SDL_GetError
push eax
mov eax, dword [ebp - 0x24]
push dword [ebp + eax*4 - 0x20]
jmp 0x4024d2
push dword [ebp - 0x2c]
call sub.SDL2.dll_SDL_GetPixelFormatName
push eax
push str.Failed_conversion_from_RGB_to__s_n
push 0
call sub.SDL2.dll_SDL_LogError
add esp, 0x10
jmp 0x40253d
call sub.SDL2.dll_SDL_GetError
push eax
push dword [ebp - 0x2c]
call sub.SDL2.dll_SDL_GetPixelFormatName
add esp, 4
push eax
mov eax, dword [edi + 4]
push dword [eax]
call sub.SDL2.dll_SDL_GetPixelFormatName
add esp, 4
push eax
push str.Couldnt_convert__s_to__s:__s_n
push 0
call sub.SDL2.dll_SDL_LogError
add esp, 0x14
jmp 0x40253d
push dword [ebp - 0x2c]
call sub.SDL2.dll_SDL_GetPixelFormatName
push eax
push str.Failed_conversion_from__s_to_RGB_n
push 0
call sub.SDL2.dll_SDL_LogError
add esp, 0x10
jmp 0x40253d
push dword [ebp - 0x2c]
call sub.SDL2.dll_SDL_GetPixelFormatName
push eax
push str.ConvertRGBtoYUV___doesnt_support_converting_to__s_n
push 0
call sub.SDL2.dll_SDL_LogError
add esp, 0x10
jmp 0x40253d
push str.Couldnt_allocate_test_surfaces
push 0
call sub.SDL2.dll_SDL_LogError
add esp, 8
push ebx
call sub.SDL2.dll_SDL_free
push dword [ebp - 0x3c]
call sub.SDL2.dll_SDL_free
push edi
call sub.SDL2.dll_SDL_FreeSurface
mov ecx, dword [ebp - 4]
add esp, 0xc
mov eax, dword [ebp - 0x40]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.004010c3
mov esp, ebp
pop ebp
ret