Function at 0x4039e7
Capabilities:
Check if file exists
Copy file
Get common file path
Get file attributes
Link many functions at runtime

Disassembly:
mov eax, 0x410674
call fcn.00410160
sub esp, 0x834
and dword [ebp - 4], 0
and dword [ebp - 0x14], 0
push ebx
push esi
push edi
lea eax, [ebp - 0x240]
mov dword [ebp - 0x10], esp
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x403adf
mov edi, dword [sym.imp.USER32.dll_wsprintfW]
mov ebx, str.idmmbc.dll
lea eax, [ebp - 0x240]
push ebx
push eax
mov esi, 0x41add0
push 0x415784
push esi
call edi
add esp, 0x10
lea eax, [ebp - 0x240]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x403adf
lea eax, [ebp - 0x840]
push eax
lea eax, [ebp - 0x640]
push eax
lea eax, [ebp - 0x440]
push eax
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x240]
push eax
call sub.MSVCRT.dll__wsplitpath
add esp, 0x14
lea eax, [ebp - 0x440]
push ebx
push eax
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x240]
push str._s_s_s
push eax
call edi
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
add esp, 0x14
push esi
call edi
cmp eax, 0xffffffff
jne 0x403af0
lea eax, [ebp - 0x240]
push eax
call edi
cmp eax, 0xffffffff
jne 0x403aca
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x403adf
xor ebx, ebx
lea eax, [ebp - 0x240]
push ebx
push esi
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x403af2
xor eax, eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret
xor ebx, ebx
mov edi, dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push str.WS2_32
call edi
cmp eax, ebx
mov dword [0x41adc0], eax
je 0x403adf
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.WSCInstallProvider
push eax
call esi
cmp eax, ebx
mov dword [0x41adb8], eax
je 0x403adf
push str.WSCEnumProtocols
push dword [0x41adc0]
call esi
cmp eax, ebx
mov dword [0x41adc8], eax
je 0x403adf
push str.WSCWriteProviderOrder
push dword [0x41adc0]
call esi
push str.WSCUpdateProvider
mov dword [0x41adc4], eax
push dword [0x41adc0]
call esi
push str.WSCGetProviderPath
mov dword [0x41adbc], eax
push dword [0x41adc0]
call esi
push str.WSCDeinstallProvider
mov dword [0x41afdc], eax
push dword [0x41adc0]
call esi
push str.rpcrt4.dll
mov dword [0x41adcc], eax
call edi
cmp eax, ebx
mov dword [0x41adb0], eax
je 0x403adf
push str.UuidFromStringW
push eax
call esi
cmp eax, ebx
mov dword [0x41afd8], eax
je 0x403adf
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x2c]
push eax
push ebx
push 0xf003f
push ebx
push ebx
push ebx
push str.SOFTWAREInternet_Download_Manager
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
cmp dword [ebp + 8], ebx
je 0x403bda
lea eax, [ebp - 0x24]
push eax
call fcn.00402ade
cmp eax, ebx
pop ecx
jne 0x403c59
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
push ebx
push ebx
call dword [0x41adc8]
push dword [ebp - 0x14]
call sub.MSVCRT.dll_malloc
mov edi, eax
pop ecx
cmp edi, ebx
je 0x403c59
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
push edi
push ebx
call dword [0x41adc8]
cmp eax, 0xffffffff
mov dword [ebp - 0x20], eax
je 0x403c52
mov dword [ebp + 8], ebx
cmp ebx, dword [ebp - 0x20]
jge 0x403c4b
mov eax, ebx
push 0x10
imul eax, eax, 0x274
push 0x414108
lea esi, [eax + edi]
lea eax, [esi + 0x14]
push eax
call sub.MSVCRT.dll_memcmp
add esp, 0xc
test eax, eax
jne 0x403c48
mov eax, dword [esi + 0x24]
mov dword [ebp + 8], 1
mov dword [ebp - 0x24], eax
inc ebx
jmp 0x403c14
xor ebx, ebx
cmp dword [ebp + 8], ebx
jne 0x403c74
push edi
call sub.MSVCRT.dll_free
pop ecx
push dword [0x41adc0]
mov esi, dword [sym.imp.KERNEL32.dll_FreeLibrary]
call esi
push dword [0x41adb0]
call esi
jmp 0x403adf
mov dword [ebp + 8], ebx
mov esi, 0xff
mov edx, dword [ebp - 0x20]
cmp dword [ebp + 8], edx
jge 0x403cc0
mov eax, dword [ebp + 8]
imul eax, eax, 0x274
mov ecx, dword [eax + edi + 0x5c]
add eax, edi
cmp ecx, 6
je 0x403caa
cmp ecx, 0x11
je 0x403caa
cmp ecx, esi
je 0x403caa
cmp ecx, ebx
jne 0x403cbb
cmp dword [eax + 0x60], esi
jne 0x403cbb
push edx
push edi
push dword [ebp - 0x2c]
push dword [ebp - 0x24]
push eax
call fcn.00402bb6
add esp, 0x14
inc dword [ebp + 8]
jmp 0x403c7c
push edi
call sub.MSVCRT.dll_free
cmp dword [0x414118], ebx
pop ecx
je 0x403e48
lea eax, [ebp - 0x18]
mov dword [ebp - 0x14], ebx
push eax
lea eax, [ebp - 0x14]
push eax
push ebx
push ebx
call dword [0x41adc8]
push dword [ebp - 0x14]
call sub.MSVCRT.dll_malloc
mov esi, eax
pop ecx
cmp esi, ebx
mov dword [ebp - 0x28], esi
je 0x403e48
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
push esi
push ebx
call dword [0x41adc8]
cmp eax, 0xffffffff
mov dword [ebp - 0x20], eax
je 0x403e41
shl eax, 2
push eax
call sub.MSVCRT.dll_malloc
mov edx, eax
pop ecx
cmp edx, ebx
mov dword [ebp - 0x1c], edx
je 0x403e41
push 7
pop edi
cmp edi, 1
jle 0x403dc0
and dword [ebp + 8], 0
mov eax, dword [ebp + 8]
cmp eax, dword [ebp - 0x20]
jge 0x403d79
imul eax, eax, 0x274
add esi, eax
cmp dword [esi + 0x28], edi
jne 0x403d71
push 0
push esi
push dword [ebp - 0x24]
push edi
call fcn.00402f2b
add esp, 0x10
test eax, eax
je 0x403d71
mov ecx, dword [ebp - 0x1c]
mov eax, dword [esi + 0x24]
mov dword [ecx + ebx*4], eax
inc ebx
inc dword [ebp + 8]
mov esi, dword [ebp - 0x28]
jmp 0x403d3f
and dword [ebp + 8], 0
mov eax, dword [ebp + 8]
cmp eax, dword [ebp - 0x20]
jge 0x403db7
imul eax, eax, 0x274
add esi, eax
cmp dword [esi + 0x28], edi
jne 0x403daf
push 0
push esi
push dword [ebp - 0x24]
push edi
call fcn.00402f2b
add esp, 0x10
test eax, eax
jne 0x403daf
mov ecx, dword [ebp - 0x1c]
mov eax, dword [esi + 0x24]
mov dword [ecx + ebx*4], eax
inc ebx
inc dword [ebp + 8]
mov esi, dword [ebp - 0x28]
jmp 0x403d7d
mov edx, dword [ebp - 0x1c]
dec edi
jmp 0x403d32
xor ecx, ecx
cmp ecx, dword [ebp - 0x20]
jge 0x403de1
mov eax, ecx
imul eax, eax, 0x274
add eax, esi
cmp dword [eax + 0x28], 1
jg 0x403dde
mov eax, dword [eax + 0x24]
mov dword [edx + ebx*4], eax
inc ebx
inc ecx
jmp 0x403dc2
mov eax, dword [0x41adc4]
push ebx
test eax, eax
push edx
je 0x403e13
call eax
cmp eax, 0x2afa
mov dword [ebp - 0x18], eax
je 0x403dff
cmp eax, 0xaa
jne 0x403e36
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
push ebx
push dword [ebp - 0x1c]
call dword [0x41adc4]
jmp 0x403e33
call fcn.00401ecb
cmp eax, 0xaa
mov dword [ebp - 0x18], eax
jne 0x403e36
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
push ebx
push dword [ebp - 0x1c]
call fcn.00401ecb
mov dword [ebp - 0x18], eax
push dword [ebp - 0x1c]
call sub.MSVCRT.dll_free
pop ecx
xor ebx, ebx
push esi
call sub.MSVCRT.dll_free
pop ecx
push dword [0x41adc0]
mov esi, dword [sym.imp.KERNEL32.dll_FreeLibrary]
call esi
push dword [0x41adb0]
call esi
push 1
mov dword [0x41adb8], ebx
mov dword [0x41adc8], ebx
mov dword [0x41afd8], ebx
mov dword [0x41adc4], ebx
mov dword [0x41adbc], ebx
mov dword [0x41afdc], ebx
mov dword [0x41adcc], ebx
mov dword [0x41adc0], ebx
mov dword [0x41adb0], ebx
pop eax
jmp 0x403ae1