Function at 0x3970120
Capabilities:
Check os version
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x3a2d9c0
mov eax, dword fs:[0]
push eax
sub esp, 0x2ec
mov eax, dword [0x3a7682c]
xor eax, esp
mov dword [esp + 0x2e8], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x3a7682c]
xor eax, esp
push eax
lea eax, [esp + 0x300]
mov dword fs:[0], eax
mov eax, dword [esp + 0x314]
mov edx, dword [0x3a78b08]
mov esi, dword [esp + 0x310]
mov edi, dword [esp + 0x318]
mov ebx, dword [esp + 0x31c]
mov ebp, ecx
mov ecx, dword [esp + 0x320]
mov dword [esp + 0x18], eax
mov dword [ebp + 0x30], edx
mov eax, dword [0x3a78b0c]
mov dword [ebp + 0x34], eax
xor eax, eax
mov dword [esp + 0x64], ebp
mov dword [esp + 0x28], esi
mov dword [esp + 0x5c], edi
mov dword [esp + 0x60], ebx
mov dword [esp + 0x30], ecx
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov byte [esp + 0x15], al
mov byte [esp + 0x16], 1
cmp dword [ebp], eax
jne 0x39701c6
mov byte [esp + 0x15], 1
lea ecx, [esp + 0x50]
push ecx
mov ecx, dword [esp + 0x34]
lea edx, [esp + 0x44]
push edx
push ecx
push ebx
xor eax, eax
push edi
push eax
push esi
mov dword [esp + 0x6c], eax
mov dword [esp + 0x64], eax
call fcn.03964520
add esp, 0x1c
mov dword [esp + 0x68], eax
cmp eax, 1
jne 0x39701fb
xor al, al
jmp 0x3970988
test eax, eax
je 0x3970204
cmp eax, 2
jne 0x397022b
mov edx, dword [esp + 0x40]
push 0
push edx
mov ecx, esi
call fcn.0394edf0
mov eax, dword [eax]
and eax, 7
cmp eax, 3
je 0x3970226
cmp eax, 4
jne 0x397022b
mov byte [esp + 0x16], 0
mov byte [esp + 0x15], 0
cmp byte [esp + 0x16], 0
mov dword [esp + 0x50], 3
je 0x397028a
mov edx, dword [esp + 0x30]
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x48]
push ecx
push edx
push ebx
push edi
push 1
push esi
call fcn.03964520
add esp, 0x1c
mov dword [esp + 0x50], eax
cmp eax, 1
je 0x39701f4
test eax, eax
je 0x3970268
cmp eax, 2
jne 0x397028a
mov eax, dword [esp + 0x44]
push 1
push eax
mov ecx, esi
call fcn.0394edf0
mov eax, dword [eax]
and eax, 7
cmp eax, 3
je 0x3970285
cmp eax, 4
jne 0x397028a
mov byte [esp + 0x15], 0
cmp dword [esp + 0x40], 0
jne 0x39702b3
cmp dword [esp + 0x44], 0
jne 0x39702b3
mov ecx, esi
call fcn.03961be0
cmp eax, 3
je 0x39702ae
call fcn.03961be0
cmp eax, 4
jne 0x39702b3
mov byte [esp + 0x15], 0
lea ecx, [ebp + 0x10]
push ecx
call dword [0x3a600b0]
test byte [ebp + 0x38], 4
je 0x397088f
cmp byte [esp + 0x15], 0
je 0x397088f
cmp dword [ebp + 8], 0x80000001
jne 0x397032a
lea ecx, [esp + 0x6c]
call fcn.039efdc0
mov dword [esp + 0x308], 0
mov eax, dword [esp + 0x30]
lea edx, [esp + 0x6c]
push edx
push eax
push ebx
call fcn.03961ae0
mov ecx, dword [esp + 0x78]
push ecx
push esi
call fcn.03964f40
add esp, 0x14
test al, al
je 0x3970316
mov byte [esp + 0x15], 0
mov dword [esp + 0x308], 0xffffffff
lea ecx, [esp + 0x6c]
call fcn.039ef660
cmp byte [esp + 0x15], 0
je 0x397088f
mov ecx, dword [esp + 0x18]
mov edi, dword [0x3a600c4]
mov esi, 5
test ecx, ecx
je 0x397036e
lea eax, [ebp + 0x30]
push eax
push 0
push 0
push 0
push 0
lea edx, [esp + 0x48]
push edx
lea eax, [esp + 0x44]
push eax
lea edx, [esp + 0x74]
push edx
push 0
push 0
push 0
push ecx
call edi
mov esi, eax
mov byte [esp + 0x15], 0
cmp esi, 5
jne 0x39703fe
lea ecx, [esp + 0x6c]
call fcn.039efdc0
mov dword [esp + 0x308], 1
mov ecx, dword [esp + 0x30]
lea eax, [esp + 0x6c]
push eax
push ecx
push ebx
call fcn.03961ae0
mov eax, dword [esp + 0x78]
mov ecx, dword [esp + 0x68]
add esp, 0xc
lea edx, [esp + 0x18]
push edx
push 9
push 0
push eax
push ecx
call dword [0x3a60004]
mov esi, eax
test esi, esi
jne 0x39703ea
lea eax, [ebp + 0x30]
push eax
push esi
push esi
push esi
push esi
lea edx, [esp + 0x48]
push edx
mov edx, dword [esp + 0x30]
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x74]
push ecx
push esi
push esi
push esi
push edx
mov byte [esp + 0x45], 1
call edi
mov esi, eax
mov dword [esp + 0x308], 0xffffffff
lea ecx, [esp + 0x6c]
call fcn.039ef660
test esi, esi
jne 0x397087d
cmp dword [esp + 0x58], esi
je 0x397087d
lea ecx, [esp + 0x110]
call fcn.039efdc0
mov dword [esp + 0x308], 2
lea ecx, [esp + 0x6c]
call fcn.039efdc0
mov byte [esp + 0x308], 3
mov eax, dword [esp + 0x2c]
inc eax
push eax
lea ecx, [esp + 0x114]
call fcn.039efb00
mov ecx, dword [esp + 0x34]
inc ecx
push ecx
lea ecx, [esp + 0x70]
call fcn.039efb00
mov eax, dword [ebp + 0x28]
sub eax, dword [ebp + 0x24]
lea ebx, [ebp + 0x18]
xor edi, edi
sar eax, 2
mov dword [esp + 0x48], edi
mov dword [esp + 0x54], eax
nop
mov edx, dword [esp + 0x118]
mov eax, dword [esp + 0x74]
mov dword [esp + 0x1c], edx
lea ecx, [esp + 0x38]
push ecx
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x70]
lea edx, [esp + 0x28]
push edx
mov edx, dword [esp + 0x118]
push eax
mov eax, dword [esp + 0x24]
push 0
lea ecx, [esp + 0x2c]
push ecx
push edx
push edi
push eax
call dword [0x3a6002c]
mov esi, eax
mov dword [esp + 0x4c], esi
cmp esi, 5
jne 0x3970558
lea ecx, [esp + 0x1b4]
call fcn.039efdc0
mov byte [esp + 0x308], 4
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x60]
lea ecx, [esp + 0x1b4]
push ecx
push edx
push eax
call fcn.03961ae0
mov edx, dword [esp + 0x1c0]
mov eax, dword [esp + 0x68]
add esp, 0xc
lea ecx, [esp + 0x18]
push ecx
push 9
push 0
push edx
push eax
call dword [0x3a60004]
mov esi, eax
mov dword [esp + 0x4c], esi
test esi, esi
jne 0x3970544
mov eax, dword [esp + 0x6c]
lea ecx, [esp + 0x38]
push ecx
lea edx, [esp + 0x28]
push edx
mov edx, dword [esp + 0x118]
push eax
mov eax, dword [esp + 0x24]
push esi
lea ecx, [esp + 0x2c]
push ecx
push edx
push edi
push eax
mov byte [esp + 0x35], 1
call dword [0x3a6002c]
mov esi, eax
mov dword [esp + 0x4c], eax
mov byte [esp + 0x308], 3
lea ecx, [esp + 0x1b4]
call fcn.039ef660
cmp esi, 0xea
jne 0x39705dc
mov eax, dword [esp + 0x1c]
cmp eax, dword [esp + 0x2c]
jbe 0x3970580
mov dword [esp + 0x2c], eax
inc eax
push eax
lea ecx, [esp + 0x114]
call fcn.039efb00
mov eax, dword [esp + 0x24]
cmp eax, dword [esp + 0x34]
jbe 0x397059a
inc eax
mov dword [esp + 0x34], eax
inc eax
push eax
lea ecx, [esp + 0x70]
call fcn.039efb00
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x34]
inc ecx
inc edx
mov dword [esp + 0x1c], ecx
lea eax, [esp + 0x38]
push eax
mov dword [esp + 0x28], edx
mov edx, dword [esp + 0x70]
lea ecx, [esp + 0x28]
push ecx
mov ecx, dword [esp + 0x118]
push edx
mov edx, dword [esp + 0x24]
push 0
lea eax, [esp + 0x2c]
push eax
push ecx
push edi
push edx
call dword [0x3a6002c]
mov esi, eax
mov dword [esp + 0x4c], esi
mov eax, esi
neg eax
sbb eax, eax
not eax
and eax, dword [esp + 0x1c]
lea ecx, [esp + 0x110]
push eax
call fcn.039efbb0
mov ecx, esi
neg ecx
sbb ecx, ecx
not ecx
and ecx, dword [esp + 0x24]
push ecx
lea ecx, [esp + 0x70]
call fcn.039efbb0
mov byte [esp + 0x17], 0
test esi, esi
jne 0x3970824
cmp dword [ebp + 8], 0x80000001
jne 0x397068b
lea ecx, [esp + 0x258]
call fcn.039efdc0
mov byte [esp + 0x308], 5
mov eax, dword [esp + 0x110]
mov ecx, dword [ebp + 0xc]
lea edx, [esp + 0x258]
push edx
push eax
push ecx
call fcn.03961ae0
mov edx, dword [esp + 0x264]
mov eax, dword [esp + 0x34]
push edx
push eax
call fcn.03964f40
add esp, 0x14
test al, al
je 0x397066c
mov byte [esp + 0x17], 1
mov byte [esp + 0x308], 3
lea ecx, [esp + 0x258]
call fcn.039ef660
cmp byte [esp + 0x17], 0
jne 0x397082c
xor esi, esi
cmp dword [esp + 0x54], esi
mov dword [esp + 0x20], 0xffffffff
jle 0x397074d
nop
cmp dword [esp + 0x20], 0xffffffff
jne 0x397072f
mov ecx, dword [ebx + 0x10]
sub ecx, dword [ebx + 0xc]
sar ecx, 2
cmp esi, ecx
jb 0x39706bd
call fcn.03a01b13
mov edx, dword [ebx + 0x10]
sub edx, dword [ebx + 0xc]
sar edx, 2
cmp esi, edx
jb 0x39706cf
call fcn.03a01b13
mov eax, dword [ebx + 0xc]
lea edi, [esi*4]
mov ecx, dword [edi + eax]
mov ebp, dword [ecx + 4]
cmp ebp, dword [esp + 0x1c]
jne 0x397071d
mov edx, dword [ebx + 0x10]
sub edx, eax
sar edx, 2
cmp esi, edx
jb 0x39706f6
call fcn.03a01b13
mov eax, dword [ebx + 0xc]
mov edx, dword [esp + 0x110]
add eax, edi
mov eax, dword [eax]
mov eax, dword [eax]
lea ecx, [ebp + ebp]
push ecx
push eax
push edx
call fcn.03a0232e
add esp, 0xc
test eax, eax
jne 0x397071d
mov dword [esp + 0x20], esi
inc esi
cmp esi, dword [esp + 0x54]
jl 0x39706a0
cmp dword [esp + 0x20], 0xffffffff
je 0x397074d
mov eax, dword [ebx + 0x10]
sub eax, dword [ebx + 0xc]
mov esi, dword [esp + 0x20]
sar eax, 2
cmp esi, eax
jb 0x3970745
call fcn.03a01b13
mov ecx, dword [ebx + 0xc]
mov esi, dword [ecx + esi*4]
jmp 0x397078f
push 0x150
call fcn.0393d940
add esp, 4
mov dword [esp + 0x20], eax
mov byte [esp + 0x308], 6
test eax, eax
je 0x3970773
mov ecx, eax
call fcn.03963520
jmp 0x3970775
xor eax, eax
mov byte [esp + 0x308], 3
lea edx, [esp + 0x20]
mov esi, eax
push edx
mov ecx, ebx
mov dword [esp + 0x24], esi
call fcn.03949af0
mov eax, dword [0x3a56b80]
lea edi, [esi + 0xa4]
lea ecx, [esp + 0x6c]
mov ebp, eax
cmp edi, ecx
je 0x39707cc
mov edx, dword [esp + 0x6c]
neg edx
sbb edx, edx
not edx
and edx, eax
push edx
mov ecx, edi
call fcn.039efbb0
push ebp
push 0
lea eax, [esp + 0x74]
push eax
mov ecx, edi
call fcn.039eff20
mov eax, dword [0x3a56b80]
lea ecx, [esp + 0x110]
mov edi, eax
cmp esi, ecx
je 0x3970802
mov edx, dword [esp + 0x110]
neg edx
sbb edx, edx
not edx
and edx, eax
push edx
mov ecx, esi
call fcn.039efbb0
push edi
push 0
lea eax, [esp + 0x118]
push eax
mov ecx, esi
call fcn.039eff20
mov ecx, dword [esp + 0x38]
mov edi, dword [esp + 0x48]
mov ebp, dword [esp + 0x64]
mov dword [esi + 0x148], ecx
mov edx, dword [esp + 0x3c]
mov dword [esi + 0x14c], edx
mov esi, dword [esp + 0x4c]
jmp 0x3970848
cmp esi, 0x103
je 0x3970848
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
push edi
push eax
call fcn.039619a0
push eax
push esi
push str.do_load_subkeys::RegEnumKeyEx_return__d_for__ls_ls__d__n
call fcn.0393dda0
add esp, 0x14
inc edi
mov dword [esp + 0x48], edi
test esi, esi
je 0x3970470
mov byte [esp + 0x308], 2
lea ecx, [esp + 0x6c]
call fcn.039ef660
mov dword [esp + 0x308], 0xffffffff
lea ecx, [esp + 0x110]
call fcn.039ef660
cmp byte [esp + 0x15], 0
je 0x397088f
mov eax, dword [esp + 0x18]
push eax
call dword [0x3a60088]
cmp byte [esp + 0x16], 0
mov ebx, dword [0x3a600c0]
je 0x3970901
cmp dword [esp + 0x50], 0
jne 0x3970901
mov ecx, dword [esp + 0x44]
push 1
push ecx
mov ecx, dword [esp + 0x30]
call fcn.0394edf0
mov esi, eax
mov edx, dword [esi + 0x10]
mov eax, dword [esi + 0x14]
lea ecx, [esp + 0x38]
push ecx
lea edi, [ebp + 0x30]
push edi
mov dword [esp + 0x40], edx
mov dword [esp + 0x44], eax
call ebx
test eax, eax
jge 0x39708dd
mov edx, dword [esi + 0x10]
mov dword [edi], edx
mov eax, dword [esi + 0x14]
mov dword [edi + 4], eax
mov ecx, dword [esi + 0x30]
mov edi, dword [esp + 0x28]
push ecx
push 1
push edi
mov ecx, ebp
call fcn.03968e70
mov edx, dword [esi + 0x18]
mov eax, dword [esi + 0x20]
push edx
push eax
push 1
push edi
mov ecx, ebp
call fcn.0396f970
cmp dword [esp + 0x68], 0
jne 0x3970966
mov ecx, dword [esp + 0x40]
push 0
push ecx
mov ecx, dword [esp + 0x30]
call fcn.0394edf0
mov esi, eax
mov edx, dword [esi + 0x10]
mov eax, dword [esi + 0x14]
lea ecx, [esp + 0x38]
push ecx
lea edi, [ebp + 0x30]
push edi
mov dword [esp + 0x40], edx
mov dword [esp + 0x44], eax
call ebx
test eax, eax
jge 0x3970942
mov edx, dword [esi + 0x10]
mov dword [edi], edx
mov eax, dword [esi + 0x14]
mov dword [edi + 4], eax
mov ecx, dword [esi + 0x30]
mov edi, dword [esp + 0x28]
push ecx
push 0
push edi
mov ecx, ebp
call fcn.03968e70
mov edx, dword [esi + 0x18]
mov eax, dword [esi + 0x20]
push edx
push eax
push 0
push edi
mov ecx, ebp
call fcn.0396f970
cmp dword [ebp + 0x30], 0
lea eax, [ebp + 0x30]
jne 0x3970986
cmp dword [ebp + 0x34], 0
jne 0x3970986
mov ecx, dword [0x3a78b08]
mov dword [eax], ecx
mov edx, dword [0x3a78b0c]
mov dword [eax + 4], edx
mov al, 1
mov ecx, dword [esp + 0x300]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x2e8]
xor ecx, esp
call fcn.03a00f6a
add esp, 0x2f8
ret 0x14