Function at 0x40d4f2
Capabilities:
Create thread
Get common file path

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2060
call fcn.0040f120
push ebx
push esi
mov esi, dword [ebp + 8]
cmp esi, 3
push edi
jne 0x40d511
xor eax, eax
jmp 0x40d72c
test esi, 0x20000
je 0x40d52c
push dword [0x414824]
mov edi, 0x421344
call fcn.0040a0d1
pop ecx
jmp 0x40d533
xor eax, eax
call fcn.0040a088
test si, 0x200
je 0x40d53f
call fcn.00404ba2
mov dword [ebp - 0xc], esi
and dword [ebp - 0xc], 8
push 0
pop edi
mov esi, 0x421358
je 0x40d5c6
cmp dword [0x414828], 0x16c
jle 0x40d5c6
cmp dword [0x4211a8], edi
jne 0x40d5c6
mov ebx, 0x1000
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x40d57f
mov edx, esi
call fcn.00409556
jmp 0x40d587
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea eax, [ebp - 0x205c]
push eax
mov edx, esi
call fcn.00407a99
pop ecx
mov ecx, 0x402d50
lea eax, [ebp - 0x205c]
call fcn.00407a75
push edi
push edi
push dword [0x4211ac]
push edi
push eax
push dword [0x4248dc]
call fcn.00404a6d
add esp, 0x18
test eax, eax
jne 0x40d50a
test word [ebp + 8], 0x100
je 0x40d5dd
push 5
push 0x402e80
call dword [sym.imp.WININET.dll_InternetSetPerSiteCookieDecisionW]
jmp 0x40d5e3
call dword [sym.imp.WININET.dll_InternetClearAllPerSiteCookieDecisions]
call fcn.0040596f
test eax, eax
jne 0x40d5ff
push 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0xa
call fcn.0040cbdf
add esp, 0xc
xor ebx, ebx
mov dword [ebp - 8], 1
mov dword [ebp + 8], 0x41a0fc
mov eax, dword [ebp + 8]
cmp dword [eax], edi
je 0x40d634
mov ecx, dword [ebp - 8]
push edi
push edi
lea eax, [ebp + ebx*4 - 0x5c]
push eax
push fcn.0040d47f
push edi
push edi
mov dword [eax], ecx
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebp + ebx*4 - 0x34], eax
inc ebx
inc dword [ebp - 8]
add dword [ebp + 8], 0x144
cmp dword [ebp + 8], 0x41ac60
jl 0x40d60f
cmp dword [0x419fb8], edi
jne 0x40d653
cmp ebx, edi
je 0x40d687
push 4
push edi
push 0xc
call fcn.0040cbdf
add esp, 0xc
cmp dword [0x419fb8], edi
je 0x40d674
lea eax, [ebp + 8]
push eax
mov dword [ebp + 8], edi
call fcn.0040d47f
cmp ebx, edi
je 0x40d687
push 0xffffffffffffffff
push 1
lea eax, [ebp - 0x34]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
cmp ebx, edi
mov dword [ebp + 8], edi
jle 0x40d6a3
mov eax, dword [ebp + 8]
push dword [ebp + eax*4 - 0x34]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc dword [ebp + 8]
cmp dword [ebp + 8], ebx
jl 0x40d68e
call fcn.0040cb22
call dword [sym.imp.WININET.dll_InternetClearAllPerSiteCookieDecisions]
cmp dword [ebp - 0xc], edi
je 0x40d729
cmp dword [0x414828], 0x16c
jle 0x40d729
cmp dword [0x4211a8], edi
je 0x40d729
mov ebx, 0x1000
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x40d6e2
mov edx, esi
call fcn.00409556
jmp 0x40d6ea
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea eax, [ebp - 0x205c]
push eax
mov edx, esi
call fcn.00407a99
pop ecx
mov ecx, 0x402d50
lea eax, [ebp - 0x205c]
call fcn.00407a75
push edi
push edi
push dword [0x4211ac]
push edi
push eax
push dword [0x4248dc]
call fcn.00404a6d
add esp, 0x18
test eax, eax
jne 0x40d50a
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret