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

Disassembly:
push 0xffffffffffffffff
push 0x4787bc
mov eax, dword fs:[0]
push eax
mov eax, 0x1270
call fcn.004765d0
mov eax, dword [0x4a6eb0]
xor eax, esp
mov dword [esp + 0x126c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4a6eb0]
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.0040e690
mov eax, dword [eax]
push eax
mov byte [esp + 0x129c], 2
call fcn.00403170
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 0x412884
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.0040e690
mov eax, dword [eax]
push eax
mov byte [esp + 0x129c], 3
call fcn.00403170
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 0x4128d5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp ebx, edi
jne 0x4128eb
push str._CopyFileToWM_INVALID_HANDLE_VALUE__hFind
call fcn.00403170
add esp, 4
jmp 0x412bf3
test byte [esp + 0x30], 0x10
je 0x412905
push str._CopyFileToWM_wfd.dwFileAttributes__FILE_ATTRIBUTE_DIRECTORY
call fcn.00403170
add esp, 4
mov dword [esp + 0x14], ebp
jmp 0x412923
mov ecx, dword [esp + 0x50]
sub ecx, dword [esp + 0x4c]
mov dword [esp + 0x18], ecx
fild dword [esp + 0x18]
test ecx, ecx
jge 0x41291f
fadd qword [0x483a90]
fstp qword [esp + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
fldz
fcomp qword [esp + 0x1c]
fnstsw ax
test ah, 0x44
jp 0x412967
push str._CopyFileToWM_originFileSize__0
call fcn.00403170
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 0x412c11
mov ecx, esi
call fcn.00412170
test eax, eax
je 0x412984
push str._CopyFileToWM_hRapiResult___S_OK
call fcn.00403170
add esp, 4
jmp 0x412bf3
mov ecx, dword [esp + 0x1294]
push 0
push 0x80
push 3
push 0
push ebp
push SysReAllocString
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, dword [sym.imp.KERNEL32.dll_FormatMessageW]
mov ebp, eax
cmp ebp, edi
jne 0x4129c6
push str._CopyFileToWM_hPCFile__INVALID_HANDLE_VALUE
call fcn.00403170
add esp, 4
mov ebp, 1
jmp 0x412b64
mov edx, dword [esi + 0x19c]
push 0
push str.Program_Files
call edx
mov eax, dword [esi + 0x19c]
push 0
push str.Program_FilesNPS_Module
call eax
cmp eax, 1
jne 0x4129f0
push str._CopyFileToWM_m_DynamicRapi.myCeCreateDirectory_success
jmp 0x4129f5
push str._CopyFileToWM_m_DynamicRapi.myCeCreateDirectory_fail
call fcn.00403170
mov edx, dword [esi + 0x1c0]
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 [0x4a743c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a743c
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.00403480
mov eax, dword [esp + 0x18]
push eax
lea ecx, [esp + 0x20]
call fcn.00405430
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.00403170
mov edx, dword [esp + 0x129c]
mov eax, dword [esi + 0x180]
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 0x412a91
push str._CopyFileToWM_INVALID_HANDLE_VALUE__hDest
jmp 0x412ae6
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 0x412ae1
mov ecx, dword [esp + 0x24]
push 0
lea eax, [esp + 0x30]
push eax
mov eax, dword [esi + 0x184]
push ecx
lea edx, [esp + 0x28c]
push edx
push edi
call eax
test eax, eax
je 0x412ada
cmp dword [esp + 0x24], 0
jne 0x412a91
jmp 0x412af6
push str._CopyFileToWM__m_DynamicRapi.myCeCeWriteFile_hDest_Buffer_dwNumRead_dwNumWritten_NULL_
jmp 0x412ae6
push str._CopyFileToWM_ReadFile___false
call fcn.00403170
add esp, 4
mov dword [esp + 0x14], 1
mov edx, dword [esi + 0x1c0]
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.00403480
mov eax, dword [esp + 0x18]
push eax
lea ecx, [esp + 0x20]
call fcn.00405430
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.00403170
mov edx, dword [esi + 0x188]
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.00450df0
mov ebp, dword [esp + 0x14]
or edi, 0xffffffff
mov eax, dword [esi + 0x1e4]
call eax
mov edx, dword [esi + 0x1c0]
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 [0x4a743c]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a743c
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.00403480
mov eax, dword [esp + 0x28]
push eax
lea ecx, [esp + 0x18]
call fcn.00405430
mov esi, dword [esp + 0x14]
push esi
call fcn.00403170
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 0x412bf3
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 0x412c1d
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 0x412c44
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.004764f6
add esp, 0x127c
ret 8