Function at 0x413f90
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5421b0
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [0x594ca8]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
call fcn.00417515
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x413fd2
push 0x80004005
call fcn.00404860
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x10], eax
lea ebx, [ebp - 0x14]
mov dword [ebp - 4], 0
call fcn.00407aa0
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 1
call fcn.00404790
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x414020
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x10]
mov ecx, 0x5704e4
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x41404e
test dx, dx
je 0x41404a
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x41404e
add eax, 4
add ecx, 4
test dx, dx
jne 0x414028
xor eax, eax
jmp 0x414053
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
sete al
test al, al
je 0x414064
push 0
call dword [sym.imp.USER32.dll_PostQuitMessage]
mov esi, dword [ebp + 8]
mov eax, dword [esi + 0x274]
cmp eax, 1
jne 0x4140d1
push str.BkZone
lea ecx, [esi + 0x2c]
call dword [sym.imp.DuiLib_u.dll_public:_class_DuiLib::CControlUI____thiscall_DuiLib::CPaintManagerUI::FindControl_wchar_t_const__const]
push str.PageCtrl
lea ecx, [esi + 0x2c]
mov ebx, eax
call dword [sym.imp.DuiLib_u.dll_public:_class_DuiLib::CControlUI____thiscall_DuiLib::CPaintManagerUI::FindControl_wchar_t_const__const]
mov edi, eax
test ebx, ebx
je 0x4140b2
test edi, edi
je 0x4140b2
mov ecx, ebx
mov ebx, dword [sym.imp.DuiLib_u.dll_public:_void___thiscall_DuiLib::CControlUI::SetBkImage_wchar_t_const__]
push str.12.png
call ebx
push str.9.png
mov ecx, edi
call ebx
mov dword [0x59cd00], 2
inc dword [esi + 0x274]
mov dword [0x59cba0], 0xfffffffe
jmp 0x414231
cmp eax, 2
jne 0x414135
push str.BkZone
lea ecx, [esi + 0x2c]
call dword [sym.imp.DuiLib_u.dll_public:_class_DuiLib::CControlUI____thiscall_DuiLib::CPaintManagerUI::FindControl_wchar_t_const__const]
push str.PageCtrl
lea ecx, [esi + 0x2c]
mov ebx, eax
call dword [sym.imp.DuiLib_u.dll_public:_class_DuiLib::CControlUI____thiscall_DuiLib::CPaintManagerUI::FindControl_wchar_t_const__const]
mov edi, eax
test ebx, ebx
je 0x414116
test edi, edi
je 0x414116
mov ecx, ebx
mov ebx, dword [sym.imp.DuiLib_u.dll_public:_void___thiscall_DuiLib::CControlUI::SetBkImage_wchar_t_const__]
push str.7.png
call ebx
push str.8.png
mov ecx, edi
call ebx
mov dword [0x59cd00], 3
inc dword [esi + 0x274]
mov dword [0x59cba0], 0xfffffffd
jmp 0x414231
cmp eax, 3
jne 0x414231
mov edi, dword [sym.imp.DuiLib_u.dll_public:_class_DuiLib::CControlUI____thiscall_DuiLib::CPaintManagerUI::FindControl_wchar_t_const__const]
add esi, 0x2c
push str.RcmdZone
mov ecx, esi
call edi
push str.PageZone
mov ecx, esi
mov ebx, eax
call edi
push str.UninstallZone
mov ecx, esi
mov dword [ebp - 0x14], eax
call edi
mov dword [ebp - 0x18], eax
test ebx, ebx
je 0x414231
cmp dword [ebp - 0x14], 0
je 0x414231
test eax, eax
je 0x414231
push 0x14a
push 0x258
mov ecx, esi
call dword [sym.imp.DuiLib_u.dll_public:_void___thiscall_DuiLib::CPaintManagerUI::SetInitSize_int__int_]
mov ecx, esi
call dword [sym.imp.DuiLib_u.dll_public:_struct_HWND______thiscall_DuiLib::CPaintManagerUI::GetPaintWindow_void_const]
push 0x16
push 0x14a
push 0x258
push 0
push 0
push 0
push eax
call dword [sym.imp.USER32.dll_SetWindowPos]
mov edx, dword [ebx]
mov eax, dword [edx + 0xcc]
push 0
mov ecx, ebx
call eax
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx]
mov eax, dword [edx + 0xcc]
push 0
call eax
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx]
mov eax, dword [edx + 0xcc]
push 1
call eax
push str.BkZone
mov ecx, esi
call edi
test eax, eax
je 0x4141fd
push str.1.png
mov ecx, eax
call dword [sym.imp.DuiLib_u.dll_public:_void___thiscall_DuiLib::CControlUI::SetBkImage_wchar_t_const__]
mov edx, dword [ebp + 8]
lea ecx, [ebp + 8]
push ecx
push 0
push edx
push 0x414970
push 0
push 0
mov dword [0x59cd00], 4
mov dword [0x59cba0], 0xfffffffc
call dword [sym.imp.KERNEL32.dll_CreateThread]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x414257
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4