Function at 0x401a43
Capabilities:
Get file size

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c8
mov eax, dword [0x404004]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
mov dword [ebp - 0x178], eax
mov eax, dword [ebp + 0xc]
push esi
mov dword [ebp - 0x188], eax
mov esi, ecx
mov eax, dword [ebp + 0x10]
push edi
mov dword [ebp - 0x18c], eax
mov eax, ebx
push 0x38
mov dword [ebp - 0x140], eax
mov dword [ebp - 0x15c], eax
lea eax, [ebp - 0x1c4]
push ebx
push eax
mov dword [ebp - 0x174], edx
mov dword [ebp - 0x148], 2
mov dword [ebp - 0x16c], ebx
mov dword [ebp - 0x144], ebx
mov dword [ebp - 0x164], ebx
mov dword [ebp - 0x160], ebx
mov dword [ebp - 0x168], ebx
mov dword [ebp - 0x154], ebx
mov dword [ebp - 0x14c], ebx
call sub.msvcrt.dll_memset
add esp, 0xc
push ebx
push 0x8000080
push 3
push ebx
push 1
push 1
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [ebp - 0x170], ebx
cmp ebx, 0xffffffff
jne 0x401b19
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [ebp - 0x140]
mov ebx, eax
test ebx, ebx
jle 0x401fa7
movzx ebx, bx
or ebx, 0x80070000
jmp 0x401fa7
xor eax, eax
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
mov dword [ebp - 0x16c], edi
test edi, edi
je 0x401f9c
cmp edi, 0xffffffff
je 0x401f9c
push edi
xor eax, eax
push eax
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x168], eax
test eax, eax
jne 0x401b5a
mov ebx, 0x8007000e
jmp 0x401fa1
push edi
mov edx, eax
mov ecx, ebx
call fcn.00401521
mov ebx, eax
mov eax, dword [ebp - 0x170]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or eax, 0xffffffff
mov dword [ebp - 0x170], eax
test ebx, ebx
js 0x401fa1
mov ecx, esi
xor ebx, ebx
push 2
pop edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, edi
cmp ax, bx
jne 0x401b8e
sub ecx, edx
sar ecx, 1
lea ecx, [esi + ecx*2]
jmp 0x401bb0
movzx eax, word [ecx]
cmp eax, 0x5c
je 0x401bb4
cmp eax, 0x3a
je 0x401bb4
sub ecx, edi
cmp ecx, esi
ja 0x401ba1
lea edx, [ebp - 0x13c]
push 0x40
mov eax, edx
pop esi
sub ecx, eax
lea eax, [esi + 0x7fffffbe]
test eax, eax
je 0x401bde
movzx eax, word [ecx + edx]
test ax, ax
je 0x401bde
mov word [edx], ax
add edx, edi
sub esi, 1
jne 0x401bc1
test esi, esi
jne 0x401be4
sub edx, edi
push dword [ebp - 0x174]
xor eax, eax
push ebx
push ebx
push 0x10001
push 8
mov word [edx], ax
call dword [sym.imp.CRYPT32.dll_CertOpenStore]
mov ebx, eax
mov dword [ebp - 0x154], ebx
test ebx, ebx
je 0x401af5
xor eax, eax
push eax
push ebx
call dword [sym.imp.CRYPT32.dll_CertEnumCertificatesInStore]
mov esi, eax
test esi, esi
je 0x401f8d
mov edi, dword [ebp - 0x1a8]
mov eax, dword [esi + 0xc]
push dword [eax + 0x38]
call dword [sym.imp.CRYPT32.dll_CertOIDToAlgId]
test eax, eax
je 0x401cab
and eax, 0x1e00
cmp eax, 0x400
jne 0x401c78
cmp dword [ebp - 0x1c4], 0
jne 0x401cab
lea ecx, [ebp - 0xbc]
call fcn.004024f2
inc dword [ebp - 0x144]
lea eax, [ebp - 0xbc]
mov dword [ebp - 0x1c4], eax
xor eax, eax
mov dword [ebp - 0x1bc], 1
jmp 0x401ca5
cmp eax, 0x200
jne 0x401cab
test edi, edi
jne 0x401cab
lea ecx, [ebp - 0x64]
call fcn.004024f2
xor eax, eax
lea edi, [ebp - 0x64]
inc eax
inc dword [ebp - 0x144]
mov dword [ebp - 0x1a0], eax
cmp dword [ebp - 0x148], eax
jbe 0x401cab
mov dword [ebp - 0x148], eax
push esi
push ebx
call dword [sym.imp.CRYPT32.dll_CertEnumCertificatesInStore]
mov esi, eax
test esi, esi
jne 0x401c28
mov edx, dword [ebp - 0x148]
mov dword [ebp - 0x1a8], edi
cmp edx, 2
jae 0x401f8d
mov ecx, dword [ebp - 0x144]
cmp ecx, 2
ja 0x401f8d
lea eax, [ecx + edx]
cmp eax, 2
ja 0x401f8d
lea eax, [ebp - 0x15c]
push eax
lea eax, [ebp - 0x144]
push eax
lea eax, [ebp - 0x174]
push eax
push ecx
imul eax, edx, 0x1c
lea ecx, [ebp - 0x1c4]
add eax, ecx
push eax
push dword [ebp - 0x178]
lea eax, [ebp - 0x13c]
push eax
call dword [sym.imp.KERNEL32.dll_GetConsoleWindow]
mov edx, dword [ebp - 0x16c]
push eax
push ecx
mov ecx, dword [ebp - 0x168]
call fcn.004017a2
mov ebx, eax
test ebx, ebx
js 0x401f94
mov esi, dword [ebp - 0x174]
lea eax, [ebp - 0x158]
mov edi, dword [ebp - 0x15c]
xor ecx, ecx
push eax
push ecx
push 0x10001
push esi
push edi
mov dword [ebp - 0x158], ecx
mov dword [ebp - 0x17c], esi
mov dword [ebp - 0x140], edi
call dword [sym.imp.CRYPT32.dll_CryptExportPublicKeyInfo]
test eax, eax
je 0x401af5
push dword [ebp - 0x158]
xor eax, eax
push eax
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x164], eax
test eax, eax
je 0x401b50
lea ecx, [ebp - 0x158]
push ecx
push eax
push 0x10001
push esi
push edi
call dword [sym.imp.CRYPT32.dll_CryptExportPublicKeyInfo]
test eax, eax
je 0x401af5
mov edi, dword [ebp - 0x154]
xor eax, eax
push eax
push edi
call dword [sym.imp.CRYPT32.dll_CertEnumCertificatesInStore]
mov esi, eax
mov dword [ebp - 0x148], esi
test esi, esi
je 0x401f8d
mov eax, dword [ebp - 0x144]
mov dword [ebp - 0x180], eax
imul eax, eax, 0x1c
mov dword [ebp - 0x178], eax
push dword [ebp - 0x164]
mov eax, dword [esi + 0xc]
add eax, 0x38
push eax
push 0x10001
call dword [sym.imp.CRYPT32.dll_CertComparePublicKeyInfo]
test eax, eax
je 0x401f53
mov eax, dword [ebp - 0x14c]
test eax, eax
jne 0x401f3e
mov edi, dword [ebp - 0x140]
lea eax, [ebp - 0x150]
xor ecx, ecx
push ecx
push eax
push ecx
push 4
push edi
mov dword [ebp - 0x150], ecx
call dword [sym.imp.ADVAPI32.dll_CryptGetProvParam]
test eax, eax
je 0x401af5
push dword [ebp - 0x150]
xor eax, eax
push eax
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
mov dword [ebp - 0x160], esi
test esi, esi
je 0x401b50
xor eax, eax
push eax
lea eax, [ebp - 0x150]
push eax
push esi
push 4
push edi
call dword [sym.imp.ADVAPI32.dll_CryptGetProvParam]
test eax, eax
je 0x401af5
xor eax, eax
push eax
push eax
push dword [ebp - 0x150]
push esi
push eax
push eax
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [ebp - 0x184], eax
test eax, eax
jle 0x401af5
lea ecx, [eax*2 + 0x74]
xor eax, eax
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
mov dword [ebp - 0x14c], esi
test esi, esi
je 0x401b50
xor edx, edx
lea eax, [esi + 0x74]
mov dword [esi + 0xc], edx
lea edi, [esi + 0x1c]
mov dword [esi + 0x10], edx
mov dword [esi + 0x14], edx
mov dword [esi + 4], eax
mov eax, dword [ebp - 0x178]
push 0x16
mov dword [esi], edi
pop ecx
mov eax, dword [ebp + eax - 0x1bc]
push dword [ebp - 0x184]
mov dword [esi + 8], eax
mov eax, dword [ebp - 0x17c]
mov dword [esi + 0x18], eax
lea esi, [ebp - 0xbc]
imul eax, dword [ebp - 0x180], 0x58
add esi, eax
mov eax, dword [ebp - 0x14c]
rep movsd dword es:[edi], dword [esi]
push dword [eax + 4]
push dword [ebp - 0x150]
push dword [ebp - 0x160]
push edx
push edx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jle 0x401af5
mov esi, dword [ebp - 0x148]
mov edi, dword [ebp - 0x154]
mov eax, dword [ebp - 0x14c]
push eax
xor eax, eax
push eax
push 2
push esi
call dword [sym.imp.CRYPT32.dll_CertSetCertificateContextProperty]
test eax, eax
je 0x401af5
push esi
push edi
call dword [sym.imp.CRYPT32.dll_CertEnumCertificatesInStore]
mov esi, eax
mov dword [ebp - 0x148], eax
test esi, esi
jne 0x401deb
mov eax, dword [ebp - 0x14c]
test eax, eax
je 0x401f8d
mov ecx, dword [ebp - 0x188]
mov esi, dword [ebp - 0x140]
mov dword [ecx], edi
mov ecx, dword [ebp - 0x18c]
mov dword [ecx], eax
jmp 0x401fc6
mov ebx, 0x80070490
jmp 0x401fa1
mov esi, dword [ebp - 0x15c]
jmp 0x401fa7
mov ebx, 0x80070018
mov esi, dword [ebp - 0x140]
push dword [ebp - 0x14c]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0x154]
test eax, eax
je 0x401fc6
push 0
push eax
call dword [sym.imp.CRYPT32.dll_CertCloseStore]
push dword [ebp - 0x160]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 0x164]
call dword [sym.imp.KERNEL32.dll_LocalFree]
test esi, esi
je 0x401fec
xor eax, eax
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov edx, dword [ebp - 0x168]
test edx, edx
je 0x402012
mov ecx, dword [ebp - 0x16c]
mov eax, edx
test ecx, ecx
je 0x40200b
mov byte [eax], 0
inc eax
sub ecx, 1
jne 0x402002
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0x170]
cmp eax, 0xffffffff
je 0x402024
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 8]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00402d30
leave
ret 0xc