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

Disassembly:
push 0xffffffffffffffff
push 0x721940
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x3c
mov eax, dword [0x7a39fc]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x74]
mov ebp, dword [esi + 0x60]
mov ebx, ecx
mov ecx, dword [eax + 4]
xor eax, eax
cmp ebp, eax
push edi
mov dword [esp + 0x30], ecx
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x20], eax
je 0x5a1445
lea edi, [ebp*4]
push edi
call fcn.006fa7e6
lea edx, [ebp + ebp]
push edx
mov dword [esp + 0x18], eax
call fcn.006fa7e6
push edi
mov dword [esp + 0x20], eax
call fcn.006fa7e6
add esp, 0xc
mov dword [esp + 0x20], eax
xor eax, eax
cmp ebp, eax
mov dword [esp + 0x78], eax
jle 0x5a1631
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x20]
xor edi, edi
sub eax, ecx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x24], eax
mov ecx, dword [esi + 0x64]
push str.PLAYER
add ecx, edi
call fcn.005e5290
test eax, eax
je 0x5a1492
mov eax, dword [ebx + 0x64]
cmp dword [eax], 0
je 0x5a1488
mov ebp, dword [ebx + 0x7c]
jmp 0x5a157b
mov ebp, 0x7f000000
jmp 0x5a157b
mov ecx, dword [esi + 0x64]
push 0x74a608
add ecx, edi
call fcn.005e5290
test eax, eax
je 0x5a14b0
mov ebp, dword [ebx + 0x80]
jmp 0x5a157b
mov ecx, dword [esi + 0x64]
push str.NPC1
add ecx, edi
call fcn.005e5290
test eax, eax
je 0x5a14f7
mov ecx, dword [0x7a39fc]
mov ecx, dword [ecx + 4]
push 1
call fcn.005ed8b0
mov ecx, eax
call fcn.006346c0
test eax, eax
je 0x5a1488
mov eax, dword [eax + 4]
mov edx, dword [0x7a39fc]
mov ecx, dword [edx + 8]
push eax
call fcn.004aea30
mov ebp, eax
jmp 0x5a157b
mov ecx, dword [esi + 0x64]
push str.NPC2
add ecx, edi
call fcn.005e5290
test eax, eax
je 0x5a153e
mov eax, dword [0x7a39fc]
mov ecx, dword [eax + 4]
push 2
call fcn.005ed8b0
mov ecx, eax
call fcn.006346c0
test eax, eax
je 0x5a1488
mov eax, dword [eax + 4]
mov ecx, dword [0x7a39fc]
mov ecx, dword [ecx + 8]
push eax
call fcn.004aea30
mov ebp, eax
jmp 0x5a157b
mov edx, dword [esi + 0x64]
mov ecx, dword [esp + 0x74]
push 0
add edx, edi
push edx
call fcn.004cb5c0
mov edx, dword [esi + 0x64]
mov ebp, eax
mov eax, dword [0x7a39fc]
mov ecx, dword [eax + 4]
add edx, edi
push edx
call fcn.005ed690
mov ecx, eax
call fcn.0062f840
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x18]
neg eax
sbb eax, eax
inc eax
mov dword [ecx + edx], eax
mov eax, dword [0x7a39fc]
mov ecx, dword [eax + 8]
push ebp
call fcn.004ae750
test eax, eax
je 0x5a15b3
mov ecx, dword [esp + 0x30]
push ebp
call fcn.005eda50
mov ecx, dword [esp + 0x18]
mov dword [ecx], eax
mov edx, dword [esi + 0x64]
mov ax, word [edx + edi + 8]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x78]
mov word [ecx + edx*2], ax
jmp 0x5a160e
lea ecx, [esp + 0x3c]
call fcn.005b3190
mov eax, dword [esi + 0x64]
mov ecx, dword [eax + edi + 4]
mov edx, dword [eax + edi]
push ecx
push edx
lea eax, [esp + 0x44]
push str.Error:_dialogue_cant_find_object__s_
push eax
mov dword [esp + 0x64], 0
call fcn.005e5680
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x88]
mov dword [ecx], 0x7f000000
add esp, 0x10
lea ecx, [esp + 0x3c]
mov word [edx + eax*2], 0
mov dword [esp + 0x54], 0xffffffff
call fcn.005e5c20
mov eax, dword [esp + 0x78]
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
inc eax
add edx, 4
add edi, 0xc
cmp eax, ecx
mov dword [esp + 0x78], eax
mov dword [esp + 0x18], edx
jl 0x5a1465
mov ebp, dword [esp + 0x68]
cmp ebp, 0x7f000000
mov edi, dword [esp + 0x7c]
je 0x5a16a7
mov ecx, dword [0x7a39fc]
mov ecx, dword [ecx + 8]
push ebp
call fcn.004ae750
test eax, eax
je 0x5a1776
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0x10]
test eax, eax
je 0x5a1776
mov dword [edi], 0
mov eax, dword [0x7a39fc]
mov ecx, dword [eax + 4]
push ebp
call fcn.005eda50
mov ecx, dword [0x7a39fc]
mov ecx, dword [ecx + 4]
push eax
call fcn.005ed580
test eax, eax
je 0x5a1785
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
test eax, eax
je 0x5a1785
mov dword [edi], 0
mov ebp, dword [esp + 0x64]
cmp ebp, 0x7f000000
je 0x5a1715
mov ecx, dword [0x7a39fc]
mov ecx, dword [ecx + 8]
push ebp
call fcn.004ae750
test eax, eax
je 0x5a1785
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0x10]
test eax, eax
je 0x5a1785
mov dword [edi], 0
mov eax, dword [0x7a39fc]
mov ecx, dword [eax + 4]
push ebp
call fcn.005eda50
mov ecx, dword [0x7a39fc]
mov ecx, dword [ecx + 4]
push eax
call fcn.005ed580
test eax, eax
je 0x5a1785
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
test eax, eax
je 0x5a1785
mov dword [edi], 0
mov ebp, dword [esp + 0x6c]
cmp ebp, 0x7f000000
je 0x5a1790
mov eax, dword [0x7a39fc]
mov ecx, dword [eax + 8]
push ebp
call fcn.004ae750
test eax, eax
je 0x5a1785
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0x10]
test eax, eax
je 0x5a1785
mov dword [edi], 0
mov eax, dword [0x7a39fc]
mov ecx, dword [eax + 4]
push ebp
call fcn.005eda50
mov ecx, dword [0x7a39fc]
mov ecx, dword [ecx + 4]
push eax
call fcn.005ed580
xor ebp, ebp
cmp eax, ebp
je 0x5a1785
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
test eax, eax
je 0x5a1785
mov dword [edi], ebp
jmp 0x5a1792
mov eax, dword [esp + 0x7c]
mov dword [eax], 0xa
jmp 0x5a1bdd
mov dword [edi], 0xa
jmp 0x5a1bdd
xor ebp, ebp
mov eax, dword [0x7a39fc]
mov ecx, dword [eax + 8]
lea edx, [esp + 0x2c]
push edx
lea eax, [esp + 0x2c]
push eax
mov dword [esp + 0x7c], ebp
call fcn.004aede0
mov ecx, eax
call fcn.004ade40
mov ecx, dword [0x7a39fc]
mov ecx, dword [ecx + 8]
lea edx, [esp + 0x34]
push edx
mov edx, dword [ebx + 0x128]
lea eax, [esp + 0x3c]
push eax
mov eax, dword [ebx + 0x124]
push edx
mov edx, dword [esp + 0x38]
push eax
mov eax, dword [esp + 0x38]
push edx
push eax
call fcn.004aede0
mov ecx, eax
call fcn.004ae460
mov eax, dword [ebx + 0x120]
cmp eax, ebp
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
mov dword [ebx + 0x124], ecx
mov dword [ebx + 0x128], edx
jbe 0x5a1829
mov ecx, dword [esp + 0x34]
cmp eax, ecx
ja 0x5a1821
mov dword [ebx + 0x120], ebp
mov dword [esp + 0x74], 1
jmp 0x5a1829
sub eax, ecx
mov dword [ebx + 0x120], eax
cmp dword [esp + 0x1c], ebp
mov dword [esp + 0x78], ebp
jle 0x5a190a
mov ebp, dword [esp + 0x10]
mov eax, dword [esp + 0x20]
sub eax, ebp
mov dword [esp + 0x24], eax
cmp dword [eax + ebp], 0
je 0x5a18c2
mov edi, dword [ebp]
mov eax, dword [0x7a39fc]
mov ecx, dword [eax + 8]
push edi
call fcn.004aea30
mov ecx, dword [0x7a39fc]
mov ecx, dword [ecx + 8]
push eax
call fcn.004ae750
test eax, eax
je 0x5a187a
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0x10]
test eax, eax
jne 0x5a1882
mov eax, dword [esp + 0x74]
test eax, eax
je 0x5a18e8
mov eax, dword [esp + 0x7c]
mov dword [eax], 0
mov ecx, dword [0x7a39fc]
mov ecx, dword [ecx + 4]
push edi
call fcn.005ed580
test eax, eax
je 0x5a18aa
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
test eax, eax
jne 0x5a18b2
mov eax, dword [esp + 0x74]
test eax, eax
je 0x5a18dc
mov eax, dword [esp + 0x7c]
mov dword [eax], 0
mov edi, eax
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x78]
mov edx, dword [esp + 0x1c]
inc ecx
add ebp, 4
cmp ecx, edx
mov dword [esp + 0x78], ecx
jl 0x5a1845
jmp 0x5a190a
mov ecx, dword [esp + 0x7c]
mov dword [ecx], 0xa
jmp 0x5a18f2
mov edx, dword [esp + 0x7c]
mov dword [edx], 0xa
mov eax, dword [ebx + 0x120]
test eax, eax
jne 0x5a190f
mov edi, dword [esp + 0x7c]
mov dword [ebx + 0x120], 0x5dc
cmp dword [edi], 0xa
jne 0x5a194b
mov eax, dword [esp + 0x10]
test eax, eax
je 0x5a1920
push eax
call fcn.006fa390
add esp, 4
mov eax, dword [esp + 0x14]
test eax, eax
je 0x5a1931
push eax
call fcn.006fa390
add esp, 4
mov eax, dword [esp + 0x20]
test eax, eax
je 0x5a1bdd
push eax
call fcn.006fa390
add esp, 4
jmp 0x5a1bdd
mov edx, dword [ebx + 0xa4]
mov eax, dword [ebx + 0x9c]
mov ecx, dword [ebx + eax*4 + 0xa8]
xor edi, edi
cmp edx, edi
je 0x5a1974
mov edx, dword [ebx + 0xa0]
add edx, eax
mov dword [ebx + 0x9c], edx
jmp 0x5a1980
sub eax, dword [ebx + 0xa0]
mov dword [ebx + 0x9c], eax
cmp dword [ebx + 0x9c], 0x13
jl 0x5a198f
mov dword [ebx + 0x9c], edi
cmp dword [ebx + 0x9c], edi
jge 0x5a19a1
mov dword [ebx + 0x9c], 0x12
cmp dword [esi + 0x8c], edi
jne 0x5a19c3
cmp dword [ebx + 0xf4], edi
je 0x5a19bd
mov dword [esi + 0x8c], 2
jmp 0x5a19c3
mov dword [esi + 0x8c], ecx
mov eax, dword [esp + 0x70]
push eax
lea ecx, [esi + 8]
push ecx
lea edx, [esp + 0x4c]
push edx
mov ecx, ebx
mov dword [ebx + 0xf4], edi
call fcn.0059f320
cmp dword [ebx + 0x40], edi
mov dword [esp + 0x54], 1
je 0x5a1a44
mov eax, dword [esp + 0x64]
push eax
mov ecx, ebx
call fcn.005a0ba0
mov ecx, dword [esp + 0x68]
push ecx
mov ecx, ebx
call fcn.005a0ba0
mov edx, dword [esp + 0x6c]
push edx
mov ecx, ebx
call fcn.005a0ba0
mov ebp, dword [esp + 0x1c]
xor edi, edi
test ebp, ebp
jle 0x5a1a48
lea esp, [esp]
mov eax, dword [0x7a39fc]
mov edx, dword [esp + 0x10]
mov ecx, dword [eax + 8]
mov eax, dword [edx + edi*4]
push eax
call fcn.004aea30
push eax
mov ecx, ebx
call fcn.005a0ba0
inc edi
cmp edi, ebp
jl 0x5a1a20
jmp 0x5a1a48
mov ebp, dword [esp + 0x1c]
mov eax, dword [ebx + 0x44]
test eax, eax
je 0x5a1aa3
mov ecx, dword [esp + 0x64]
push ecx
mov ecx, ebx
call fcn.005a0d10
mov edx, dword [esp + 0x68]
push edx
mov ecx, ebx
call fcn.005a0d10
mov eax, dword [esp + 0x6c]
push eax
mov ecx, ebx
call fcn.005a0d10
xor edi, edi
test ebp, ebp
jle 0x5a1aa3
lea esp, [esp]
mov edx, dword [esp + 0x10]
mov ecx, dword [0x7a39fc]
mov eax, dword [edx + edi*4]
mov ecx, dword [ecx + 8]
push eax
call fcn.004aea30
push eax
mov ecx, ebx
call fcn.005a0d10
inc edi
cmp edi, ebp
jl 0x5a1a80
cmp dword [0x832894], 1
mov eax, dword [esi + 0x2c]
jne 0x5a1ab4
mov eax, 1
mov cl, byte [esi + 0x80]
xor edx, edx
test cl, 1
je 0x5a1ac6
mov edx, 1
test cl, 2
jne 0x5a1acf
test edx, edx
jne 0x5a1ad4
mov eax, 1
mov edx, dword [esi + 0x78]
mov ecx, dword [0x7a39fc]
mov edi, dword [ecx + 4]
push eax
mov eax, dword [esi + 0x7c]
push edx
push eax
mov eax, dword [esi + 0xa4]
xor edx, edx
mov dl, byte [esi + 0x68]
mov ebx, dword [esp + 0x1c]
lea ecx, [esi + 0x6c]
push ecx
mov ecx, dword [esi + 0xa0]
push edx
push eax
mov eax, dword [esi + 0x20]
push ecx
mov ecx, dword [esi + 0x98]
xor edx, edx
mov dx, word [esi + 0x9c]
push edx
mov edx, dword [esi + 0x94]
push eax
mov eax, dword [esi + 0x90]
push ecx
mov ecx, dword [esi + 0x8c]
mov esi, dword [esp + 0x58]
push edx
mov edx, dword [esp + 0x40]
push eax
push ecx
mov ecx, dword [esp + 0xa4]
push edx
mov edx, dword [esp + 0xa4]
push ebx
push ebp
lea eax, [esp + 0x84]
push eax
push ecx
push edx
mov ecx, esi
call fcn.005eda50
push eax
mov eax, dword [esp + 0xb4]
push eax
mov ecx, esi
call fcn.005eda50
mov ecx, dword [esp + 0xb0]
push eax
push ecx
mov ecx, esi
call fcn.005eda50
mov edx, dword [esp + 0xb0]
push eax
push edx
mov ecx, esi
call fcn.005eda50
push eax
mov eax, dword [esp + 0xb4]
push eax
mov ecx, edi
call fcn.005ed690
mov ecx, eax
call fcn.00631d80
test ebx, ebx
je 0x5a1baa
push ebx
call fcn.006fa390
add esp, 4
mov eax, dword [esp + 0x14]
test eax, eax
je 0x5a1bbb
push eax
call fcn.006fa390
add esp, 4
mov eax, dword [esp + 0x20]
test eax, eax
je 0x5a1bcc
push eax
call fcn.006fa390
add esp, 4
lea ecx, [esp + 0x44]
mov dword [esp + 0x54], 0xffffffff
call fcn.005e5c20
mov ecx, dword [esp + 0x4c]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
mov dword fs:[0], ecx
add esp, 0x48
ret 0x24