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

Disassembly:
mov eax, 0x41099c
call fcn.00410480
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 0x403ae5
mov edi, dword [sym.imp.USER32.dll_wsprintfW]
mov ebx, str.idmmbc.dll
lea eax, [ebp - 0x240]
push ebx
push eax
mov esi, 0x41af10
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 0x403ae5
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 0x403af6
lea eax, [ebp - 0x240]
push eax
call edi
cmp eax, 0xffffffff
jne 0x403ad0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x403ae5
xor ebx, ebx
lea eax, [ebp - 0x240]
push ebx
push esi
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x403af8
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 [0x41af00], eax
je 0x403ae5
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.WSCInstallProvider
push eax
call esi
cmp eax, ebx
mov dword [0x41aef8], eax
je 0x403ae5
push str.WSCEnumProtocols
push dword [0x41af00]
call esi
cmp eax, ebx
mov dword [0x41af08], eax
je 0x403ae5
push str.WSCWriteProviderOrder
push dword [0x41af00]
call esi
push str.WSCUpdateProvider
mov dword [0x41af04], eax
push dword [0x41af00]
call esi
push str.WSCGetProviderPath
mov dword [0x41aefc], eax
push dword [0x41af00]
call esi
push str.WSCDeinstallProvider
mov dword [0x41b11c], eax
push dword [0x41af00]
call esi
push str.rpcrt4.dll
mov dword [0x41af0c], eax
call edi
cmp eax, ebx
mov dword [0x41aef0], eax
je 0x403ae5
push str.UuidFromStringW
push eax
call esi
cmp eax, ebx
mov dword [0x41b118], eax
je 0x403ae5
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 0x403be0
lea eax, [ebp - 0x24]
push eax
call fcn.00402ade
cmp eax, ebx
pop ecx
jne 0x403c5f
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
push ebx
push ebx
call dword [0x41af08]
push dword [ebp - 0x14]
call sub.MSVCRT.dll_malloc
mov edi, eax
pop ecx
cmp edi, ebx
je 0x403c5f
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
push edi
push ebx
call dword [0x41af08]
cmp eax, 0xffffffff
mov dword [ebp - 0x20], eax
je 0x403c58
mov dword [ebp + 8], ebx
cmp ebx, dword [ebp - 0x20]
jge 0x403c51
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 0x403c4e
mov eax, dword [esi + 0x24]
mov dword [ebp + 8], 1
mov dword [ebp - 0x24], eax
inc ebx
jmp 0x403c1a
xor ebx, ebx
cmp dword [ebp + 8], ebx
jne 0x403c7a
push edi
call sub.MSVCRT.dll_free
pop ecx
push dword [0x41af00]
mov esi, dword [sym.imp.KERNEL32.dll_FreeLibrary]
call esi
push dword [0x41aef0]
call esi
jmp 0x403ae5
mov dword [ebp + 8], ebx
mov esi, 0xff
mov edx, dword [ebp - 0x20]
cmp dword [ebp + 8], edx
jge 0x403cc6
mov eax, dword [ebp + 8]
imul eax, eax, 0x274
mov ecx, dword [eax + edi + 0x5c]
add eax, edi
cmp ecx, 6
je 0x403cb0
cmp ecx, 0x11
je 0x403cb0
cmp ecx, esi
je 0x403cb0
cmp ecx, ebx
jne 0x403cc1
cmp dword [eax + 0x60], esi
jne 0x403cc1
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 0x403c82
push edi
call sub.MSVCRT.dll_free
cmp dword [0x414118], ebx
pop ecx
je 0x403e4e
lea eax, [ebp - 0x18]
mov dword [ebp - 0x14], ebx
push eax
lea eax, [ebp - 0x14]
push eax
push ebx
push ebx
call dword [0x41af08]
push dword [ebp - 0x14]
call sub.MSVCRT.dll_malloc
mov esi, eax
pop ecx
cmp esi, ebx
mov dword [ebp - 0x28], esi
je 0x403e4e
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
push esi
push ebx
call dword [0x41af08]
cmp eax, 0xffffffff
mov dword [ebp - 0x20], eax
je 0x403e47
shl eax, 2
push eax
call sub.MSVCRT.dll_malloc
mov edx, eax
pop ecx
cmp edx, ebx
mov dword [ebp - 0x1c], edx
je 0x403e47
push 7
pop edi
cmp edi, 1
jle 0x403dc6
and dword [ebp + 8], 0
mov eax, dword [ebp + 8]
cmp eax, dword [ebp - 0x20]
jge 0x403d7f
imul eax, eax, 0x274
add esi, eax
cmp dword [esi + 0x28], edi
jne 0x403d77
push 0
push esi
push dword [ebp - 0x24]
push edi
call fcn.00402f2b
add esp, 0x10
test eax, eax
je 0x403d77
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 0x403d45
and dword [ebp + 8], 0
mov eax, dword [ebp + 8]
cmp eax, dword [ebp - 0x20]
jge 0x403dbd
imul eax, eax, 0x274
add esi, eax
cmp dword [esi + 0x28], edi
jne 0x403db5
push 0
push esi
push dword [ebp - 0x24]
push edi
call fcn.00402f2b
add esp, 0x10
test eax, eax
jne 0x403db5
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 0x403d83
mov edx, dword [ebp - 0x1c]
dec edi
jmp 0x403d38
xor ecx, ecx
cmp ecx, dword [ebp - 0x20]
jge 0x403de7
mov eax, ecx
imul eax, eax, 0x274
add eax, esi
cmp dword [eax + 0x28], 1
jg 0x403de4
mov eax, dword [eax + 0x24]
mov dword [edx + ebx*4], eax
inc ebx
inc ecx
jmp 0x403dc8
mov eax, dword [0x41af04]
push ebx
test eax, eax
push edx
je 0x403e19
call eax
cmp eax, 0x2afa
mov dword [ebp - 0x18], eax
je 0x403e05
cmp eax, 0xaa
jne 0x403e3c
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
push ebx
push dword [ebp - 0x1c]
call dword [0x41af04]
jmp 0x403e39
call fcn.00401ecb
cmp eax, 0xaa
mov dword [ebp - 0x18], eax
jne 0x403e3c
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 [0x41af00]
mov esi, dword [sym.imp.KERNEL32.dll_FreeLibrary]
call esi
push dword [0x41aef0]
call esi
push 1
mov dword [0x41aef8], ebx
mov dword [0x41af08], ebx
mov dword [0x41b118], ebx
mov dword [0x41af04], ebx
mov dword [0x41aefc], ebx
mov dword [0x41b11c], ebx
mov dword [0x41af0c], ebx
mov dword [0x41af00], ebx
mov dword [0x41aef0], ebx
pop eax
jmp 0x403ae7