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

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push 0x403426
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], 0x402a80
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 0x47ef4c
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 0x40f840
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 0x47efa7
mov ebx, 0x200
mov dword [ebp - 0x3c], esi
mov esi, dword [ebp - 0x30]
mov dword [0x492134], edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], ebx
cmp ebx, dword [ebp - 0x3c]
jg 0x47ea44
test esi, esi
je 0x47e7a0
cmp word [esi], 1
jne 0x47e7a0
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
mov edi, ebx
sub edi, ecx
cmp edi, eax
jb 0x47e798
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xbc], edi
jmp 0x47e7af
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xbc], eax
test esi, esi
je 0x47e7e1
cmp word [esi], 1
jne 0x47e7e1
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
mov edi, ebx
add edi, 1
jo 0x47efa7
sub edi, ecx
cmp edi, eax
jb 0x47e7d9
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xc0], edi
jmp 0x47e7f0
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xc0], eax
test esi, esi
je 0x47e822
cmp word [esi], 1
jne 0x47e822
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
mov edi, ebx
add edi, 2
jo 0x47efa7
sub edi, ecx
cmp edi, eax
jb 0x47e81a
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xc4], edi
jmp 0x47e831
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xc4], eax
test esi, esi
je 0x47e863
cmp word [esi], 1
jne 0x47e863
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
mov edi, ebx
add edi, 3
jo 0x47efa7
sub edi, ecx
cmp edi, eax
jb 0x47e85b
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xc8], edi
jmp 0x47e872
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xc8], eax
test esi, esi
je 0x47e8a4
cmp word [esi], 1
jne 0x47e8a4
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
mov edi, ebx
add edi, 4
jo 0x47efa7
sub edi, ecx
cmp edi, eax
jb 0x47e89c
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xcc], edi
jmp 0x47e8b3
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xcc], eax
test esi, esi
je 0x47e8e5
cmp word [esi], 1
jne 0x47e8e5
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
mov edi, ebx
add edi, 5
jo 0x47efa7
sub edi, ecx
cmp edi, eax
jb 0x47e8dd
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xd0], edi
jmp 0x47e8f4
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xd0], eax
test esi, esi
je 0x47e926
cmp word [esi], 1
jne 0x47e926
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
mov edi, ebx
add edi, 6
jo 0x47efa7
sub edi, ecx
cmp edi, eax
jb 0x47e91e
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xd4], edi
jmp 0x47e935
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xd4], eax
test esi, esi
je 0x47e95e
cmp word [esi], 1
jne 0x47e95e
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
mov edi, ebx
add edi, 7
jo 0x47efa7
sub edi, ecx
cmp edi, eax
jb 0x47e969
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
jmp 0x47e966
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 0x47ea33
mov ecx, dword [ebp - 0x18]
mov edi, dword [ebp - 0x14]
mov eax, 1
add eax, ecx
jo 0x47efa7
mov ebx, eax
mov dword [ebp - 0x18], ebx
jmp 0x47e76e
mov eax, dword [ebp - 0x18]
add eax, 3
jo 0x47efa7
mov edi, eax
mov dword [ebp - 0x14], edi
test edi, edi
je 0x47ef3a
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 0x47edfb
add ecx, 1
jo 0x47efa7
mov eax, ecx
cmp eax, 0x150
mov dword [ebp - 0x20], eax
jg 0x47ef3a
test esi, esi
je 0x47eaa3
cmp word [esi], 1
jne 0x47eaa3
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
mov edi, ebx
sub edi, ecx
cmp edi, eax
jb 0x47ea9b
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xd8], edi
jmp 0x47eab2
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xd8], eax
test esi, esi
je 0x47eae4
cmp word [esi], 1
jne 0x47eae4
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
mov edi, ebx
add edi, 1
jo 0x47efa7
sub edi, ecx
cmp edi, eax
jb 0x47eadc
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xdc], edi
jmp 0x47eaf3
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xdc], eax
test esi, esi
je 0x47eb25
cmp word [esi], 1
jne 0x47eb25
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
mov edi, ebx
add edi, 2
jo 0x47efa7
sub edi, ecx
cmp edi, eax
jb 0x47eb1d
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xe0], edi
jmp 0x47eb34
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xe0], eax
test esi, esi
je 0x47eb66
cmp word [esi], 1
jne 0x47eb66
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
mov edi, ebx
add edi, 3
jo 0x47efa7
sub edi, ecx
cmp edi, eax
jb 0x47eb5e
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xe4], edi
jmp 0x47eb75
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xe4], eax
test esi, esi
je 0x47eba7
cmp word [esi], 1
jne 0x47eba7
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
mov edi, ebx
add edi, 4
jo 0x47efa7
sub edi, ecx
cmp edi, eax
jb 0x47eb9f
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xe8], edi
jmp 0x47ebb6
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xe8], eax
test esi, esi
je 0x47ebe8
cmp word [esi], 1
jne 0x47ebe8
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
mov edi, ebx
add edi, 5
jo 0x47efa7
sub edi, ecx
cmp edi, eax
jb 0x47ebe0
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xec], edi
jmp 0x47ebf7
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xec], eax
test esi, esi
je 0x47ec29
cmp word [esi], 1
jne 0x47ec29
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
mov edi, ebx
add edi, 6
jo 0x47efa7
sub edi, ecx
cmp edi, eax
jb 0x47ec21
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xf0], edi
jmp 0x47ec38
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xf0], eax
test esi, esi
je 0x47ec6a
cmp word [esi], 1
jne 0x47ec6a
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
mov edi, ebx
add edi, 7
jo 0x47efa7
sub edi, ecx
cmp edi, eax
jb 0x47ec62
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xf4], edi
jmp 0x47ec79
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xf4], eax
test esi, esi
je 0x47ecab
cmp word [esi], 1
jne 0x47ecab
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
mov edi, ebx
add edi, 8
jo 0x47efa7
sub edi, ecx
cmp edi, eax
jb 0x47eca3
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xf8], edi
jmp 0x47ecba
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0xf8], eax
test esi, esi
je 0x47ece3
cmp word [esi], 1
jne 0x47ece3
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
mov edi, ebx
add edi, 9
jo 0x47efa7
sub edi, ecx
cmp edi, eax
jb 0x47ecee
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
jmp 0x47eceb
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 0x47edec
mov ecx, dword [ebp - 0x18]
mov edi, dword [ebp - 0x14]
mov eax, 1
add eax, ecx
mov ecx, dword [ebp - 0x20]
jo 0x47efa7
mov ebx, eax
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x18], ebx
jmp 0x47ea58
mov eax, dword [ebp - 0x18]
mov edi, dword [ebp - 0x14]
sub eax, 4
jo 0x47efa7
cmp eax, edi
jle 0x47ef3a
sub eax, edi
jo 0x47efa7
mov esi, eax
cmp esi, 0x83
jl 0x47ef3a
cmp esi, 0x150
jg 0x47ef3a
lea edx, [ebp - 0x78]
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x70], 0x40d688
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 0x47efa7
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 0x47eeb7
cmp word [ecx], 1
jne 0x47eeb7
mov edx, dword [ecx + 0x14]
mov eax, dword [ecx + 0x10]
mov ebx, edi
sub ebx, edx
cmp ebx, eax
jb 0x47eeb3
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov ecx, dword [ebp - 0x44]
mov eax, ebx
jmp 0x47eec0
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.0040c04c
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 0x47efa7
cmp eax, edx
jne 0x47ef3a
mov edx, dword [ebp - 0x38]
mov ecx, 0x49213c
mov dword [0x492134], edi
mov dword [0x492138], esi
call dword [sym.imp.MSVBVM60.DLL___vbaStrCopy]
or esi, 0xffffffff
jmp 0x47ef3d
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 0x47ef90
jmp 0x47ef7a
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