Function at 0x4122f0
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x478746
mov eax, dword fs:[0]
push eax
mov eax, 0x149c
call fcn.004765d0
mov eax, dword [0x4a6eb0]
xor eax, esp
mov dword [esp + 0x1498], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4a6eb0]
xor eax, esp
push eax
lea eax, [esp + 0x14b0]
mov dword fs:[0], eax
mov esi, ecx
fldz
mov ecx, dword [esp + 0x14c0]
fstp qword [esp + 0x20]
lea eax, [esp + 0x2c]
push eax
mov ebx, 1
push ecx
mov dword [esp + 0x14c0], ebx
mov dword [esp + 0x1c], 0
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
lea edx, [esp + 0x14c0]
push edx
mov edi, eax
lea eax, [esp + 0x1c]
push str._CopyFileToWM2__src
push eax
call fcn.0040e690
mov eax, dword [eax]
push eax
mov byte [esp + 0x14c8], 2
call fcn.00403170
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
or ebp, 0xffffffff
add esp, 0x10
mov byte [esp + 0x14b8], bl
lea ecx, [eax + 0xc]
mov edx, ebp
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4123b3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x14c4]
push ecx
lea edx, [esp + 0x1c]
push str._CopyFileToWM2__dest
push edx
call fcn.0040e690
mov eax, dword [eax]
push eax
mov byte [esp + 0x14c8], 3
call fcn.00403170
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
add esp, 0x10
mov byte [esp + 0x14b8], 1
lea ecx, [eax + 0xc]
mov edx, ebp
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x412404
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp edi, ebp
jne 0x41246d
push str._CopyFileToWM2__INVALID_HANDLE_VALUE
call fcn.00403170
mov eax, dword [esp + 0x14c4]
add eax, 0xfffffff0
add esp, 4
mov byte [esp + 0x14b8], 0
lea ecx, [eax + 0xc]
mov edx, ebp
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41243f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x14c4]
add eax, 0xfffffff0
mov dword [esp + 0x14b8], ebp
lea ecx, [eax + 0xc]
lock xadd dword [ecx], ebp
dec ebp
test ebp, ebp
jg 0x412466
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, ebx
jmp 0x41278f
test byte [esp + 0x2c], 0x10
je 0x412487
push str._CopyFileToWM2__wfd.dwFileAttributes__FILE_ATTRIBUTE_DIRECTORY
call fcn.00403170
add esp, 4
mov dword [esp + 0x14], ebx
jmp 0x4124a5
mov ecx, dword [esp + 0x4c]
sub ecx, dword [esp + 0x48]
mov dword [esp + 0x20], ecx
fild dword [esp + 0x20]
test ecx, ecx
jge 0x4124a1
fadd qword [0x483a90]
fstp qword [esp + 0x20]
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
fldz
fcomp qword [esp + 0x20]
fnstsw ax
test ah, 0x44
jp 0x412522
push str._CopyFileToWM2__originFileSize__0
call fcn.00403170
mov eax, dword [esp + 0x14c4]
add eax, 0xfffffff0
add esp, 4
mov byte [esp + 0x14b8], 0
lea edx, [eax + 0xc]
mov ecx, ebp
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4124f0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x14c4]
add eax, 0xfffffff0
mov dword [esp + 0x14b8], ebp
lea ecx, [eax + 0xc]
lock xadd dword [ecx], ebp
dec ebp
test ebp, ebp
jg 0x412466
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, ebx
jmp 0x41278f
mov ecx, esi
call fcn.00412170
test eax, eax
je 0x412596
push str._CopyFileToWM2_hRapiResult___S_OK
call fcn.00403170
mov eax, dword [esp + 0x14c4]
add eax, 0xfffffff0
add esp, 4
mov byte [esp + 0x14b8], 0
lea ecx, [eax + 0xc]
mov edx, ebp
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x412564
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x14c4]
add eax, 0xfffffff0
mov dword [esp + 0x14b8], ebp
lea ecx, [eax + 0xc]
lock xadd dword [ecx], ebp
dec ebp
test ebp, ebp
jg 0x412466
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, ebx
jmp 0x41278f
mov edx, dword [esp + 0x14c4]
mov eax, dword [esi + 0x18c]
lea ecx, [esp + 0x27c]
push ecx
push edx
call eax
mov edi, eax
cmp edi, ebp
je 0x412608
push str._CopyFileToWM2_m_DynamicRapi.myCeFindFirstFile___INVALID_HANDLE_VALUE
call fcn.00403170
mov ecx, dword [esi + 0x1c8]
add esp, 4
push edi
call ecx
cmp dword [esp + 0x14c8], 0
jne 0x412608
push str._CopyFileToWM2_bWMFileExist__TRUE__bOverwrite__FALSE
call fcn.00403170
mov edx, dword [esi + 0x1e4]
add esp, 4
call edx
lea ecx, [esp + 0x14c0]
call fcn.00450df0
lea ecx, [esp + 0x14c4]
call fcn.00450df0
xor eax, eax
jmp 0x41278f
mov eax, dword [esp + 0x14c0]
push 0
push 0x80
push 3
push 0
push ebx
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x412642
push str._CopyFileToWM2_hPCFile__INVALID_HANDLE_VALUE
call fcn.00403170
add esp, 4
mov edi, ebx
jmp 0x41272c
mov ecx, dword [esi + 0x19c]
push 0
push str.Program_Files
call ecx
mov edx, dword [esi + 0x19c]
push 0
push str.Program_FilesNPS_Module
call edx
cmp eax, ebx
jne 0x41266b
push str._CopyFileToWM_m_DynamicRapi.myCeCreateDirectory_success
jmp 0x412670
push str._CopyFileToWM_m_DynamicRapi.myCeCreateDirectory_fail
call fcn.00403170
mov eax, dword [esp + 0x14c8]
mov ecx, dword [esi + 0x180]
add esp, 4
push 0
push 0x80
push 2
push 0
push 2
push 0x40000000
push eax
call ecx
mov edi, eax
cmp edi, 0xffffffff
jne 0x4126b1
push str._CopyFileToWM2_INVALID_HANDLE_VALUE__hDest
call fcn.00403170
mov dword [esp + 0x18], ebx
jmp 0x412715
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea edx, [esp + 0x20]
push edx
push 0x1000
lea eax, [esp + 0x4b8]
push eax
push ebp
call ebx
test eax, eax
je 0x412703
mov edx, dword [esp + 0x1c]
push 0
lea ecx, [esp + 0x2c]
push ecx
mov ecx, dword [esi + 0x184]
push edx
lea eax, [esp + 0x4b8]
push eax
push edi
call ecx
test eax, eax
je 0x4126fc
cmp dword [esp + 0x1c], 0
jne 0x4126b7
jmp 0x412718
push str._CopyFileToWM2__m_DynamicRapi.myCeCeWriteFile_hDest_Buffer_dwNumRead_dwNumWritten__tNULL_
jmp 0x412708
push str._CopyFileToWM2_ReadFile___FALSE
call fcn.00403170
mov dword [esp + 0x18], 1
add esp, 4
mov edx, dword [esi + 0x188]
push edi
call edx
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [esp + 0x14]
mov eax, dword [esi + 0x1e4]
call eax
mov eax, dword [esp + 0x14c0]
add eax, 0xfffffff0
mov byte [esp + 0x14b8], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41275f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x14c4]
add eax, 0xfffffff0
mov dword [esp + 0x14b8], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41278d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, edi
mov ecx, dword [esp + 0x14b0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x1498]
xor ecx, esp
call fcn.004764f6
add esp, 0x14a8
ret 0xc