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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5ac4f9
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x848
push ebx
push esi
push edi
lea eax, [ebp - 0x13c]
mov dword [ebp - 0x10], esp
xor ebx, ebx
push 0x104
push eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0x1c], ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
jne 0x408a32
lea ecx, [ebp - 0x348]
call fcn.00480870
mov ecx, dword [0x6754d4]
mov dword [ebp + 8], ecx
mov byte [ebp - 4], 2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea edx, [ebp + 8]
push 0x64fa2c
push edx
call fcn.00593b08
mov eax, dword [ebp + 8]
add esp, 0xc
lea ecx, [ebp - 0x348]
push 1
push eax
call fcn.00480980
lea ecx, [ebp + 8]
mov byte [ebp - 4], 1
call fcn.0059ad3d
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x348]
call fcn.00480970
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
lea ecx, [ebp - 0x13c]
push 0x64fa14
push ecx
push 0x64fa0c
push 0x679a30
call fcn.00593b08
add esp, 0x10
lea edx, [ebp - 0x13c]
push 0x104
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x408ac2
lea ecx, [ebp - 0x348]
call fcn.00480870
mov eax, dword [0x6754d4]
mov dword [ebp + 8], eax
mov byte [ebp - 4], 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp + 8]
push 0x64f9dc
push ecx
call fcn.00593b08
mov edx, dword [ebp + 8]
add esp, 0xc
lea ecx, [ebp - 0x348]
push 1
push edx
call fcn.00480980
lea ecx, [ebp + 8]
mov byte [ebp - 4], 3
call fcn.0059ad3d
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x348]
jmp 0x408a18
lea eax, [ebp - 0x854]
lea ecx, [ebp - 0x754]
push eax
lea edx, [ebp - 0x448]
push ecx
lea eax, [ebp - 0x30]
push edx
lea ecx, [ebp - 0x13c]
push eax
push ecx
call fcn.0057f33c
add esp, 0x14
lea edx, [ebp - 0x448]
lea eax, [ebp - 0x30]
lea ecx, [ebp - 0x13c]
push 0x64fa14
push edx
push eax
push 0x64f9d4
push ecx
call fcn.0057f2ea
mov edx, dword [0x679a30]
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
add esp, 0x14
push edx
call esi
cmp eax, 0xffffffff
jne 0x408b5c
lea eax, [ebp - 0x13c]
push eax
call esi
cmp eax, 0xffffffff
jne 0x408b3f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x408a1d
mov ecx, dword [0x679a30]
push ebx
lea edx, [ebp - 0x13c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x408a1d
mov edi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push 0x64f9cc
call edi
cmp eax, ebx
mov dword [0x679a54], eax
je 0x408a1d
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x64f9b8
push eax
call esi
cmp eax, ebx
mov dword [0x679a50], eax
je 0x408a1d
mov eax, dword [0x679a54]
push 0x64f9a4
push eax
call esi
cmp eax, ebx
mov dword [0x679a4c], eax
je 0x408a1d
mov ecx, dword [0x679a54]
push 0x64f98c
push ecx
call esi
mov edx, dword [0x679a54]
push 0x64f978
push edx
mov dword [0x679a48], eax
call esi
mov dword [0x679a44], eax
mov eax, dword [0x679a54]
push 0x64f964
push eax
call esi
mov ecx, dword [0x679a54]
push 0x64f94c
push ecx
mov dword [0x679a40], eax
call esi
push 0x64f940
mov dword [0x679a3c], eax
call edi
cmp eax, ebx
mov dword [0x679a38], eax
je 0x408a1d
push 0x64f930
push eax
call esi
cmp eax, ebx
mov dword [0x679a34], eax
je 0x408a1d
lea edx, [ebp - 0x38]
lea eax, [ebp - 0x34]
push edx
push eax
push ebx
push 0xf003f
push ebx
push ebx
push ebx
push 0x64ee70
push reloc.WSOCK32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
cmp dword [ebp + 8], ebx
je 0x408c59
lea ecx, [ebp - 0x2c]
push ecx
call fcn.004081e0
add esp, 4
cmp eax, ebx
jne 0x408d0a
lea ecx, [ebp - 0x18]
lea edx, [ebp - 0x1c]
push ecx
push edx
push ebx
push ebx
call dword [0x679a4c]
mov eax, dword [ebp - 0x1c]
push eax
call fcn.0057f1b0
mov edi, eax
add esp, 4
cmp edi, ebx
mov dword [ebp - 0x20], edi
jne 0x408c9b
mov ecx, dword [0x679a54]
mov esi, dword [sym.imp.KERNEL32.dll_FreeLibrary]
push ecx
call esi
mov edx, dword [0x679a38]
push edx
call esi
jmp 0x408a1d
lea eax, [ebp - 0x18]
lea ecx, [ebp - 0x1c]
push eax
push ecx
push edi
push 0
call dword [0x679a4c]
mov ebx, eax
cmp ebx, 0xffffffff
mov dword [ebp - 0x28], ebx
je 0x408d01
mov dword [ebp + 8], 0
xor eax, eax
cmp eax, ebx
jge 0x408cfa
lea ecx, [eax + eax*4]
shl ecx, 3
sub ecx, eax
xor ebx, ebx
lea edx, [eax + ecx*4]
mov ecx, 4
lea edx, [edi + edx*4]
mov edi, 0x64f2d0
lea esi, [edx + 0x14]
repe cmpsd dword [esi], dword es:[edi]
jne 0x408cf1
mov ecx, dword [edx + 0x24]
mov dword [ebp + 8], 1
mov dword [ebp - 0x2c], ecx
mov ebx, dword [ebp - 0x28]
mov edi, dword [ebp - 0x20]
inc eax
jmp 0x408cbf
mov eax, dword [ebp + 8]
test eax, eax
jne 0x408d26
push edi
call fcn.0057eacf
add esp, 4
mov edx, dword [0x679a54]
mov esi, dword [sym.imp.KERNEL32.dll_FreeLibrary]
push edx
call esi
mov eax, dword [0x679a38]
push eax
call esi
jmp 0x408a1d
xor esi, esi
cmp esi, ebx
jge 0x408d72
lea ecx, [esi + esi*4]
shl ecx, 3
sub ecx, esi
lea edx, [esi + ecx*4]
mov eax, dword [edi + edx*4 + 0x5c]
lea ecx, [edi + edx*4]
cmp eax, 6
je 0x408d5c
cmp eax, 0x11
je 0x408d5c
cmp eax, 0xff
je 0x408d5c
test eax, eax
jne 0x408d6f
cmp dword [ecx + 0x60], 0xff
jne 0x408d6f
mov eax, dword [ebp - 0x34]
mov edx, dword [ebp - 0x2c]
push ebx
push edi
push eax
push edx
push ecx
call fcn.004082e0
add esp, 0x14
inc esi
jmp 0x408d28
push edi
call fcn.0057eacf
mov eax, dword [0x64f2e0]
add esp, 4
test eax, eax
je 0x408ff6
lea eax, [ebp - 0x18]
lea ecx, [ebp - 0x1c]
push eax
push ecx
push 0
push 0
mov dword [ebp - 0x1c], 0
call dword [0x679a4c]
mov edx, dword [ebp - 0x1c]
push edx
call fcn.0057f1b0
mov ebx, eax
add esp, 4
test ebx, ebx
mov dword [ebp - 0x20], ebx
je 0x408ff6
lea eax, [ebp - 0x18]
lea ecx, [ebp - 0x1c]
push eax
push ecx
push ebx
push 0
call dword [0x679a4c]
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebp - 0x28], edi
je 0x408fed
lea edx, [edi*4]
push edx
call fcn.0057f1b0
add esp, 4
mov dword [ebp + 8], eax
test eax, eax
je 0x408fed
xor esi, esi
mov eax, 7
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x24], eax
cmp eax, 1
jle 0x408f00
xor esi, esi
cmp esi, edi
jge 0x408e7f
lea ecx, [esi + esi*4]
shl ecx, 3
sub ecx, esi
lea edx, [esi + ecx*4]
mov ecx, dword [ebx + edx*4 + 0x28]
cmp ecx, eax
lea edi, [ebx + edx*4]
jne 0x408e73
mov ebx, dword [ebp - 0x2c]
lea eax, [edi + 0x74]
push 0x64f8f0
push eax
call fcn.0057f137
add esp, 8
test eax, eax
jne 0x408e54
mov ecx, dword [ebp - 0x24]
cmp eax, ecx
jge 0x408e4e
cmp dword [edi + eax*4 + 0x2c], ebx
je 0x408e54
inc eax
jmp 0x408e41
xor eax, eax
test eax, eax
je 0x408e73
mov eax, dword [ebp - 0x20]
lea ecx, [esi + esi*4]
shl ecx, 3
sub ecx, esi
lea edx, [esi + ecx*4]
mov ecx, dword [eax + edx*4 + 0x24]
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x14]
mov dword [edx + eax*4], ecx
inc eax
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x24]
mov ebx, dword [ebp - 0x20]
mov edi, dword [ebp - 0x28]
inc esi
jmp 0x408e0c
xor esi, esi
cmp esi, edi
jge 0x408ef4
lea ecx, [esi + esi*4]
shl ecx, 3
sub ecx, esi
lea edx, [esi + ecx*4]
mov ecx, dword [ebx + edx*4 + 0x28]
cmp ecx, eax
lea edi, [ebx + edx*4]
jne 0x408ee8
mov ebx, dword [ebp - 0x2c]
lea eax, [edi + 0x74]
push 0x64f8f0
push eax
call fcn.0057f137
add esp, 8
test eax, eax
jne 0x408ee8
mov ecx, dword [ebp - 0x24]
cmp eax, ecx
jge 0x408ec3
cmp dword [edi + eax*4 + 0x2c], ebx
je 0x408ee8
inc eax
jmp 0x408eb6
xor eax, eax
test eax, eax
jne 0x408ee8
mov eax, dword [ebp - 0x20]
lea ecx, [esi + esi*4]
shl ecx, 3
sub ecx, esi
lea edx, [esi + ecx*4]
mov ecx, dword [eax + edx*4 + 0x24]
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x14]
mov dword [edx + eax*4], ecx
inc eax
mov dword [ebp - 0x14], eax
mov edi, dword [ebp - 0x28]
mov ebx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x24]
inc esi
jmp 0x408e81
mov esi, dword [ebp - 0x14]
dec eax
mov dword [ebp - 0x24], eax
jmp 0x408e01
xor eax, eax
cmp eax, edi
jge 0x408f2a
lea ecx, [eax + eax*4]
shl ecx, 3
sub ecx, eax
lea edx, [eax + ecx*4]
lea ecx, [ebx + edx*4]
mov edx, dword [ebx + edx*4 + 0x28]
cmp edx, 1
jg 0x408f27
mov edx, dword [ebp + 8]
mov ecx, dword [ecx + 0x24]
mov dword [edx + esi*4], ecx
inc esi
inc eax
jmp 0x408f02
mov eax, dword [0x679a48]
push esi
test eax, eax
je 0x408f60
mov ecx, dword [ebp + 8]
push ecx
call eax
cmp eax, 0x2afa
mov dword [ebp - 0x18], eax
je 0x408f4b
cmp eax, 0xaa
jne 0x408f85
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edx, dword [ebp + 8]
push esi
push edx
call dword [0x679a48]
jmp 0x408f82
mov edi, dword [ebp + 8]
push edi
call fcn.00409060
cmp eax, 0xaa
mov dword [ebp - 0x18], eax
jne 0x408f85
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
push esi
push edi
call fcn.00409060
mov dword [ebp - 0x18], eax
test eax, eax
je 0x408fe1
lea ecx, [ebp - 0x654]
call fcn.00480870
mov eax, dword [0x6754d4]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x18]
lea edx, [ebp - 0x14]
push ecx
push 0x64f90c
push edx
mov byte [ebp - 4], 6
call fcn.00593b08
mov eax, dword [ebp - 0x14]
add esp, 0xc
lea ecx, [ebp - 0x654]
push 1
push eax
call fcn.00480980
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 5
call fcn.0059ad3d
lea ecx, [ebp - 0x654]
mov byte [ebp - 4], 0
call fcn.00480970
mov ecx, dword [ebp + 8]
push ecx
call fcn.0057eacf
add esp, 4
push ebx
call fcn.0057eacf
add esp, 4
mov edx, dword [0x679a54]
mov esi, dword [sym.imp.KERNEL32.dll_FreeLibrary]
push edx
call esi
mov eax, dword [0x679a38]
push eax
call esi
mov ecx, dword [ebp - 0xc]
xor eax, eax
pop edi
mov dword [0x679a50], eax
mov dword [0x679a4c], eax
mov dword [0x679a34], eax
mov dword [0x679a48], eax
mov dword [0x679a44], eax
mov dword [0x679a40], eax
mov dword [0x679a3c], eax
mov dword [0x679a54], eax
mov dword [0x679a38], eax
pop esi
mov eax, 1
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 4