Function at 0x520ad0
Capabilities:
Check os version

Disassembly:
push 0xffffffffffffffff
push 0x5e1c21
mov eax, dword fs:[0]
push eax
sub esp, 0x84
push ebx
push ebp
push esi
push edi
mov eax, dword [0x72d630]
xor eax, esp
push eax
lea eax, [esp + 0x98]
mov dword fs:[0], eax
mov ebp, ecx
mov esi, dword [esp + 0xb0]
mov ecx, dword [esi + 0xc0]
mov eax, dword [esi + 0x100]
mov edx, dword [esi + 0xc4]
xor ebx, ebx
mov dword [esp + 0x34], ecx
mov ecx, dword [esi + 0xcc]
mov dword [esp + 0x30], eax
mov eax, dword [esi + 0xc8]
mov dword [esp + 0x38], edx
mov edx, dword [esi + 0xfc]
mov dword [esp + 0x40], ecx
mov ecx, esi
mov dword [esp + 0x18], ebx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x50], ebx
mov dword [esp + 0x54], ebx
mov dword [esp + 0x60], ebx
mov dword [esp + 0x64], ebx
mov dword [esp + 0x68], ebx
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x44], edx
call fcn.0052bda0
mov edi, eax
mov eax, dword [esi]
mov edx, dword [eax + 0x58]
lea ecx, [esp + 0x28]
push ecx
mov ecx, esi
mov dword [esp + 0x24], edi
call edx
mov dword [esp + 0xa0], ebx
cmp edi, ebx
je 0x520b97
mov dword [esp + 0x1c], ebx
cmp edi, 1
je 0x520b9f
mov dword [esp + 0x1c], 1
mov edi, dword [esp + 0x30]
mov eax, dword [ebp]
mov edx, dword [eax + 0x130]
push edi
lea ecx, [esp + 0x84]
push ecx
mov ecx, ebp
call edx
mov eax, dword [ebp]
mov edx, dword [eax + 0x120]
push edi
mov ecx, ebp
call edx
mov edi, eax
mov eax, dword [esi]
mov edx, dword [eax + 0x6c]
dec edi
mov ecx, esi
mov dword [esp + 0x2c], edi
call edx
mov dword [esp + 0x58], eax
mov eax, dword [esi + 0x9c]
cmp eax, 0xffffffff
jne 0x520bf5
mov ecx, dword [esi + 0x15c]
cmp ecx, ebx
je 0x520bf5
call fcn.0052c5b0
cmp dword [esp + 0x44], 4
mov dword [esp + 0x24], eax
jne 0x520c09
cmp eax, 5
jne 0x520c09
mov dword [esp + 0x24], ebx
mov eax, dword [esi + 0xfc]
cmp eax, 8
jne 0x520c99
push esi
lea eax, [esp + 0x74]
push eax
mov ecx, ebp
call fcn.0051cba0
mov eax, dword [esi + 0x90]
cmp eax, ebx
jne 0x520c59
mov eax, dword [esi + 0x88]
cmp eax, ebx
jg 0x520c59
mov ecx, dword [esi + 0x15c]
cmp ecx, ebx
je 0x520c4f
mov eax, dword [ecx + 0x2c]
cmp eax, ebx
jg 0x520c59
mov eax, dword [ecx + 0x28]
jmp 0x520c55
mov eax, dword [esi + 0x84]
cmp eax, ebx
je 0x520c72
cmp dword [esp + 0x1c], ebx
je 0x520c72
mov edx, dword [esi]
mov eax, dword [esp + 0x70]
mov edx, dword [edx + 0xa8]
push eax
mov ecx, esi
call edx
jmp 0x520c74
xor eax, eax
cmp dword [ebp + 0x90], ebx
jne 0x520c86
cmp eax, ebx
jne 0x520c86
mov dword [esp + 0x2c], ebx
mov edi, ebx
cmp dword [esp + 0x1c], ebx
jne 0x520c99
mov eax, dword [ebp + 0x124]
mov dword [esp + 0x84], eax
cmp dword [esp + 0xb4], ebx
mov ebx, dword [esp + 0xac]
je 0x520d78
mov ecx, dword [esp + 0x40]
mov eax, dword [ebp + 0x80]
mov edx, dword [esp + 0x3c]
add eax, dword [esp + 0x34]
push ecx
mov ecx, dword [esp + 0x3c]
push edx
add eax, edi
mov edi, dword [sym.imp.USER32.dll_SetRect]
push ecx
push eax
lea edx, [esp + 0x58]
push edx
call edi
mov edx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x3c]
lea ecx, [ecx + edx + 8]
mov edx, dword [esp + 0x40]
push edx
add eax, 0xffffffed
push eax
mov eax, dword [esp + 0x40]
push eax
push ecx
lea ecx, [esp + 0x70]
push ecx
call edi
mov edi, 1
cmp dword [esp + 0x44], edi
jne 0x520d28
lea edx, [esp + 0x1c]
push edx
mov ecx, esi
call fcn.0051bf70
mov ecx, eax
mov dword [esp + 0x18], edi
call dword [sym.imp.mfc90u.dll_ATL::CSimpleStringT_wchar_t_1_::GetLength]
mov byte [esp + 0x17], 1
test eax, eax
jne 0x520d2d
mov byte [esp + 0x17], 0
test byte [esp + 0x18], 1
je 0x520d43
and dword [esp + 0x18], 0xfffffffe
lea ecx, [esp + 0x1c]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
cmp byte [esp + 0x17], 0
je 0x520d78
lea eax, [esp + 0x1c]
push eax
mov ecx, esi
call fcn.0051bf70
push eax
lea ecx, [esp + 0x74]
push ecx
mov ecx, ebx
call fcn.0051d1b0
mov edx, 0xffffffed
sub edx, dword [eax]
lea ecx, [esp + 0x1c]
add dword [esp + 0x50], edx
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov ecx, dword [esp + 0x30]
mov eax, dword [ecx]
mov edx, dword [eax + 0x1a8]
call edx
mov edi, eax
test edi, edi
jne 0x520d99
lea eax, [esp + 0x28]
push eax
call fcn.0051c500
add esp, 4
cmp dword [esp + 0x20], 5
jne 0x520dc4
mov edx, dword [esi]
mov edx, dword [edx + 0x5c]
lea eax, [esp + 0x20]
push eax
mov ecx, esi
call edx
or dword [esp + 0x18], 2
mov ecx, eax
call dword [sym.imp.mfc90u.dll_ATL::CSimpleStringT_wchar_t_1_::IsEmpty]
mov byte [esp + 0x17], 1
test al, al
je 0x520dc9
mov byte [esp + 0x17], 0
test byte [esp + 0x18], 2
je 0x520ddf
and dword [esp + 0x18], 0xfffffffd
lea ecx, [esp + 0x20]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
cmp byte [esp + 0x17], 0
je 0x521094
lea eax, [ebp + 0x10c]
push eax
push ebx
lea ecx, [esp + 0x90]
call fcn.0055cc20
cmp dword [esp + 0xb4], 0
mov byte [esp + 0xa0], 1
je 0x520e3a
mov edx, dword [ebx + 8]
lea ecx, [esp + 0x70]
push ecx
push 1
push 0x6bdc38
push edx
call dword [sym.imp.GDI32.dll_GetTextExtentPoint32W]
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0x74]
lea eax, [ecx + eax + 0xa]
mov dword [esp + 0x54], eax
mov dword [esp + 0x6c], eax
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x58]
mov edx, dword [ebp]
mov edx, dword [edx + 0x134]
push eax
mov eax, dword [esp + 0xb8]
neg edi
push ecx
sbb edi, edi
push eax
and edi, 0xfffff800
add edi, 0x800
or edi, 0x8000
push edi
lea ecx, [esp + 0x58]
push ecx
lea eax, [esp + 0x3c]
push eax
push ebx
mov ecx, ebp
call edx
cmp dword [esp + 0x44], 1
jne 0x520ea4
lea eax, [esp + 0x20]
push eax
mov ecx, esi
call fcn.0051bf70
or dword [esp + 0x18], 4
mov ecx, eax
call dword [sym.imp.mfc90u.dll_ATL::CSimpleStringT_wchar_t_1_::GetLength]
mov byte [esp + 0x17], 1
test eax, eax
jne 0x520ea9
mov byte [esp + 0x17], 0
test byte [esp + 0x18], 4
je 0x520eba
lea ecx, [esp + 0x20]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
cmp byte [esp + 0x17], 0
je 0x520f07
lea ecx, [esp + 0x20]
push ecx
mov ecx, esi
call fcn.0051bf70
mov ecx, dword [esp + 0x24]
mov edx, dword [ebp]
mov edx, dword [edx + 0x134]
push ecx
mov ecx, dword [esp + 0x5c]
push ecx
mov ecx, dword [esp + 0xbc]
push ecx
push 2
lea ecx, [esp + 0x70]
push ecx
push eax
push ebx
mov ecx, ebp
mov byte [esp + 0xbc], 2
call edx
lea ecx, [esp + 0x20]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
lea ecx, [esp + 0x88]
mov byte [esp + 0xa0], 0
call fcn.0055cc60
xor edi, edi
cmp dword [esp + 0xb4], edi
je 0x520fa4
mov eax, dword [esp + 0x3c]
mov edx, dword [esp + 0x48]
mov ecx, dword [esp + 0x54]
add eax, 0xfffffff6
mov dword [esp + 0x78], eax
mov eax, dword [esp + 0x40]
add ecx, 0xfffffffe
mov dword [esp + 0x70], edx
mov edx, dword [esi]
mov edx, dword [edx + 0x5c]
mov dword [esp + 0x7c], eax
lea eax, [esp + 0x20]
mov dword [esp + 0x74], ecx
push eax
mov ecx, esi
call edx
mov esi, eax
mov ebp, dword [ebx]
push 0x810
lea eax, [esp + 0x74]
push eax
mov ecx, esi
mov byte [esp + 0xa8], 3
call dword [sym.imp.mfc90u.dll_ATL::CSimpleStringT_wchar_t_1_::GetLength]
push eax
mov ecx, esi
call dword [sym.imp.mfc90u.dll_]
mov edx, dword [ebp + 0x70]
push eax
mov ecx, ebx
call edx
lea ecx, [esp + 0x20]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov esi, dword [esp + 0xa8]
mov dword [esi], edi
mov dword [esi + 4], edi
jmp 0x52119a
mov eax, dword [esi]
mov edx, dword [eax + 0x5c]
lea ecx, [esp + 0x20]
push ecx
mov ecx, esi
call edx
push eax
lea eax, [esp + 0x5c]
push eax
mov ecx, ebx
call fcn.0051d1b0
lea ecx, [esp + 0x20]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov eax, dword [esp + 0x58]
add eax, 0x14
cdq
sub eax, edx
sar eax, 1
push 0x697ec8
lea ecx, [esp + 0x20]
mov dword [esp + 0x38], edi
mov dword [esp + 0x3c], edi
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], edi
call dword [0x612678]
mov edi, dword [ebx]
push 0x410
lea ecx, [esp + 0x38]
push ecx
lea ecx, [esp + 0x24]
mov byte [esp + 0xa8], 4
call dword [sym.imp.mfc90u.dll_ATL::CSimpleStringT_wchar_t_1_::GetLength]
push eax
lea ecx, [esp + 0x28]
call dword [sym.imp.mfc90u.dll_]
mov edx, dword [edi + 0x70]
push eax
mov ecx, ebx
call edx
lea ecx, [esp + 0x1c]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov eax, dword [esp + 0x68]
sub eax, dword [esp + 0x60]
mov ecx, dword [ebp + 0x80]
sub eax, dword [esp + 0x48]
mov edx, dword [esp + 0x40]
sub edx, dword [esp + 0x38]
mov ebx, dword [esp + 0x2c]
sub edx, dword [esp + 0x4c]
add eax, ecx
add eax, dword [esp + 0x50]
lea edi, [eax + ebx + 0x20]
mov eax, dword [esp + 0x54]
lea eax, [edx + eax + 0x13]
mov edx, dword [esp + 0x84]
cmp edx, eax
mov dword [esp + 0x30], edx
jg 0x521076
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x58]
cdq
sub eax, edx
sar eax, 1
add eax, ecx
lea eax, [eax + ebx + 0x20]
cmp edi, eax
jle 0x52108b
mov eax, edi
mov ecx, dword [esp + 0x30]
jmp 0x521186
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x58]
mov edx, dword [ebp]
mov edx, dword [edx + 0x134]
push eax
mov eax, dword [esp + 0xb8]
neg edi
push ecx
sbb edi, edi
push eax
and edi, 0xfffff800
add edi, 0x800
or edi, 0x8000
push edi
lea ecx, [esp + 0x58]
push ecx
lea eax, [esp + 0x3c]
push eax
push ebx
mov ecx, ebp
call edx
cmp dword [esp + 0x44], 1
jne 0x5210fe
lea eax, [esp + 0x20]
push eax
mov ecx, esi
call fcn.0051bf70
or dword [esp + 0x18], 8
mov ecx, eax
call dword [sym.imp.mfc90u.dll_ATL::CSimpleStringT_wchar_t_1_::GetLength]
mov byte [esp + 0x17], 1
test eax, eax
jne 0x521103
mov byte [esp + 0x17], 0
test byte [esp + 0x18], 8
je 0x521114
lea ecx, [esp + 0x20]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
cmp byte [esp + 0x17], 0
je 0x521161
lea ecx, [esp + 0x1c]
push ecx
mov ecx, esi
call fcn.0051bf70
mov ecx, dword [esp + 0x24]
mov edx, dword [ebp]
mov edx, dword [edx + 0x134]
push ecx
mov ecx, dword [esp + 0x5c]
push ecx
mov ecx, dword [esp + 0xbc]
push ecx
push 2
lea ecx, [esp + 0x70]
push ecx
push eax
push ebx
mov ecx, ebp
mov byte [esp + 0xbc], 5
call edx
lea ecx, [esp + 0x1c]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov eax, dword [ebp + 0x80]
sub eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x2c]
sub eax, dword [esp + 0x48]
add eax, dword [esp + 0x68]
add eax, dword [esp + 0x50]
lea eax, [eax + ecx + 0x20]
mov ecx, dword [esp + 0x84]
push 0
push ecx
push eax
push esi
mov esi, dword [esp + 0xb8]
push esi
mov ecx, ebp
call fcn.0051cb20
lea ecx, [esp + 0x28]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov eax, esi
mov ecx, dword [esp + 0x98]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x90
ret 0x10