Function at 0x403870
Capabilities:
Move file
Read file on windows
Resolve function by parsing pe exports
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x28c
mov eax, dword [0x48e050]
xor eax, esp
mov dword [esp + 0x288], eax
push ebx
push esi
push edi
mov ebx, ecx
push 0x21a
xor esi, esi
lea ecx, [esp + 0x76]
xor eax, eax
push esi
push ecx
mov dword [esp + 0x34], ebx
mov word [esp + 0x7c], ax
call fcn.004416b0
mov eax, dword [ebx + 0x248]
shr eax, 1
mov dword [esp + 0x38], esi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x30], eax
mov dword [esp + 0x3c], esi
lea eax, [ebx + 0x270]
add esp, 0xc
lea esi, [ebx + 0x22c]
mov ecx, 0xb
lea edi, [esp + 0x44]
mov dword [esp + 0x34], esi
push eax
rep movsd dword es:[edi], dword [esi]
mov dword [esp + 0x3c], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [esp + 0x24]
mov edx, dword [ebx + 0x248]
push esi
push edx
push str.CleanData__d____d
call fcn.00404c20
add esp, 0xc
lea eax, [ebx + 0x1c]
push str._Cleaned
push eax
push 0x457c24
lea edx, [esp + 0x7c]
mov dword [esp + 0x28], eax
call fcn.004047d0
mov ecx, dword [ebx + 0x268]
sub ecx, dword [ebx + 0x264]
mov eax, dword [ebx + 0x248]
lea edi, [ebx + 0x258]
sub eax, esi
sar ecx, 2
add esp, 0xc
mov dword [esp + 0x60], eax
mov dword [esp + 0x6c], esi
test ecx, ecx
jbe 0x4039e7
mov edx, dword [edi + 0x10]
sub edx, dword [edi + 0xc]
xor esi, esi
test edx, 0xfffffffc
jle 0x4039aa
mov eax, dword [edi + 0x10]
sub eax, dword [edi + 0xc]
sar eax, 2
cmp esi, eax
jb 0x403973
call fcn.0043f37f
mov ecx, dword [edi + 0xc]
cmp dword [ecx + esi*4], 0
je 0x40399c
mov edx, dword [edi + 0x10]
sub edx, ecx
sar edx, 2
cmp esi, edx
jb 0x40398d
call fcn.0043f37f
mov eax, dword [edi + 0xc]
mov ecx, dword [eax + esi*4]
push ecx
call fcn.0043e85d
add esp, 4
mov edx, dword [edi + 0x10]
sub edx, dword [edi + 0xc]
inc esi
sar edx, 2
cmp esi, edx
jl 0x403961
mov eax, dword [edi + 0x10]
mov dword [esp + 0x14], eax
cmp dword [edi + 0xc], eax
jbe 0x4039bb
call fcn.0043f37f
mov esi, dword [edi + 0xc]
mov ebx, dword [edi]
cmp esi, dword [edi + 0x10]
jbe 0x4039ca
call fcn.0043f37f
mov ecx, dword [esp + 0x14]
mov eax, dword [edi]
push ecx
push ebx
push esi
push eax
lea ebx, [esp + 0x4c]
mov esi, edi
call fcn.00404050
mov ebx, dword [esp + 0x28]
mov esi, dword [esp + 0x24]
mov edx, dword [esp + 0x1c]
push 0
push 0x80
push 3
push 0
push 1
push bind
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esp + 0x18], eax
cmp eax, 0xffffffff
jne 0x403a3d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [esp + 0x20]
push eax
push str.CreateFile__ws_fail__d_n
call fcn.00404c20
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x288]
xor ecx, esp
call fcn.0043e4c7
mov esp, ebp
pop ebp
ret
push 0
push 0x80
push 4
push 0
push 1
push 0x40000000
lea ecx, [esp + 0x88]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edx, dword [ebx + 0x14]
imul edx, esi
add edx, dword [ebx + 0x240]
push 0
push 0
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x20]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x403a9b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.SetFilePointer_fail__d_n
call fcn.00404c20
add esp, 8
jmp 0x403be7
mov eax, dword [esp + 0x20]
push 0
lea ecx, [esp + 0x14]
push ecx
push 0x2c
lea edx, [esp + 0x50]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x403bce
cmp dword [esp + 0x10], 0x2c
jne 0x403bce
mov ecx, dword [ebx + 0x248]
sub ecx, esi
mov dword [esp + 0x14], 0
test ecx, ecx
jle 0x403b83
nop
mov edx, dword [ebx + 0x14]
push edx
call fcn.0043e793
mov esi, eax
add esp, 4
test esi, esi
je 0x403be7
mov ecx, dword [ebx + 0x14]
mov edx, dword [esp + 0x18]
push 0
lea eax, [esp + 0x30]
push eax
push ecx
push esi
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x403bb5
mov eax, dword [ebx + 0x14]
cmp dword [esp + 0x2c], eax
jne 0x403bb5
mov edx, dword [esp + 0x20]
push 0
lea ecx, [esp + 0x14]
push ecx
push eax
push esi
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x403b9c
mov eax, dword [esp + 0x10]
cmp eax, dword [ebx + 0x14]
jne 0x403b9c
cmp dword [ebx + 0x228], 0
je 0x403b5f
lea ebx, [esp + 0x3c]
mov dword [esp + 0x3c], esi
call fcn.00403e10
mov ebx, dword [esp + 0x28]
jmp 0x403b68
push esi
call fcn.0043e85d
add esp, 4
mov eax, dword [esp + 0x14]
mov ecx, dword [ebx + 0x248]
sub ecx, dword [esp + 0x24]
inc eax
cmp eax, ecx
mov dword [esp + 0x14], eax
jl 0x403ae0
mov edi, dword [esp + 0x34]
mov ecx, 0xb
lea esi, [esp + 0x44]
rep movsd dword es:[edi], dword [esi]
mov dword [esp + 0x30], 1
jmp 0x403be7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WriteFile_Entry_fail__d_n
call fcn.00404c20
push esi
call fcn.0043e85d
jmp 0x403be4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ReadFile_Entry_fail__d_n
call fcn.00404c20
push esi
call fcn.0043e85d
jmp 0x403be4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea edx, [esp + 0x74]
push edx
push str.WriteFile__ws_fail__d_n
call fcn.00404c20
add esp, 0xc
mov eax, dword [esp + 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call esi
mov eax, dword [esp + 0x20]
cmp eax, 0xffffffff
je 0x403c00
push eax
call esi
mov esi, dword [esp + 0x30]
test esi, esi
je 0x403c1a
mov ecx, dword [esp + 0x1c]
push 1
push ecx
lea edx, [esp + 0x78]
push edx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov eax, dword [esp + 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [esp + 0x294]
pop edi
mov eax, esi
pop esi
pop ebx
xor ecx, esp
call fcn.0043e4c7
mov esp, ebp
pop ebp
ret