Function at 0x40fb70
Capabilities:
Access peb ldr_data
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x4752cc
mov eax, dword fs:[0]
push eax
mov eax, 0x1270
call fcn.00472150
mov eax, dword [0x49eef8]
xor eax, esp
mov dword [esp + 0x126c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x49eef8]
xor eax, esp
push eax
lea eax, [esp + 0x1284]
mov dword fs:[0], eax
mov esi, ecx
fldz
mov ecx, dword [esp + 0x1294]
fstp qword [esp + 0x1c]
lea eax, [esp + 0x30]
push eax
mov ebp, 1
push ecx
mov dword [esp + 0x1294], ebp
mov dword [esp + 0x1c], 0
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
lea edx, [esp + 0x1294]
push edx
mov ebx, eax
lea eax, [esp + 0x1c]
push str._CopyFileToWM_src_
push eax
call fcn.0040c4f0
mov eax, dword [eax]
push eax
mov byte [esp + 0x129c], 2
call fcn.00403100
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
or edi, 0xffffffff
add esp, 0x10
mov byte [esp + 0x128c], 1
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40fc34
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x1298]
push ecx
lea edx, [esp + 0x1c]
push str._CopyFileToWM_dest_
push edx
call fcn.0040c4f0
mov eax, dword [eax]
push eax
mov byte [esp + 0x129c], 3
call fcn.00403100
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
add esp, 0x10
mov byte [esp + 0x128c], 1
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40fc85
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp ebx, edi
jne 0x40fc9b
push str._CopyFileToWM_INVALID_HANDLE_VALUE__hFind
call fcn.00403100
add esp, 4
jmp 0x40ffa3
test byte [esp + 0x30], 0x10
je 0x40fcb5
push str._CopyFileToWM_wfd.dwFileAttributes__FILE_ATTRIBUTE_DIRECTORY
call fcn.00403100
add esp, 4
mov dword [esp + 0x14], ebp
jmp 0x40fcd3
mov ecx, dword [esp + 0x50]
sub ecx, dword [esp + 0x4c]
mov dword [esp + 0x18], ecx
fild dword [esp + 0x18]
test ecx, ecx
jge 0x40fccf
fadd qword [0x47f2c8]
fstp qword [esp + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
fldz
fcomp qword [esp + 0x1c]
fnstsw ax
test ah, 0x44
jp 0x40fd17
push str._CopyFileToWM_originFileSize__0
call fcn.00403100
mov eax, dword [esp + 0x1298]
add eax, 0xfffffff0
add esp, 4
mov byte [esp + 0x128c], 0
lea edx, [eax + 0xc]
mov ecx, edi
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x40ffc1
mov ecx, esi
call fcn.0040f520
test eax, eax
je 0x40fd34
push str._CopyFileToWM_hRapiResult___S_OK
call fcn.00403100
add esp, 4
jmp 0x40ffa3
mov ecx, dword [esp + 0x1294]
push 0
push 0x80
push 3
push 0
push ebp
push SysReAllocStringLen
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, dword [sym.imp.KERNEL32.dll_FormatMessageW]
mov ebp, eax
cmp ebp, edi
jne 0x40fd76
push str._CopyFileToWM_hPCFile__INVALID_HANDLE_VALUE
call fcn.00403100
add esp, 4
mov ebp, 1
jmp 0x40ff14
mov edx, dword [esi + 0x168]
push 0
push str.Program_Files
call edx
mov eax, dword [esi + 0x168]
push 0
push str.Program_FilesNPS_Module
call eax
cmp eax, 1
jne 0x40fda0
push str._CopyFileToWM_m_DynamicRapi.myCeCreateDirectory_success
jmp 0x40fda5
push str._CopyFileToWM_m_DynamicRapi.myCeCreateDirectory_fail
call fcn.00403100
mov edx, dword [esi + 0x18c]
add esp, 4
push 0
push 0
lea ecx, [esp + 0x20]
push ecx
push 0
call edx
push eax
push 0
push 0x1300
call ebx
mov eax, dword [0x49f474]
mov edx, dword [eax + 0xc]
mov ecx, 0x49f474
call edx
add eax, 0x10
mov dword [esp + 0x1c], eax
push str._CopyFileToWM_m_DynamicRapi.myCeGetLastError_m_DynamicRapi.myCeCreateDirectory_
lea ecx, [esp + 0x20]
mov byte [esp + 0x1290], 4
call fcn.00403410
mov eax, dword [esp + 0x18]
push eax
lea ecx, [esp + 0x20]
call fcn.004053c0
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.00403100
mov edx, dword [esp + 0x129c]
mov eax, dword [esi + 0x14c]
add esp, 4
push 0
push 0x80
push 2
push 0
push 2
push 0x40000000
push edx
call eax
mov edi, eax
cmp edi, 0xffffffff
jne 0x40fe41
push str._CopyFileToWM_INVALID_HANDLE_VALUE__hDest
jmp 0x40fe96
push 0
lea ecx, [esp + 0x28]
push ecx
push 0x1000
lea edx, [esp + 0x28c]
push edx
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40fe91
mov ecx, dword [esp + 0x24]
push 0
lea eax, [esp + 0x30]
push eax
mov eax, dword [esi + 0x150]
push ecx
lea edx, [esp + 0x28c]
push edx
push edi
call eax
test eax, eax
je 0x40fe8a
cmp dword [esp + 0x24], 0
jne 0x40fe41
jmp 0x40fea6
push str._CopyFileToWM__m_DynamicRapi.myCeCeWriteFile_hDest_Buffer_dwNumRead_dwNumWritten_NULL_
jmp 0x40fe96
push str._CopyFileToWM_ReadFile___false
call fcn.00403100
add esp, 4
mov dword [esp + 0x14], 1
mov edx, dword [esi + 0x18c]
push 0
push 0
lea ecx, [esp + 0x20]
push ecx
push 0
call edx
push eax
push 0
push 0x1300
call ebx
push str._CopyFileToWM_m_DynamicRapi.myCeGetLastError_
lea ecx, [esp + 0x20]
call fcn.00403410
mov eax, dword [esp + 0x18]
push eax
lea ecx, [esp + 0x20]
call fcn.004053c0
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.00403100
mov edx, dword [esi + 0x154]
add esp, 4
push edi
call edx
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x1c]
mov byte [esp + 0x128c], 1
call fcn.00401e00
mov ebp, dword [esp + 0x14]
or edi, 0xffffffff
mov eax, dword [esi + 0x1b0]
call eax
mov edx, dword [esi + 0x18c]
push 0
push 0
lea ecx, [esp + 0x30]
push ecx
push 0
call edx
push eax
push 0
push 0x1300
call ebx
mov eax, dword [0x49f474]
mov edx, dword [eax + 0xc]
mov ecx, 0x49f474
call edx
add eax, 0x10
mov dword [esp + 0x14], eax
push str._CopyFileToWM_m_DynamicRapi.myCeGetLastError_
lea ecx, [esp + 0x18]
mov byte [esp + 0x1290], 5
call fcn.00403410
mov eax, dword [esp + 0x28]
push eax
lea ecx, [esp + 0x18]
call fcn.004053c0
mov esi, dword [esp + 0x14]
push esi
call fcn.00403100
lea eax, [esi - 0x10]
add esp, 4
mov byte [esp + 0x128c], 1
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ffa3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x1294]
add eax, 0xfffffff0
mov byte [esp + 0x128c], 0
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ffcd
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x1298]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
mov dword [esp + 0x128c], edi
lock xadd dword [ecx], edi
dec edi
test edi, edi
jg 0x40fff4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, ebp
mov ecx, dword [esp + 0x1284]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x126c]
xor ecx, esp
call fcn.00472076
add esp, 0x127c
ret 8