Function at 0x4776e0
Capabilities:
Check for peb ntglobalflag flag
Get number of processors

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push 0x403266
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xe8
push ebx
push esi
push edi
mov dword [ebp - 8], esp
mov dword [ebp - 4], 0x4029b0
mov ebx, dword [ebp + 8]
xor eax, eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x68], eax
mov dword [ebp - 0x78], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x1c], eax
mov eax, dword [ebx]
push eax
call dword [sym.imp.MSVBVM60.DLL_rtcFileLen]
mov esi, eax
cmp esi, 0x300
jl 0x477fbc
push 1
push esi
push 1
lea ecx, [ebp - 0x30]
push 0x11
push ecx
push 1
push 0x80
call dword [sym.imp.MSVBVM60.DLL___vbaRedim]
add esp, 0x1c
lea edx, [ebp - 0x58]
mov dword [ebp - 0x50], 0x80020004
mov dword [ebp - 0x58], 0xa
push edx
call dword [sym.imp.MSVBVM60.DLL_rtcFreeFile]
lea ecx, [ebp - 0x58]
movsx edi, ax
call dword [sym.imp.MSVBVM60.DLL___vbaFreeVar]
mov eax, dword [ebx]
mov ebx, dword [sym.imp.MSVBVM60.DLL___vbaI2I4]
push eax
mov ecx, edi
call ebx
push eax
push 0xffffffffffffffff
push 0x20
call dword [sym.imp.MSVBVM60.DLL___vbaFileOpen]
mov ecx, edi
call ebx
lea ecx, [ebp - 0x30]
push eax
push ecx
push 0x40f6e8
call dword [sym.imp.MSVBVM60.DLL___vbaGetOwner3]
mov ecx, edi
call ebx
push eax
call dword [sym.imp.MSVBVM60.DLL___vbaFileClose]
xor edi, edi
sub esi, 0x100
jo 0x478017
mov ebx, 0x200
mov dword [ebp - 0x3c], esi
mov esi, dword [ebp - 0x30]
mov dword [0x48a134], edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], ebx
cmp ebx, dword [ebp - 0x3c]
jg 0x477ab4
test esi, esi
je 0x477810
cmp word [esi], 1
jne 0x477810
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
mov edi, ebx
sub edi, ecx
cmp edi, eax
jb 0x477808
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xbc], edi
jmp 0x47781f
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xbc], eax
test esi, esi
je 0x477851
cmp word [esi], 1
jne 0x477851
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
mov edi, ebx
add edi, 1
jo 0x478017
sub edi, ecx
cmp edi, eax
jb 0x477849
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xc0], edi
jmp 0x477860
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xc0], eax
test esi, esi
je 0x477892
cmp word [esi], 1
jne 0x477892
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
mov edi, ebx
add edi, 2
jo 0x478017
sub edi, ecx
cmp edi, eax
jb 0x47788a
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xc4], edi
jmp 0x4778a1
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xc4], eax
test esi, esi
je 0x4778d3
cmp word [esi], 1
jne 0x4778d3
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
mov edi, ebx
add edi, 3
jo 0x478017
sub edi, ecx
cmp edi, eax
jb 0x4778cb
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xc8], edi
jmp 0x4778e2
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xc8], eax
test esi, esi
je 0x477914
cmp word [esi], 1
jne 0x477914
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
mov edi, ebx
add edi, 4
jo 0x478017
sub edi, ecx
cmp edi, eax
jb 0x47790c
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xcc], edi
jmp 0x477923
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xcc], eax
test esi, esi
je 0x477955
cmp word [esi], 1
jne 0x477955
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
mov edi, ebx
add edi, 5
jo 0x478017
sub edi, ecx
cmp edi, eax
jb 0x47794d
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xd0], edi
jmp 0x477964
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xd0], eax
test esi, esi
je 0x477996
cmp word [esi], 1
jne 0x477996
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
mov edi, ebx
add edi, 6
jo 0x478017
sub edi, ecx
cmp edi, eax
jb 0x47798e
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xd4], edi
jmp 0x4779a5
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xd4], eax
test esi, esi
je 0x4779ce
cmp word [esi], 1
jne 0x4779ce
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
mov edi, ebx
add edi, 7
jo 0x478017
sub edi, ecx
cmp edi, eax
jb 0x4779d9
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
jmp 0x4779d6
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov edi, eax
mov esi, dword [ebp - 0x30]
mov ecx, dword [esi + 0xc]
mov eax, dword [ebp - 0xc0]
xor edx, edx
mov bl, byte [ecx + eax]
cmp bl, 0xd
mov ebx, dword [ebp - 0xbc]
setne dl
xor eax, eax
cmp byte [ecx + ebx], 0x22
mov ebx, dword [ebp - 0xc4]
setne al
or edx, eax
neg edx
sbb edx, edx
xor eax, eax
neg edx
cmp byte [ecx + ebx], 0xa
mov ebx, dword [ebp - 0xc8]
setne al
or edx, eax
neg edx
sbb edx, edx
xor eax, eax
neg edx
cmp byte [ecx + ebx], 0x43
mov ebx, dword [ebp - 0xcc]
setne al
or edx, eax
neg edx
sbb edx, edx
xor eax, eax
neg edx
cmp byte [ecx + ebx], 0x4d
mov ebx, dword [ebp - 0xd0]
setne al
or edx, eax
neg edx
sbb edx, edx
xor eax, eax
neg edx
cmp byte [ecx + ebx], 0x47
mov ebx, dword [ebp - 0xd4]
setne al
or edx, eax
neg edx
sbb edx, edx
xor eax, eax
neg edx
cmp byte [ecx + ebx], 0x3d
mov bl, byte [ecx + edi]
setne al
or edx, eax
neg edx
sbb edx, edx
xor eax, eax
neg edx
cmp bl, 0x22
setne al
or edx, eax
je 0x477aa3
mov ecx, dword [ebp - 0x18]
mov edi, dword [ebp - 0x14]
mov eax, 1
add eax, ecx
jo 0x478017
mov ebx, eax
mov dword [ebp - 0x18], ebx
jmp 0x4777de
mov eax, dword [ebp - 0x18]
add eax, 3
jo 0x478017
mov edi, eax
mov dword [ebp - 0x14], edi
test edi, edi
je 0x477faa
xor eax, eax
mov ebx, edi
mov dword [ebp - 0x40], eax
xor ecx, ecx
mov dword [ebp - 0x18], ebx
cmp ebx, dword [ebp - 0x3c]
jg 0x477e6b
add ecx, 1
jo 0x478017
mov eax, ecx
cmp eax, 0x150
mov dword [ebp - 0x20], eax
jg 0x477faa
test esi, esi
je 0x477b13
cmp word [esi], 1
jne 0x477b13
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
mov edi, ebx
sub edi, ecx
cmp edi, eax
jb 0x477b0b
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xd8], edi
jmp 0x477b22
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xd8], eax
test esi, esi
je 0x477b54
cmp word [esi], 1
jne 0x477b54
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
mov edi, ebx
add edi, 1
jo 0x478017
sub edi, ecx
cmp edi, eax
jb 0x477b4c
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xdc], edi
jmp 0x477b63
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xdc], eax
test esi, esi
je 0x477b95
cmp word [esi], 1
jne 0x477b95
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
mov edi, ebx
add edi, 2
jo 0x478017
sub edi, ecx
cmp edi, eax
jb 0x477b8d
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xe0], edi
jmp 0x477ba4
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xe0], eax
test esi, esi
je 0x477bd6
cmp word [esi], 1
jne 0x477bd6
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
mov edi, ebx
add edi, 3
jo 0x478017
sub edi, ecx
cmp edi, eax
jb 0x477bce
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xe4], edi
jmp 0x477be5
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xe4], eax
test esi, esi
je 0x477c17
cmp word [esi], 1
jne 0x477c17
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
mov edi, ebx
add edi, 4
jo 0x478017
sub edi, ecx
cmp edi, eax
jb 0x477c0f
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xe8], edi
jmp 0x477c26
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xe8], eax
test esi, esi
je 0x477c58
cmp word [esi], 1
jne 0x477c58
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
mov edi, ebx
add edi, 5
jo 0x478017
sub edi, ecx
cmp edi, eax
jb 0x477c50
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xec], edi
jmp 0x477c67
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xec], eax
test esi, esi
je 0x477c99
cmp word [esi], 1
jne 0x477c99
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
mov edi, ebx
add edi, 6
jo 0x478017
sub edi, ecx
cmp edi, eax
jb 0x477c91
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xf0], edi
jmp 0x477ca8
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xf0], eax
test esi, esi
je 0x477cda
cmp word [esi], 1
jne 0x477cda
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
mov edi, ebx
add edi, 7
jo 0x478017
sub edi, ecx
cmp edi, eax
jb 0x477cd2
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xf4], edi
jmp 0x477ce9
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xf4], eax
test esi, esi
je 0x477d1b
cmp word [esi], 1
jne 0x477d1b
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
mov edi, ebx
add edi, 8
jo 0x478017
sub edi, ecx
cmp edi, eax
jb 0x477d13
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xf8], edi
jmp 0x477d2a
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xf8], eax
test esi, esi
je 0x477d53
cmp word [esi], 1
jne 0x477d53
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
mov edi, ebx
add edi, 9
jo 0x478017
sub edi, ecx
cmp edi, eax
jb 0x477d5e
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
jmp 0x477d5b
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov edi, eax
mov esi, dword [ebp - 0x30]
mov ecx, dword [esi + 0xc]
mov eax, dword [ebp - 0xdc]
xor edx, edx
mov bl, byte [ecx + eax]
cmp bl, 0x48
mov ebx, dword [ebp - 0xd8]
setne dl
xor eax, eax
cmp byte [ecx + ebx], 0x5b
mov ebx, dword [ebp - 0xe0]
setne al
or edx, eax
neg edx
sbb edx, edx
xor eax, eax
neg edx
cmp byte [ecx + ebx], 0x6f
mov ebx, dword [ebp - 0xe4]
setne al
or edx, eax
neg edx
sbb edx, edx
xor eax, eax
neg edx
cmp byte [ecx + ebx], 0x73
mov ebx, dword [ebp - 0xe8]
setne al
or edx, eax
neg edx
sbb edx, edx
xor eax, eax
neg edx
cmp byte [ecx + ebx], 0x74
mov ebx, dword [ebp - 0xec]
setne al
or edx, eax
neg edx
sbb edx, edx
xor eax, eax
neg edx
cmp byte [ecx + ebx], 0x20
mov ebx, dword [ebp - 0xf0]
setne al
or edx, eax
neg edx
sbb edx, edx
xor eax, eax
neg edx
cmp byte [ecx + ebx], 0x45
mov ebx, dword [ebp - 0xf4]
setne al
or edx, eax
neg edx
sbb edx, edx
xor eax, eax
neg edx
cmp byte [ecx + ebx], 0x78
mov ebx, dword [ebp - 0xf8]
setne al
or edx, eax
neg edx
sbb edx, edx
xor eax, eax
neg edx
cmp byte [ecx + ebx], 0x74
mov bl, byte [ecx + edi]
setne al
or edx, eax
neg edx
sbb edx, edx
xor eax, eax
neg edx
cmp bl, 0x65
setne al
or edx, eax
je 0x477e5c
mov ecx, dword [ebp - 0x18]
mov edi, dword [ebp - 0x14]
mov eax, 1
add eax, ecx
mov ecx, dword [ebp - 0x20]
jo 0x478017
mov ebx, eax
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x18], ebx
jmp 0x477ac8
mov eax, dword [ebp - 0x18]
mov edi, dword [ebp - 0x14]
sub eax, 4
jo 0x478017
cmp eax, edi
jle 0x477faa
sub eax, edi
jo 0x478017
mov esi, eax
cmp esi, 0x83
jl 0x477faa
cmp esi, 0x150
jg 0x477faa
lea edx, [ebp - 0x78]
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x70], 0x40d4f0
mov dword [ebp - 0x78], 8
call dword [sym.imp.MSVBVM60.DLL___vbaVarDup]
mov edx, esi
lea ecx, [ebp - 0x58]
add edx, 1
push ecx
jo 0x478017
lea eax, [ebp - 0x68]
push edx
push eax
call dword [sym.imp.MSVBVM60.DLL_rtcStringVar]
lea ecx, [ebp - 0x68]
push ecx
call dword [sym.imp.MSVBVM60.DLL___vbaStrVarMove]
mov edx, eax
lea ecx, [ebp - 0x38]
call dword [sym.imp.MSVBVM60.DLL___vbaStrMove]
lea edx, [ebp - 0x68]
lea eax, [ebp - 0x58]
push edx
push eax
push 2
call dword [sym.imp.MSVBVM60.DLL___vbaFreeVarList]
mov ecx, dword [ebp - 0x30]
add esp, 0xc
lea edx, [ebp - 0x44]
push ecx
push edx
call dword [sym.imp.MSVBVM60.DLL___vbaAryLock]
mov ecx, dword [ebp - 0x44]
test ecx, ecx
je 0x477f27
cmp word [ecx], 1
jne 0x477f27
mov edx, dword [ecx + 0x14]
mov eax, dword [ecx + 0x10]
mov ebx, edi
sub ebx, edx
cmp ebx, eax
jb 0x477f23
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov ecx, dword [ebp - 0x44]
mov eax, ebx
jmp 0x477f30
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov ecx, dword [ebp - 0x44]
mov ecx, dword [ecx + 0xc]
mov edx, dword [ebp - 0x38]
add ecx, eax
push esi
push ecx
lea eax, [ebp - 0x48]
push edx
push eax
call dword [sym.imp.MSVBVM60.DLL___vbaStrToAnsi]
push eax
call fcn.0040bea4
call dword [sym.imp.MSVBVM60.DLL___vbaSetSystemError]
mov ecx, dword [ebp - 0x48]
lea edx, [ebp - 0x38]
push ecx
push edx
call dword [sym.imp.MSVBVM60.DLL___vbaStrToUnicode]
lea eax, [ebp - 0x44]
push eax
call dword [sym.imp.MSVBVM60.DLL___vbaAryUnlock]
lea ecx, [ebp - 0x48]
call dword [sym.imp.MSVBVM60.DLL___vbaFreeStr]
mov ecx, dword [ebp - 0x38]
push ecx
call dword [sym.imp.MSVBVM60.DLL___vbaLenBstr]
mov edx, esi
add edx, 1
jo 0x478017
cmp eax, edx
jne 0x477faa
mov edx, dword [ebp - 0x38]
mov ecx, 0x48a13c
mov dword [0x48a134], edi
mov dword [0x48a138], esi
call dword [sym.imp.MSVBVM60.DLL___vbaStrCopy]
or esi, 0xffffffff
jmp 0x477fad
mov esi, dword [ebp - 0x28]
lea eax, [ebp - 0x30]
push eax
push 0
call dword [sym.imp.MSVBVM60.DLL___vbaErase]
mov dword [ebp - 0x1c], esi
push 0x478000
jmp 0x477fea
lea ecx, [ebp - 0x30]
push ecx
push 0
call dword [sym.imp.MSVBVM60.DLL___vbaAryDestruct]
lea ecx, [ebp - 0x38]
call dword [sym.imp.MSVBVM60.DLL___vbaFreeStr]
ret
call dword [sym.imp.MSVBVM60.DLL___vbaErrorOverflow]
nop
nop
nop