Function at 0x401040
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x888
mov eax, dword [0x412110]
xor eax, esp
mov dword [esp + 0x884], eax
push ebp
mov ebp, dword [esp + 0x890]
push esi
push 0
push 0x10000080
push 3
push 0
push 1
push 0x80000000
push ebp
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x40109d
push 0
push 0
lea eax, [esp + 0x1c]
push eax
push 0xff
push esi
call dword [sym.imp.imagehlp.dll_ImageEnumerateCertificates]
test eax, eax
jne 0x4010a4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
jmp 0x4013ab
cmp dword [esp + 0x14], 1
jne 0x401096
push edi
lea eax, [esp + 0x84]
mov dword [esp + 0x84], 0
push eax
push 0
mov edi, pe_nt_image_headers32
push esi
mov word [esp + 0x94], di
call dword [sym.imp.imagehlp.dll_ImageGetCertificateHeader]
test eax, eax
jne 0x4010e7
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
jmp 0x4013aa
mov eax, dword [esp + 0x84]
mov dword [esp + 0x10], eax
add eax, 0xc
push ebx
push eax
call fcn.00401de4
mov ecx, dword [esp + 0x18]
add esp, 4
mov ebx, eax
lea eax, [esp + 0x14]
push eax
push ebx
push 0
push esi
mov dword [ebx], ecx
mov word [ebx + 4], di
call dword [sym.imp.imagehlp.dll_ImageGetCertificateData]
push esi
test eax, eax
jne 0x401135
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call fcn.00401e5a
add esp, 4
xor al, al
jmp 0x4013a9
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x1c]
mov dword [esp + 0x34], 0x14
push eax
push 0
mov dword [esp + 0x40], 0x10001
lea eax, [ebx + 8]
push dword [ebx]
push eax
push 0
lea eax, [esp + 0x48]
push eax
call dword [sym.imp.CRYPT32.dll_CryptVerifyMessageSignature]
test eax, eax
je 0x401125
mov edi, dword [sym.imp.CRYPT32.dll_CertGetNameStringW]
push 0
push 0
push 0
push 0
push 4
push dword [esp + 0x24]
call edi
mov esi, eax
xor eax, eax
push 0x7fe
push eax
mov word [esp + 0x9c], ax
lea eax, [esp + 0x9e]
push eax
call fcn.00402550
add esp, 0xc
mov eax, 0x384
cmp esi, eax
cmova esi, eax
lea eax, [esp + 0x94]
push esi
push eax
push 0
push 0
push 4
push dword [esp + 0x24]
call edi
mov ecx, str.Daum_Communications_Corp.
lea eax, [esp + 0x94]
nop
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x401216
test dx, dx
je 0x401212
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x401216
add eax, 4
add ecx, 4
test dx, dx
jne 0x4011f0
xor eax, eax
jmp 0x40121b
sbb eax, eax
or eax, 1
test eax, eax
je 0x4012f9
mov ecx, str.Daum_Kakao_Corp.
lea eax, [esp + 0x94]
nop
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x401256
test dx, dx
je 0x401252
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x401256
add eax, 4
add ecx, 4
test dx, dx
jne 0x401230
xor eax, eax
jmp 0x40125b
sbb eax, eax
or eax, 1
test eax, eax
je 0x4012f9
mov ecx, str.Kakao_corp.
lea eax, [esp + 0x94]
nop
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x401296
test dx, dx
je 0x401292
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x401296
add eax, 4
add ecx, 4
test dx, dx
jne 0x401270
xor eax, eax
jmp 0x40129b
sbb eax, eax
or eax, 1
test eax, eax
je 0x4012f9
mov ecx, str.Kakao_Corp.
lea eax, [esp + 0x94]
jmp 0x4012b0
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4012d6
test dx, dx
je 0x4012d2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4012d6
add eax, 4
add ecx, 4
test dx, dx
jne 0x4012b0
xor eax, eax
jmp 0x4012db
sbb eax, eax
or eax, 1
test eax, eax
je 0x4012f9
push ebx
call fcn.00401e5a
add esp, 4
push dword [esp + 0x10]
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
xor al, al
jmp 0x4013a9
push ebx
call fcn.00401e5a
add esp, 4
push dword [esp + 0x10]
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
xor eax, eax
mov dword [esp + 0x78], 0xaac56b
push 0x34
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
push eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
lea eax, [esp + 0x4c]
push eax
mov dword [esp + 0x88], 0x11d0cd44
mov dword [esp + 0x8c], 0xc000c28c
mov dword [esp + 0x90], 0xee95c24f
mov dword [esp + 0x2c], 0x10
mov dword [esp + 0x30], ebp
call fcn.00402550
add esp, 0xc
mov dword [esp + 0x44], 0x34
lea eax, [esp + 0x20]
mov dword [esp + 0x50], 2
mov dword [esp + 0x5c], eax
lea eax, [esp + 0x44]
mov dword [esp + 0x54], 0
push eax
lea eax, [esp + 0x7c]
mov dword [esp + 0x5c], 1
push eax
push 0xffffffffffffffff
mov dword [esp + 0x78], 0x10
call sub.WINTRUST.dll_WinVerifyTrust
test eax, eax
sete al
pop ebx
pop edi
mov ecx, dword [esp + 0x88c]
pop esi
pop ebp
xor ecx, esp
call fcn.00401ef1
add esp, 0x888
ret 4