Function at 0x40d607
Capabilities:
Copy file
Create thread
Delete file
Get common file path
Link many functions at runtime
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44403e
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
sub esp, 0x338
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x348], ecx
mov dword [ebp - 0x14], 0xffffffff
mov dword [ebp - 0x12c], 0
mov dword [ebp - 0x120], 0
mov byte [ebp - 0x128], 0
mov byte [ebp - 0x11c], 1
mov eax, dword [ebp + 0x18]
and eax, 0xff
test eax, eax
je 0x40d69c
mov ecx, dword [ebp + 8]
push ecx
mov ecx, dword [ebp - 0x348]
call fcn.0040d225
mov dword [ebp - 0x124], eax
cmp dword [ebp - 0x124], 0
jl 0x40d69c
push 0x1d4c0
mov edx, dword [ebp - 0x124]
push edx
mov ecx, dword [ebp - 0x348]
call fcn.0040d288
push 1
mov eax, dword [ebp - 0x348]
add eax, 0x18bc
push eax
lea ecx, [ebp - 0x23c]
call fcn.0040e2e0
mov dword [ebp - 4], 0
mov dword [ebp - 0x124], 0
jmp 0x40d6d7
mov ecx, dword [ebp - 0x124]
add ecx, 1
mov dword [ebp - 0x124], ecx
cmp dword [ebp - 0x124], 0x14
jge 0x40d71e
mov edx, dword [ebp - 0x124]
imul edx, edx, 0x13c
mov eax, dword [ebp - 0x348]
xor ecx, ecx
mov cl, byte [eax + edx + 0x38]
test ecx, ecx
jne 0x40d71c
mov byte [ebp - 0x128], 1
mov edx, dword [ebp - 0x124]
imul edx, edx, 0x13c
mov eax, dword [ebp - 0x348]
mov byte [eax + edx + 0x38], 1
jmp 0x40d71e
jmp 0x40d6c8
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x23c]
call fcn.0040e320
mov ecx, dword [ebp - 0x128]
and ecx, 0xff
test ecx, ecx
je 0x40de23
mov dword [ebp - 4], 1
push 0x5c
mov edx, dword [ebp + 8]
push edx
call fcn.004265ad
add esp, 8
mov dword [ebp - 0x240], eax
cmp dword [ebp - 0x240], 0
jge 0x40d79f
lea eax, [ebp - 0x230]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push 0x459468
lea ecx, [ebp - 0x230]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov edx, dword [ebp + 8]
push edx
lea eax, [ebp - 0x230]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
jmp 0x40d7b0
mov ecx, dword [ebp + 8]
push ecx
lea edx, [ebp - 0x230]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x230]
push eax
mov ecx, dword [ebp - 0x124]
push ecx
push str.CModule::StartModule_Loading:__ld__s
call fcn.004288c1
add esp, 0xc
push 0x5c
lea edx, [ebp - 0x230]
push edx
call fcn.004265ad
add esp, 8
mov dword [ebp - 0x240], eax
mov dword [ebp - 0x244], 0
jmp 0x40d7fd
mov eax, dword [ebp - 0x244]
add eax, 1
mov dword [ebp - 0x244], eax
cmp dword [ebp - 0x244], 0x64
jge 0x40d97f
mov ecx, dword [ebp - 0x240]
push ecx
lea edx, [ebp - 0x230]
push edx
mov eax, dword [ebp - 0x124]
imul eax, eax, 0x13c
mov ecx, dword [ebp - 0x348]
lea edx, [ecx + eax + 0x39]
push edx
call fcn.00429c80
add esp, 0xc
mov eax, dword [ebp - 0x244]
push eax
push 0x459494
mov ecx, dword [ebp - 0x124]
imul ecx, ecx, 0x13c
mov edx, dword [ebp - 0x240]
add edx, ecx
mov eax, dword [ebp - 0x348]
lea ecx, [eax + edx + 0x39]
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
mov edx, dword [ebp - 0x124]
imul edx, edx, 0x13c
mov eax, dword [ebp - 0x348]
lea ecx, [eax + edx + 0x39]
push ecx
push str._s.lck
lea edx, [ebp - 0x118]
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push str..ntr
mov eax, dword [ebp - 0x124]
imul eax, eax, 0x13c
mov ecx, dword [ebp - 0x348]
lea edx, [ecx + eax + 0x39]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0
push 0x122
push 2
push 0
push 0
push 0x40000000
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x120], eax
cmp dword [ebp - 0x120], 0xffffffff
je 0x40d97a
mov ecx, dword [ebp - 0x124]
imul ecx, ecx, 0x13c
mov edx, dword [ebp - 0x348]
lea eax, [edx + ecx + 0x39]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0
mov ecx, dword [ebp - 0x124]
imul ecx, ecx, 0x13c
mov edx, dword [ebp - 0x348]
lea eax, [edx + ecx + 0x39]
push eax
lea ecx, [ebp - 0x230]
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x40d956
push 0x122
mov edx, dword [ebp - 0x124]
imul edx, edx, 0x13c
mov eax, dword [ebp - 0x348]
lea ecx, [eax + edx + 0x39]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
jmp 0x40d97f
mov edx, dword [ebp - 0x120]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x120], 0
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
jmp 0x40d7ee
cmp dword [ebp + 0x1c], 0
je 0x40d9c1
mov ecx, dword [ebp - 0x124]
imul ecx, ecx, 0x13c
mov edx, dword [ebp - 0x348]
lea eax, [edx + ecx + 0x39]
push eax
call fcn.0041e5ec
add esp, 4
and eax, 0xff
test eax, eax
jne 0x40d9c1
push str.CModule::StartModule_Cert_Error
call fcn.004288c1
add esp, 4
mov byte [ebp - 0x11c], 0
mov ecx, dword [ebp - 0x11c]
and ecx, 0xff
test ecx, ecx
je 0x40dddb
mov edx, dword [ebp - 0x124]
imul edx, edx, 0x13c
mov eax, dword [ebp - 0x348]
lea ecx, [eax + edx + 0x39]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edx, dword [ebp - 0x124]
imul edx, edx, 0x13c
mov ecx, dword [ebp - 0x348]
mov dword [ecx + edx + 0x20], eax
mov edx, dword [ebp - 0x124]
imul edx, edx, 0x13c
mov eax, dword [ebp - 0x348]
cmp dword [eax + edx + 0x20], 0
je 0x40ddc7
push str.Start
mov ecx, dword [ebp - 0x124]
imul ecx, ecx, 0x13c
mov edx, dword [ebp - 0x348]
mov eax, dword [edx + ecx + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [ebp - 0x124]
imul ecx, ecx, 0x13c
mov edx, dword [ebp - 0x348]
mov dword [edx + ecx + 0x24], eax
mov eax, dword [ebp - 0x124]
imul eax, eax, 0x13c
mov ecx, dword [ebp - 0x348]
cmp dword [ecx + eax + 0x24], 0
je 0x40ddb1
push str.Stop
mov edx, dword [ebp - 0x124]
imul edx, edx, 0x13c
mov eax, dword [ebp - 0x348]
mov ecx, dword [eax + edx + 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edx, dword [ebp - 0x124]
imul edx, edx, 0x13c
mov ecx, dword [ebp - 0x348]
mov dword [ecx + edx + 0x28], eax
mov edx, dword [ebp - 0x124]
imul edx, edx, 0x13c
mov eax, dword [ebp - 0x348]
cmp dword [eax + edx + 0x28], 0
je 0x40ddb1
push str.Data
mov ecx, dword [ebp - 0x124]
imul ecx, ecx, 0x13c
mov edx, dword [ebp - 0x348]
mov eax, dword [edx + ecx + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [ebp - 0x124]
imul ecx, ecx, 0x13c
mov edx, dword [ebp - 0x348]
mov dword [edx + ecx + 0x2c], eax
push str.DataExt
mov eax, dword [ebp - 0x124]
imul eax, eax, 0x13c
mov ecx, dword [ebp - 0x348]
mov edx, dword [ecx + eax + 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [ebp - 0x124]
imul ecx, ecx, 0x13c
mov edx, dword [ebp - 0x348]
mov dword [edx + ecx + 0x30], eax
mov eax, dword [ebp - 0x124]
imul eax, eax, 0x13c
mov ecx, dword [ebp - 0x348]
cmp dword [ecx + eax + 0x30], 0
je 0x40db65
push str.CModule::StartModule:_Module_accepts_extended_data
call fcn.004288c1
add esp, 4
push 0
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0x124]
imul eax, eax, 0x13c
mov ecx, dword [ebp - 0x348]
lea edx, [ecx + eax + 0xc]
push edx
call fcn.004266b4
add esp, 0xc
push 0
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 0x124]
imul ecx, ecx, 0x13c
mov edx, dword [ebp - 0x348]
lea eax, [edx + ecx + 0x10]
push eax
call fcn.004266b4
add esp, 0xc
mov ecx, dword [ebp - 0x124]
imul ecx, ecx, 0x13c
mov edx, dword [ebp - 0x348]
mov eax, dword [ebp + 0x10]
mov dword [edx + ecx + 0x14], eax
mov ecx, dword [ebp - 0x124]
imul ecx, ecx, 0x13c
mov edx, dword [ebp - 0x348]
mov eax, dword [ebp + 0x14]
mov dword [edx + ecx + 0x1c], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [ebp - 0x124]
imul ecx, ecx, 0x13c
mov edx, dword [ebp - 0x348]
mov dword [edx + ecx + 0x18], eax
mov eax, dword [ebp + 0x10]
and eax, 2
test eax, eax
je 0x40dc6a
push str.Event
mov ecx, dword [ebp - 0x124]
imul ecx, ecx, 0x13c
mov edx, dword [ebp - 0x348]
mov eax, dword [edx + ecx + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [ebp - 0x124]
imul ecx, ecx, 0x13c
mov edx, dword [ebp - 0x348]
mov dword [edx + ecx + 0x34], eax
mov eax, dword [ebp - 0x124]
imul eax, eax, 0x13c
mov ecx, dword [ebp - 0x348]
cmp dword [ecx + eax + 0x34], 0
je 0x40dc6a
mov edx, dword [ebp - 0x348]
mov eax, dword [ebp - 0x124]
mov dword [edx + 0x18b4], eax
mov ecx, dword [ebp + 0x10]
and ecx, 4
test ecx, ecx
je 0x40dce2
mov edx, dword [ebp - 0x348]
mov eax, dword [ebp - 0x124]
mov dword [edx + 0x18b8], eax
lea ecx, [ebp - 0x12c]
push ecx
push 0
mov edx, dword [ebp - 0x348]
push edx
push fcn.0040d4b2
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov ecx, dword [ebp - 0x124]
imul ecx, ecx, 0x13c
mov edx, dword [ebp - 0x348]
mov dword [edx + ecx + 4], eax
mov eax, dword [ebp - 0x124]
imul eax, eax, 0x13c
mov ecx, dword [ebp - 0x348]
cmp dword [ecx + eax + 4], 0
je 0x40dcdd
mov edx, dword [ebp - 0x124]
mov dword [ebp - 0x14], edx
jmp 0x40ddaf
mov eax, dword [ebp + 0x10]
and eax, 1
test eax, eax
je 0x40dd18
mov ecx, dword [ebp - 0x348]
mov edx, dword [ebp - 0x124]
mov dword [ecx + 0x18b8], edx
mov eax, dword [ebp - 0x348]
push eax
call fcn.0040d4b2
mov ecx, dword [ebp - 0x124]
mov dword [ebp - 0x14], ecx
jmp 0x40ddaf
mov edx, dword [ebp - 0x124]
imul edx, edx, 0x13c
mov eax, dword [ebp - 0x348]
mov ecx, dword [eax + edx + 0xc]
push ecx
mov edx, dword [ebp - 0x124]
push edx
push str.CModule::StartModule_Start:__ld__s
call fcn.004288c1
add esp, 0xc
mov eax, dword [ebp - 0x124]
imul eax, eax, 0x13c
mov ecx, dword [ebp - 0x348]
cmp dword [ecx + eax + 0x24], 0
je 0x40dda6
mov edx, dword [ebp - 0x124]
imul edx, edx, 0x13c
mov eax, dword [ebp - 0x348]
mov ecx, dword [eax + edx + 0x1c]
push ecx
mov edx, dword [ebp - 0x124]
imul edx, edx, 0x13c
mov eax, dword [ebp - 0x348]
mov ecx, dword [eax + edx + 0x10]
push ecx
call fcn.00421304
push eax
mov edx, dword [ebp - 0x124]
imul edx, edx, 0x13c
mov eax, dword [ebp - 0x348]
call dword [eax + edx + 0x24]
mov ecx, dword [ebp - 0x124]
mov dword [ebp - 0x14], ecx
jmp 0x40ddc5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CModule::StartModule_GetProcAddress_Error___ld_
call fcn.004288c1
add esp, 8
jmp 0x40dddb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CModule::StartModule_LoadLibrary_Error___ld_
call fcn.004288c1
add esp, 8
jmp 0x40de1a
mov dword [ebp - 4], 0xffffffff
jmp 0x40de30
push str.CModule::StartModule_no_empty_position_found
call fcn.004288c1
add esp, 4
cmp dword [ebp - 0x120], 0
je 0x40de53
mov ecx, dword [ebp - 0x120]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edx, [ebp - 0x118]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18