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

Disassembly:
push 0xffffffffffffffff
push 0x47521c
mov eax, dword fs:[0]
push eax
mov eax, 0x1270
call fcn.00472040
mov eax, dword [0x49ef38]
xor eax, esp
mov dword [esp + 0x126c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x49ef38]
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.0040c530
mov eax, dword [eax]
push eax
mov byte [esp + 0x129c], 2
call fcn.004031a0
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 0x410004
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.0040c530
mov eax, dword [eax]
push eax
mov byte [esp + 0x129c], 3
call fcn.004031a0
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 0x410055
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp ebx, edi
jne 0x41006b
push str._CopyFileToWM_INVALID_HANDLE_VALUE__hFind
call fcn.004031a0
add esp, 4
jmp 0x410373
test byte [esp + 0x30], 0x10
je 0x410085
push str._CopyFileToWM_wfd.dwFileAttributes__FILE_ATTRIBUTE_DIRECTORY
call fcn.004031a0
add esp, 4
mov dword [esp + 0x14], ebp
jmp 0x4100a3
mov ecx, dword [esp + 0x50]
sub ecx, dword [esp + 0x4c]
mov dword [esp + 0x18], ecx
fild dword [esp + 0x18]
test ecx, ecx
jge 0x41009f
fadd qword [0x47f2c0]
fstp qword [esp + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
fldz
fcomp qword [esp + 0x1c]
fnstsw ax
test ah, 0x44
jp 0x4100e7
push str._CopyFileToWM_originFileSize__0
call fcn.004031a0
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 0x410391
mov ecx, esi
call fcn.0040f8f0
test eax, eax
je 0x410104
push str._CopyFileToWM_hRapiResult___S_OK
call fcn.004031a0
add esp, 4
jmp 0x410373
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 0x410146
push str._CopyFileToWM_hPCFile__INVALID_HANDLE_VALUE
call fcn.004031a0
add esp, 4
mov ebp, 1
jmp 0x4102e4
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 0x410170
push str._CopyFileToWM_m_DynamicRapi.myCeCreateDirectory_success
jmp 0x410175
push str._CopyFileToWM_m_DynamicRapi.myCeCreateDirectory_fail
call fcn.004031a0
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 [0x49f4e4]
mov edx, dword [eax + 0xc]
mov ecx, 0x49f4e4
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.004034b0
mov eax, dword [esp + 0x18]
push eax
lea ecx, [esp + 0x20]
call fcn.00405450
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.004031a0
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 0x410211
push str._CopyFileToWM_INVALID_HANDLE_VALUE__hDest
jmp 0x410266
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 0x410261
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 0x41025a
cmp dword [esp + 0x24], 0
jne 0x410211
jmp 0x410276
push str._CopyFileToWM__m_DynamicRapi.myCeCeWriteFile_hDest_Buffer_dwNumRead_dwNumWritten_NULL_
jmp 0x410266
push str._CopyFileToWM_ReadFile___false
call fcn.004031a0
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.004034b0
mov eax, dword [esp + 0x18]
push eax
lea ecx, [esp + 0x20]
call fcn.00405450
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.004031a0
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.00401e10
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 [0x49f4e4]
mov edx, dword [eax + 0xc]
mov ecx, 0x49f4e4
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.004034b0
mov eax, dword [esp + 0x28]
push eax
lea ecx, [esp + 0x18]
call fcn.00405450
mov esi, dword [esp + 0x14]
push esi
call fcn.004031a0
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 0x410373
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 0x41039d
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 0x4103c4
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.00471f66
add esp, 0x127c
ret 8