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

Disassembly:
mov eax, dword [0x5f5660]
mov ecx, dword [eax]
sub esp, 0x64
lea edx, [esp + 0x54]
push edx
push eax
call dword [ecx + 0x20]
test eax, eax
jge 0x5475ec
push str.Failed_to_get_displasy_mode
call fcn.004b01a0
add esp, 4
xor al, al
add esp, 0x64
ret 4
mov eax, dword [0x5f5660]
mov ecx, dword [eax]
lea edx, [esp + 4]
push edx
mov edx, dword [esp + 0x5c]
push 0x15
push edx
mov edx, dword [esp + 0x60]
push edx
push eax
call dword [ecx + 0x6c]
test eax, eax
jge 0x547621
push str.Failed_to_create_image_surface
call fcn.004b01a0
add esp, 4
xor al, al
add esp, 0x64
ret 4
mov edx, dword [esp + 4]
mov eax, dword [0x5f5660]
mov ecx, dword [eax]
push edx
push eax
call dword [ecx + 0x78]
test eax, eax
jge 0x547654
mov eax, dword [esp + 4]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
push str.Failed_to_get_front_buffer
call fcn.004b01a0
add esp, 4
xor al, al
add esp, 0x64
ret 4
mov eax, dword [0x5f5644]
push ebx
push ebp
push esi
lea edx, [esp + 0x30]
push edx
xor ebp, ebp
push eax
mov dword [esp + 0x38], ebp
mov dword [esp + 0x3c], ebp
call dword [sym.imp.user32.dll_ClientToScreen]
mov edx, dword [0x5f5644]
lea ecx, [esp + 0x50]
push ecx
push edx
call dword [sym.imp.user32.dll_GetClientRect]
mov ecx, dword [0x5f5644]
lea eax, [esp + 0x40]
push eax
push ecx
call dword [sym.imp.user32.dll_GetWindowRect]
mov edx, dword [esp + 0x34]
mov esi, dword [esp + 0x50]
mov ebx, dword [esp + 0x58]
mov eax, dword [esp + 0x30]
sub ebx, esi
mov esi, dword [esp + 0x5c]
mov dword [esp + 0x44], edx
sub esi, dword [esp + 0x54]
cmp eax, ebp
mov dword [esp + 0x40], eax
mov dword [esp + 0x2c], esi
mov dword [esp + 0x14], ebx
mov dword [esp + 0x24], esi
mov dword [esp + 0x18], ebp
jge 0x5476da
mov ecx, eax
neg ecx
add eax, ebx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], eax
push edi
mov edi, dword [sym.imp.user32.dll_GetSystemMetrics]
push ebp
call edi
cmp dword [esp + 0x4c], eax
jle 0x5476fd
push ebp
call edi
mov edx, dword [esp + 0x4c]
mov ecx, dword [esp + 0x18]
sub eax, edx
add ecx, eax
mov dword [esp + 0x18], ecx
push 1
call edi
cmp dword [esp + 0x50], eax
jle 0x547719
push 1
call edi
mov edi, dword [esp + 0x50]
mov ecx, esi
sub ecx, edi
add eax, ecx
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x14]
mov edx, dword [eax]
push ebp
push ebp
lea ecx, [esp + 0x44]
push ecx
push eax
call dword [edx + 0x24]
test eax, eax
jge 0x547747
push str.Failed_to_lock_the_surface
call fcn.004b01a0
add esp, 4
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x64
ret 4
call dword [sym.imp.devil.dll_ilInit]
push 0x620
call dword [sym.imp.devil.dll_ilEnable]
push 0x55
push 0x711
call dword [sym.imp.devil.dll_ilSetInteger]
lea edx, [esp + 0x2c]
push edx
push 1
call dword [sym.imp.devil.dll_ilGenImages]
mov eax, dword [esp + 0x2c]
push eax
call dword [sym.imp.devil.dll_ilBindImage]
push ebp
push 0x1401
push 0x80e1
push 4
push 1
push esi
push ebx
mov byte [esp + 0x2f], 0
call dword [sym.imp.devil.dll_ilTexImage]
test al, al
jne 0x5477cd
mov ecx, dword [esp + 0x78]
push ecx
push str.ilTexImage_error:__s
call fcn.004b01a0
mov eax, dword [esp + 0x1c]
mov edx, dword [eax]
add esp, 8
push eax
mov byte [esp + 0x17], 1
call dword [edx + 0x28]
mov eax, dword [esp + 0x14]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
jmp 0x547901
mov ebp, esi
imul ebp, ebx
shl ebp, 2
push ebp
call fcn.0047a448
mov edi, eax
mov ecx, ebp
mov edx, ecx
shr ecx, 2
xor eax, eax
mov dword [esp + 0x28], edi
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x40]
imul ecx, dword [esp + 0x4c]
mov eax, dword [esp + 0x28]
mov edi, dword [esp + 0x44]
mov edx, dword [esp + 0x48]
add ecx, edi
mov dword [esp + 0x24], eax
lea eax, [ecx + edx*4]
mov ecx, dword [esp + 0x2c]
add esp, 4
test ecx, ecx
jbe 0x547876
mov edx, dword [esp + 0x18]
shl edx, 2
mov dword [esp + 0x18], edx
mov dword [esp + 0x28], ecx
jmp 0x547830
mov edx, dword [esp + 0x1c]
mov edi, dword [esp + 0x20]
mov ecx, dword [esp + 0x18]
lea esi, [eax + edx*4]
lea edi, [edi + edx*4]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x20]
mov edx, dword [esp + 0x3c]
lea ecx, [ebx*4]
add esi, ecx
mov ecx, dword [esp + 0x28]
add eax, edx
dec ecx
mov dword [esp + 0x20], esi
mov dword [esp + 0x28], ecx
jne 0x547830
mov esi, dword [esp + 0x30]
mov eax, dword [esp + 0x14]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x28]
mov eax, dword [esp + 0x14]
mov edx, dword [eax]
push eax
call dword [edx + 8]
call dword [sym.imp.devil.dll_ilGetData]
mov ecx, dword [esp + 0x24]
add ebp, ecx
test esi, esi
jbe 0x5478d2
lea ecx, [ebx*4]
mov dword [esp + 0x28], esi
sub ebp, ecx
test ebx, ebx
jbe 0x5478be
mov edx, ebp
mov ecx, eax
sub edx, eax
mov esi, ebx
mov edi, dword [edx + ecx]
mov dword [ecx], edi
add ecx, 4
dec esi
jne 0x5478b3
mov edx, dword [esp + 0x28]
lea ecx, [ebx*4]
add eax, ecx
dec edx
mov dword [esp + 0x28], edx
jne 0x5478a5
mov edx, dword [esp + 0x24]
push edx
call fcn.0047a443
mov esi, dword [esp + 0x7c]
add esp, 4
push esi
call dword [sym.imp.devil.dll_ilSaveImage]
test al, al
jne 0x547901
push esi
push str.ilSaveImage_error:__s
call fcn.004b01a0
add esp, 8
mov byte [esp + 0x13], 1
lea eax, [esp + 0x2c]
push eax
push 1
call dword [sym.imp.devil.dll_ilDeleteImages]
call dword [sym.imp.devil.dll_ilShutDown]
mov cl, byte [esp + 0x13]
pop edi
pop esi
xor eax, eax
test cl, cl
pop ebp
sete al
pop ebx
add esp, 0x64
ret 4