Function at 0x405b40
Capabilities:
Access peb ldr_data
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x415f1c
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x316ac
call fcn.0040c6f0
mov eax, dword [0x41b0e0]
push ebx
push esi
push edi
mov dword [esp + 0x316b4], eax
mov dword [esp + 0xc], ecx
xor eax, eax
xor ebx, ebx
mov byte [esp + 0x48], bl
mov ecx, 0x40
lea edi, [esp + 0x49]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x48]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov esi, dword [sym.imp.USER32.dll_wsprintfA]
mov byte [esp + 0x150], bl
xor eax, eax
mov ecx, 0x1ff
lea edi, [esp + 0x151]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x150]
push str.http:__ad.tcon.kr_toast_category.ini
push ecx
stosb byte es:[edi], al
call esi
mov eax, 0xf
add esp, 8
mov dword [esp + 0x44], eax
mov dword [esp + 0x40], ebx
mov byte [esp + 0x30], bl
mov dword [esp + 0x316c4], ebx
mov dword [esp + 0x28], eax
mov dword [esp + 0x24], ebx
mov byte [esp + 0x14], bl
lea ecx, [esp + 0x19000]
mov byte [esp + 0x316c4], 1
call fcn.0040ad70
push str.Mozilla_4.0___
lea ecx, [esp + 0x19004]
mov byte [esp + 0x316c8], 2
call fcn.0040ad90
lea eax, [esp + 0x150]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x405c30
sub eax, edx
push eax
lea edx, [esp + 0x154]
push edx
lea ecx, [esp + 0x34]
call fcn.00402370
lea eax, [esp + 0x48]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x405c52
sub eax, edx
push eax
lea eax, [esp + 0x4c]
push eax
lea ecx, [esp + 0x18]
call fcn.00402370
push 1
push 0x41748c
lea ecx, [esp + 0x18]
call fcn.00402260
push 0xc
push str.category.tco
lea ecx, [esp + 0x18]
call fcn.00402260
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x14]
mov edi, 0x10
cmp eax, edi
jae 0x405c9f
lea ecx, [esp + 0x14]
cmp dword [esp + 0x44], edi
mov eax, dword [esp + 0x30]
jae 0x405cad
lea eax, [esp + 0x30]
push ecx
push eax
push ebx
lea ecx, [esp + 0x1900c]
call fcn.0040add0
cmp dword [esp + 0x28], edi
mov eax, dword [esp + 0x14]
jae 0x405cca
lea eax, [esp + 0x14]
mov ecx, dword [esp + 0xc]
push eax
call fcn.00401660
lea ecx, [esp + 0x150]
push str.http:__ad.tcon.kr_toast_calc.tco
push ecx
call esi
add esp, 8
lea ecx, [esp + 0x950]
call fcn.0040ad70
push str.Mozilla_4.0___
lea ecx, [esp + 0x954]
mov byte [esp + 0x316c8], 3
call fcn.0040ad90
lea eax, [esp + 0x150]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x405d15
sub eax, edx
push eax
lea edx, [esp + 0x154]
push edx
lea ecx, [esp + 0x34]
call fcn.00402370
lea eax, [esp + 0x48]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x405d37
sub eax, edx
push eax
lea eax, [esp + 0x4c]
push eax
lea ecx, [esp + 0x18]
call fcn.00402370
push 1
push 0x41748c
lea ecx, [esp + 0x18]
call fcn.00402260
push 0xc
push str.category.tco
lea ecx, [esp + 0x18]
call fcn.00402260
cmp dword [esp + 0x28], edi
mov ecx, dword [esp + 0x14]
jae 0x405d7d
lea ecx, [esp + 0x14]
cmp dword [esp + 0x44], edi
mov eax, dword [esp + 0x30]
jae 0x405d8b
lea eax, [esp + 0x30]
push ecx
push eax
push ebx
lea ecx, [esp + 0x95c]
call fcn.0040add0
lea ecx, [esp + 0x950]
mov byte [esp + 0x316c4], 2
call fcn.0040ad80
cmp dword [esp + 0x28], edi
mov eax, dword [esp + 0x14]
jae 0x405dbc
lea eax, [esp + 0x14]
mov ecx, dword [esp + 0xc]
push eax
call fcn.00401540
lea ecx, [esp + 0x19000]
mov byte [esp + 0x316c4], 1
call fcn.0040ad80
cmp dword [esp + 0x28], edi
jb 0x405ded
mov ecx, dword [esp + 0x14]
push ecx
call fcn.0040c1b1
add esp, 4
cmp dword [esp + 0x44], edi
mov dword [esp + 0x28], 0xf
mov dword [esp + 0x24], ebx
mov byte [esp + 0x14], bl
jb 0x405e10
mov edx, dword [esp + 0x30]
push edx
call fcn.0040c1b1
add esp, 4
mov ecx, dword [esp + 0x316bc]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x316b4]
call fcn.0040c0d7
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret