Function at 0x40fa70
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x4751a6
mov eax, dword fs:[0]
push eax
mov eax, 0x149c
call fcn.00472040
mov eax, dword [0x49ef38]
xor eax, esp
mov dword [esp + 0x1498], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x49ef38]
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.0040c530
mov eax, dword [eax]
push eax
mov byte [esp + 0x14c8], 2
call fcn.004031a0
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 0x40fb33
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.0040c530
mov eax, dword [eax]
push eax
mov byte [esp + 0x14c8], 3
call fcn.004031a0
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 0x40fb84
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp edi, ebp
jne 0x40fbed
push str._CopyFileToWM2__INVALID_HANDLE_VALUE
call fcn.004031a0
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 0x40fbbf
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 0x40fbe6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, ebx
jmp 0x40ff0f
test byte [esp + 0x2c], 0x10
je 0x40fc07
push str._CopyFileToWM2__wfd.dwFileAttributes__FILE_ATTRIBUTE_DIRECTORY
call fcn.004031a0
add esp, 4
mov dword [esp + 0x14], ebx
jmp 0x40fc25
mov ecx, dword [esp + 0x4c]
sub ecx, dword [esp + 0x48]
mov dword [esp + 0x20], ecx
fild dword [esp + 0x20]
test ecx, ecx
jge 0x40fc21
fadd qword [0x47f2c0]
fstp qword [esp + 0x20]
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
fldz
fcomp qword [esp + 0x20]
fnstsw ax
test ah, 0x44
jp 0x40fca2
push str._CopyFileToWM2__originFileSize__0
call fcn.004031a0
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 0x40fc70
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 0x40fbe6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, ebx
jmp 0x40ff0f
mov ecx, esi
call fcn.0040f8f0
test eax, eax
je 0x40fd16
push str._CopyFileToWM2_hRapiResult___S_OK
call fcn.004031a0
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 0x40fce4
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 0x40fbe6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, ebx
jmp 0x40ff0f
mov edx, dword [esp + 0x14c4]
mov eax, dword [esi + 0x158]
lea ecx, [esp + 0x27c]
push ecx
push edx
call eax
mov edi, eax
cmp edi, ebp
je 0x40fd88
push str._CopyFileToWM2_m_DynamicRapi.myCeFindFirstFile___INVALID_HANDLE_VALUE
call fcn.004031a0
mov ecx, dword [esi + 0x194]
add esp, 4
push edi
call ecx
cmp dword [esp + 0x14c8], 0
jne 0x40fd88
push str._CopyFileToWM2_bWMFileExist__TRUE__bOverwrite__FALSE
call fcn.004031a0
mov edx, dword [esi + 0x1b0]
add esp, 4
call edx
lea ecx, [esp + 0x14c0]
call fcn.00401e10
lea ecx, [esp + 0x14c4]
call fcn.00401e10
xor eax, eax
jmp 0x40ff0f
mov eax, dword [esp + 0x14c0]
push 0
push 0x80
push 3
push 0
push ebx
push SysReAllocStringLen
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x40fdc2
push str._CopyFileToWM2_hPCFile__INVALID_HANDLE_VALUE
call fcn.004031a0
add esp, 4
mov edi, ebx
jmp 0x40feac
mov ecx, dword [esi + 0x168]
push 0
push str.Program_Files
call ecx
mov edx, dword [esi + 0x168]
push 0
push str.Program_FilesNPS_Module
call edx
cmp eax, ebx
jne 0x40fdeb
push str._CopyFileToWM_m_DynamicRapi.myCeCreateDirectory_success
jmp 0x40fdf0
push str._CopyFileToWM_m_DynamicRapi.myCeCreateDirectory_fail
call fcn.004031a0
mov eax, dword [esp + 0x14c8]
mov ecx, dword [esi + 0x14c]
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 0x40fe31
push str._CopyFileToWM2_INVALID_HANDLE_VALUE__hDest
call fcn.004031a0
mov dword [esp + 0x18], ebx
jmp 0x40fe95
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 0x40fe83
mov edx, dword [esp + 0x1c]
push 0
lea ecx, [esp + 0x2c]
push ecx
mov ecx, dword [esi + 0x150]
push edx
lea eax, [esp + 0x4b8]
push eax
push edi
call ecx
test eax, eax
je 0x40fe7c
cmp dword [esp + 0x1c], 0
jne 0x40fe37
jmp 0x40fe98
push str._CopyFileToWM2__m_DynamicRapi.myCeCeWriteFile_hDest_Buffer_dwNumRead_dwNumWritten__tNULL_
jmp 0x40fe88
push str._CopyFileToWM2_ReadFile___FALSE
call fcn.004031a0
mov dword [esp + 0x18], 1
add esp, 4
mov edx, dword [esi + 0x154]
push edi
call edx
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [esp + 0x14]
mov eax, dword [esi + 0x1b0]
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 0x40fedf
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 0x40ff0d
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.00471f66
add esp, 0x14a8
ret 0xc