Function at 0x40cd90
Capabilities:
Identify system language via api
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x88
mov eax, dword [0x4d3040]
xor eax, esp
mov dword [esp + 0x84], eax
push esi
push edi
mov edi, dword [ebp + 8]
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
test eax, eax
js 0x40d2cd
mov esi, dword [0x4d3ebc]
mov ecx, dword [0x4d3ec0]
mov dword [0x4d687c], 0
cmp esi, ecx
jae 0x40cdfa
nop dword [eax]
mov eax, dword [esi]
test eax, eax
je 0x40cdf3
mov eax, dword [eax + 0x1c]
push 1
call eax
mov ecx, dword [0x4d3ec0]
add esi, 4
cmp esi, ecx
jb 0x40cde0
call dword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
push 0x48
mov word [0x4d67e8], ax
mov dword [0x4d6804], edi
call fcn.00482304
push 0x48
mov edi, eax
push 0
push edi
mov dword [esp + 0x2c], edi
call fcn.00484a20
mov eax, dword [sym.imp.USER32.dll_DefWindowProcW]
mov dword [edi], vtable.DuiLib::CWindowWnd.0
mov dword [edi + 8], eax
mov dword [edi + 0x10], vtable.DuiLib::CNotifyPump.0
push 0x14c
mov dword [edi + 0x1c], 0
mov dword [edi + 0x18], 0x53
call fcn.004827b9
push 0x14c
push 0
push eax
mov dword [edi + 0x14], eax
call fcn.00484a20
mov dword [edi + 0x20], 1
push 0x7a4
mov dword [edi], vtable.DuiLib::WindowImplBase.0
mov dword [edi + 0x10], vtable.DuiLib::WindowImplBase.5.0
mov dword [edi + 0x24], vtable.DuiLib::WindowImplBase.4.0
mov dword [edi + 0x28], vtable.DuiLib::WindowImplBase.3.0
mov dword [edi + 0x2c], vtable.DuiLib::WindowImplBase.2.0
mov dword [edi + 0x30], vtable.DuiLib::WindowImplBase.1.0
call fcn.00482304
add esp, 0x24
mov ecx, eax
call fcn.0041473a
mov dword [edi + 0x34], eax
mov dword [edi], vtable.SetupDlg.1.0
mov dword [edi + 0x10], vtable.SetupDlg.0
mov dword [edi + 0x24], vtable.SetupDlg.2.0
mov dword [edi + 0x28], vtable.SetupDlg.3.0
mov dword [edi + 0x2c], vtable.SetupDlg.4.0
mov dword [edi + 0x30], vtable.SetupDlg.5.0
mov dword [edi + 0x38], 0
mov dword [edi + 0x3c], 0
push 0x18
mov dword [edi + 0x40], 0
mov dword [edi + 0x44], 0
call fcn.00482304
add esp, 4
mov ecx, edi
mov dword [eax], eax
mov dword [eax + 4], eax
mov dword [eax + 8], eax
mov word [eax + 0xc], 0x101
mov dword [edi + 0x40], eax
mov eax, dword [edi]
mov eax, dword [eax + 4]
call eax
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x40cfb6
push 0x30
lea eax, [esp + 0x34]
push 0
push eax
call fcn.00484a20
add esp, 0xc
mov dword [esp + 0x30], 0x30
lea eax, [esp + 0x30]
mov ecx, edi
push eax
mov eax, dword [edi]
mov eax, dword [eax + 4]
call eax
push eax
push 0
call dword [sym.imp.USER32.dll_GetClassInfoExW]
test eax, eax
jne 0x40cf75
mov eax, dword [edi]
mov ecx, edi
mov eax, dword [eax + 4]
call eax
lea ecx, [esp + 0x30]
push ecx
push eax
push dword [0x4d6804]
call dword [sym.imp.USER32.dll_GetClassInfoExW]
test eax, eax
je 0x40d087
mov eax, dword [esp + 0x38]
mov ecx, edi
mov dword [edi + 8], eax
mov eax, dword [0x4d6804]
mov dword [esp + 0x44], eax
mov eax, dword [edi]
mov dword [esp + 0x38], 0x423187
mov eax, dword [eax]
call eax
mov dword [esp + 0x58], eax
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.USER32.dll_RegisterClassExW]
test ax, ax
jne 0x40cfb6
call esi
cmp eax, 0x582
jne 0x40d087
mov eax, dword [edi]
mov ecx, edi
mov eax, dword [eax + 4]
call eax
test eax, eax
jne 0x40d03f
mov eax, dword [edi]
mov ecx, edi
mov eax, dword [eax + 8]
call eax
push 0x7f00
mov dword [esp + 0x34], eax
mov eax, dword [0x4d6804]
push 0
mov dword [esp + 0x40], 0
mov dword [esp + 0x44], 0
mov dword [esp + 0x4c], 0
mov dword [esp + 0x3c], 0x4230e1
mov dword [esp + 0x48], eax
call dword [sym.imp.USER32.dll_LoadCursorW]
mov dword [esp + 0x48], eax
mov ecx, edi
mov eax, dword [edi]
mov dword [esp + 0x4c], 0
mov dword [esp + 0x50], 0
mov eax, dword [eax]
call eax
mov dword [esp + 0x54], eax
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.USER32.dll_RegisterClassW]
test ax, ax
jne 0x40d03f
call esi
cmp eax, 0x582
jne 0x40d087
mov eax, dword [edi]
mov ecx, edi
mov esi, dword [0x4d6804]
mov eax, dword [eax]
call eax
push edi
push esi
push 0
push 0
push SysReAllocString
push SysReAllocString
push SysReAllocString
push SysReAllocString
push 0x96c80000
push str.XinZhiZao
push eax
push 0
call dword [sym.imp.USER32.dll_CreateWindowExW]
mov dword [edi + 4], eax
test eax, eax
jne 0x40d087
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea eax, [esp + 0x70]
xorps xmm0, xmm0
push eax
push dword [edi + 4]
movaps xmmword [esp + 0x78], xmm0
call dword [sym.imp.USER32.dll_GetWindowRect]
mov esi, dword [edi + 4]
xorps xmm0, xmm0
push esi
movaps xmmword [esp + 0x64], xmm0
call dword [sym.imp.USER32.dll_GetParent]
push 4
push dword [edi + 4]
call dword [sym.imp.USER32.dll_GetWindow]
test eax, eax
mov dword [esp + 0x14], eax
xorps xmm0, xmm0
cmovne esi, eax
movaps xmmword [esp + 0x30], xmm0
lea eax, [esp + 0x30]
movaps xmmword [esp + 0x40], xmm0
push eax
push 2
push esi
movq qword [esp + 0x5c], xmm0
mov dword [esp + 0x3c], 0x28
call dword [sym.imp.USER32.dll_MonitorFromWindow]
push eax
call dword [sym.imp.USER32.dll_GetMonitorInfoW]
movups xmm0, xmmword [esp + 0x44]
mov eax, dword [esp + 0x14]
movups xmmword [esp + 0x20], xmm0
test eax, eax
jne 0x40d10c
movups xmmword [esp + 0x60], xmm0
jmp 0x40d118
lea ecx, [esp + 0x60]
push ecx
push eax
call dword [sym.imp.USER32.dll_GetWindowRect]
mov eax, dword [esp + 0x78]
sub eax, dword [esp + 0x70]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x7c]
sub eax, dword [esp + 0x74]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x68]
add eax, dword [esp + 0x60]
cdq
sub eax, edx
mov esi, eax
mov eax, dword [esp + 0x18]
cdq
sub eax, edx
sar esi, 1
sar eax, 1
sub esi, eax
mov eax, dword [esp + 0x6c]
add eax, dword [esp + 0x64]
cdq
sub eax, edx
mov ecx, eax
mov eax, dword [esp + 0x14]
cdq
sub eax, edx
sar ecx, 1
sar eax, 1
sub ecx, eax
mov eax, dword [esp + 0x20]
cmp esi, eax
jge 0x40d170
mov esi, eax
jmp 0x40d184
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x28]
add eax, esi
cmp eax, edx
jle 0x40d184
mov esi, edx
sub esi, dword [esp + 0x18]
mov eax, dword [esp + 0x24]
cmp ecx, eax
jge 0x40d190
mov ecx, eax
jmp 0x40d1a4
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x2c]
add eax, ecx
cmp eax, edx
jle 0x40d1a4
mov ecx, edx
sub ecx, dword [esp + 0x14]
push 0x15
push 0xffffffffffffffff
push 0xffffffffffffffff
push ecx
push esi
push 0
push dword [edi + 4]
call dword [sym.imp.USER32.dll_SetWindowPos]
mov edi, dword [sym.imp.USER32.dll_GetSystemMetrics]
push 0xc
call edi
push 0xb
lea esi, [eax + 0xf]
and esi, 0xfffffff0
call edi
push 0
push esi
add eax, 0xf
and eax, 0xfffffff0
push eax
push 1
push 0x67
push dword [0x4d6804]
call dword [sym.imp.USER32.dll_LoadImageW]
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
push eax
mov eax, dword [esp + 0x20]
push 1
push 0x80
push dword [eax + 4]
call edi
push 0xc
call dword [sym.imp.USER32.dll_GetSystemMetrics]
push 0xb
lea esi, [eax + 0xf]
and esi, 0xfffffff0
call dword [sym.imp.USER32.dll_GetSystemMetrics]
push 0
push esi
add eax, 0xf
and eax, 0xfffffff0
push eax
push 1
push 0x67
push dword [0x4d6804]
call dword [sym.imp.USER32.dll_LoadImageW]
mov esi, dword [esp + 0x1c]
push eax
push 0
push 0x80
push dword [esi + 4]
call edi
push dword [esi + 4]
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x40d255
push 1
push dword [esi + 4]
call dword [sym.imp.USER32.dll_ShowWindow]
call fcn.00418233
call fcn.0041827c
mov esi, dword [0x4d687c]
test esi, esi
je 0x40d293
cmp dword [esi], 0
je 0x40d293
nop
mov ecx, dword [esi + 0x10]
test ecx, ecx
je 0x40d27d
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
mov eax, dword [esi + 0x20]
push 0
mov dword [esi + 0x10], 0
call eax
add esi, 0x24
cmp dword [esi], 0
jne 0x40d270
mov esi, dword [0x4d3ebc]
mov ecx, dword [0x4d3ec0]
cmp esi, ecx
jae 0x40d2bd
mov eax, dword [esi]
test eax, eax
je 0x40d2b6
mov eax, dword [eax + 0x1c]
push 0
call eax
mov ecx, dword [0x4d3ec0]
add esi, 4
cmp esi, ecx
jb 0x40d2a3
mov ecx, 0x4d6850
call fcn.0040a340
call dword [sym.imp.ole32.dll_CoUninitialize]
mov ecx, dword [esp + 0x8c]
xor eax, eax
pop edi
pop esi
xor ecx, esp
call fcn.004820f4
mov esp, ebp
pop ebp
ret 0x10