Function at 0x43f190
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x118
mov eax, dword [0x5f1014]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [0x5f3294], 0
push esi
mov esi, dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push edi
jne 0x43f204
push 0x5f3310
mov dword [0x5f3294], 1
call esi
push 0x5f3328
call esi
push 0x5f3298
call esi
push 0x5f32b0
call esi
push 0x5f3340
call esi
push 0x5f3370
call esi
push 0x5f32c8
call esi
push 0x5f32f8
call esi
push 0x5f32e0
call esi
push 0x5f3358
call esi
mov edi, dword [0x5f350c]
test edi, edi
je 0x43f23d
cmp dword [edi], 0xffffffff
je 0x43f22b
push 0x5f3358
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
inc dword [edi]
push 0x5f3358
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, edi
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e389c
mov esp, ebp
pop ebp
ret
push ebx
push 0x48
call fcn.00581b90
mov edi, eax
add esp, 4
lea ecx, [edi + 0x1c]
mov dword [edi], 1
push ecx
mov dword [edi + 4], 0
mov dword [edi + 0x18], 0x5d941c
call esi
mov ebx, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [edi + 0x34], 0
mov dword [edi + 0x38], 0
mov dword [edi + 8], 0
mov dword [edi + 0xc], 0
mov dword [edi + 0x10], 0xc
mov dword [edi + 0x14], 0
cmp dword [0x5f3530], 2
je 0x43f33d
push 0x5f3358
call ebx
mov esi, dword [0x5f3530]
mov ecx, 1
test esi, esi
mov eax, esi
push 0x5f3358
cmove eax, ecx
mov dword [0x5f3530], eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test esi, esi
je 0x43f2da
mov eax, dword [0x5f3530]
cmp eax, 2
jne 0x43f2d3
jmp 0x43f33d
push 0x5f3358
mov dword [0x5f3534], 0x5da150
mov dword [0x5f3538], 0x461e10
mov dword [0x5f353c], 0x461ee0
mov dword [0x5f3544], 0x462170
mov dword [0x5f3540], 0x462010
mov dword [0x5f3548], 0x4622e0
call ebx
mov eax, dword [0x5f3530]
mov ecx, 2
cmp eax, 1
push 0x5f3358
cmove eax, ecx
mov dword [0x5f3530], eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea eax, [ebp - 0x118]
mov dword [edi + 0x40], 0x5f3534
push eax
mov dword [edi + 0x3c], 0
xor esi, esi
mov dword [ebp - 0x118], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [ebp - 0x108], 1
jne 0x43f37f
cmp dword [ebp - 0x114], 4
jne 0x43f37f
cmp dword [ebp - 0x110], 0xa
je 0x43f39f
push str.msimg32
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [edi + 0x3c], eax
test eax, eax
je 0x43f39f
push 0x5e4474
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
push 0x5f3358
mov dword [edi + 0x44], esi
call ebx
mov esi, dword [0x5f350c]
mov eax, esi
test esi, esi
push 0x5f3358
cmove eax, edi
mov dword [0x5f350c], eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test esi, esi
jne 0x43f3f6
cmp dword [edi], 0xffffffff
je 0x43f3e3
push 0x5f3358
call ebx
inc dword [edi]
push 0x5f3358
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop ebx
mov eax, edi
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e389c
mov esp, ebp
pop ebp
ret
push edi
call fcn.005800e5
mov esi, dword [0x5f350c]
add esp, 4
test esi, esi
je 0x43f422
cmp dword [esi], 0xffffffff
je 0x43f422
push 0x5f3358
call ebx
inc dword [esi]
push 0x5f3358
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 4]
mov eax, esi
pop ebx
pop edi
xor ecx, ebp
pop esi
call fcn.004e389c
mov esp, ebp
pop ebp
ret