Function at 0x404060
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x24c
mov eax, dword [0x4b7108]
xor eax, esp
mov dword [esp + 0x248], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
push str.CaptureScreen
push 1
push 1
push 0
mov dword [esp + 0x2c], eax
call dword [sym.imp.KERNEL32.dll_CreateSemaphoreW]
mov ebx, eax
mov dword [esp + 0x34], ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x4040c8
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x248]
xor ecx, esp
call fcn.0044ee41
mov esp, ebp
pop ebp
ret 0x10
lea ecx, [esp + 0x28]
mov dword [esp + 0x28], 0
mov dword [esp + 0x2c], 0
mov dword [esp + 0x30], 0
call fcn.0041bec0
test eax, eax
jne 0x4040f4
xor ebx, ebx
jmp 0x404352
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
push 0xe74
call fcn.0044ee60
mov ecx, eax
call fcn.004051b0
push 0x208
mov esi, eax
lea eax, [esp + 0x4c]
push 0
push eax
call fcn.00466930
add esp, 0xc
lea eax, [esp + 0x48]
push 0x208
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [esp + 0x48]
push 0x5c
push eax
call fcn.00466717
movups xmm0, xmmword [str...CaptureScreen]
add esp, 8
movups xmmword [eax + 2], xmm0
movups xmm0, xmmword [0x4a9b9c]
movups xmmword [eax + 0x12], xmm0
mov cx, word [0x4a9bac]
mov word [eax + 0x22], cx
lea eax, [esp + 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push ecx
lea eax, [esp + 0x18]
mov dword [esp + 0x1c], 0
push eax
push str.render_gdi.dll
lea ecx, [esi + 0x210]
mov dword [esp + 0x20], 0
call fcn.00405140
lea eax, [esp + 0x18]
mov ecx, esi
push eax
call fcn.004050e0
mov ecx, dword [esp + 0x14]
push dword [esp + 0x18]
mov eax, dword [ecx]
call dword [eax + 0x10]
push 0xb4
call fcn.0044ee60
add esp, 4
mov edi, eax
mov ecx, edi
push str.SOUIHOST
push dword [esp + 0x20]
push dword [esp + 0x1c]
call dword [sym.imp.soui.dll_public:_void___thiscall_SOUI::SApplication::constructor_struct_SOUI::IRenderFactory___struct_HINSTANCE_____wchar_t_const__]
push str.soui_sys_resource.dll
mov dword [edi], vtable.SOUI::SApplication.1.0
mov dword [edi + 4], vtable.SOUI::SApplication.0
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
mov eax, dword [sym.imp.soui.dll_int___cdecl_SOUI::CreateResProvider_enum_SOUI::BUILTIN_RESTYPE__struct_IObjRef___]
test ebx, ebx
je 0x40423b
lea ecx, [esp + 0xc]
mov dword [esp + 0xc], 0
push ecx
push 0
call eax
mov ecx, dword [esp + 0x14]
add esp, 8
mov eax, dword [ecx]
push 0
push ebx
call dword [eax + 0xc]
push dword [esp + 0xc]
mov ecx, edi
call dword [sym.imp.soui.dll_public:_unsigned_int___thiscall_SOUI::SApplication::LoadSystemNamedResource_struct_SOUI::IResProvider__]
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ecx, dword [esp + 0xc]
test ecx, ecx
je 0x404236
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [sym.imp.soui.dll_int___cdecl_SOUI::CreateResProvider_enum_SOUI::BUILTIN_RESTYPE__struct_IObjRef___]
lea ecx, [esp + 0x10]
mov dword [esp + 0x10], 0
push ecx
push 0
call eax
mov ecx, dword [esp + 0x18]
add esp, 8
mov eax, dword [ecx]
push 0
push dword [esp + 0x20]
call dword [eax + 0xc]
push 1
push 6
push 0x4a5ac8
mov ecx, edi
call dword [sym.imp.soui.dll_public:_void___thiscall_SOUI::SApplication::InitXmlNamedID_struct_SOUI::TNAMEDVALUE_int__const___int__int_]
push str.uidef:xml_init
push dword [esp + 0x14]
lea ecx, [edi + 0x10]
call dword [sym.imp.soui.dll_public:_void___thiscall_SOUI::SResProviderMgr::AddResProvider_struct_SOUI::IResProvider___wchar_t_const__]
push 0
lea eax, [esp + 0x3c]
mov dword [esp + 0x3c], 1
push eax
lea eax, [esp + 0x2c]
mov dword [esp + 0x44], 0
push eax
mov dword [esp + 0x4c], 0
mov dword [esp + 0x50], 0
call dword [sym.imp.gdiplus.dll_GdiplusStartup]
push 0
push 0
push 0
push 0
call dword [sym.imp.USER32.dll_DefWindowProcW]
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], 8
push eax
mov dword [esp + 0x24], 4
call dword [sym.imp.COMCTL32.dll_InitCommonControlsEx]
sub esp, 0xc
call fcn.00405050
call fcn.00403e10
push dword [esp + 0x34]
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.00404f00
push dword [esp + 0x24]
call dword [sym.imp.gdiplus.dll_GdiplusShutdown]
call dword [sym.imp.ole32.dll_CoUninitialize]
mov eax, dword [edi]
mov ecx, edi
push 1
call dword [eax]
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x40431f
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x40432c
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [esp + 0x18]
test ecx, ecx
je 0x404339
mov eax, dword [ecx]
call dword [eax + 4]
test esi, esi
je 0x404352
mov ecx, esi
call fcn.004043e0
push 0xe74
push esi
call fcn.0044ee93
add esp, 8
mov esi, dword [esp + 0x28]
test esi, esi
je 0x40438b
push dword [esp + 0x24]
mov edx, dword [esp + 0x30]
push ecx
mov ecx, esi
call fcn.00402310
mov ecx, dword [esp + 0x38]
mov eax, 0x2aaaaaab
sub ecx, esi
add esp, 8
imul ecx
sar edx, 2
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
push ecx
push esi
call fcn.00402390
mov ecx, dword [esp + 0x254]
mov eax, ebx
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0044ee41
mov esp, ebp
pop ebp
ret 0x10