Function at 0x4a69cd94
Capabilities:
Read file via mapping
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffd30
push ebx
push esi
push edi
xor eax, eax
mov dword [ebp - 0x2d0], eax
mov dword [ebp - 0x2cc], eax
mov dword [ebp - 0x2c8], eax
mov dword [ebp - 0x2c4], eax
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x4a69d2a5
push dword fs:[eax]
mov dword fs:[eax], esp
call sub.kernel32.dll_GetLastError_2
mov esi, eax
xor eax, eax
mov dword [ebp - 8], eax
lea edx, [ebp - 0x3c]
mov eax, fcn.4a69cd94
call fcn.4a6963b0
test al, al
je 0x4a69d279
xor edi, edi
lea eax, [ebp - 0x2c0]
mov edx, 0x150
call fcn.4a60df34
cmp byte [0x4a6cc06d], 0
je 0x4a69d059
lea eax, [ebp - 0x14c]
mov edx, 0x104
call fcn.4a60df34
call fcn.4a69cc04
mov dword [ebp - 0x144], eax
call sub.kernel32.dll_GetCurrentProcessId
mov dword [ebp - 0x14c], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x17c], eax
call sub.kernel32.dll_GetCurrentProcessId
push eax
lea eax, [ebp - 0x184]
push eax
push 0
lea eax, [ebp - 0x2c4]
mov edx, dword [ebp + 8]
mov ecx, 0
call fcn.4a607c04
mov edx, dword [ebp - 0x2c4]
mov ecx, dword [ebp - 0x144]
mov al, 1
call fcn.4a69b090
mov ebx, eax
test bl, bl
je 0x4a69d201
call fcn.4a69bb5c
lea eax, [ebp - 0x2c8]
mov edx, dword [ebp + 8]
mov ecx, 0
call fcn.4a607c04
mov eax, dword [ebp - 0x2c8]
lea ecx, [ebp - 0x14]
lea edx, [ebp - 4]
call fcn.4a69bacc
lea eax, [ebp - 0x164]
mov edx, 0x18
call fcn.4a60df34
lea eax, [ebp - 0x48]
mov edx, 0xc
call fcn.4a60df34
xor eax, eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x148], eax
call fcn.4a69a9a4
mov dword [ebp - 0x140], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x13c], eax
cmp dword [ebp + 0x10], 0xf0
jbe 0x4a69cf9c
lea eax, [ebp - 0x170]
mov edx, 0xc
call fcn.4a60df34
mov dword [ebp - 0x164], 0x18
push 0
mov eax, dword [ebp + 0x10]
push eax
push 0
push 4
push 0
push 0xffffffffffffffff
call sub.kernel32.dll_CreateFileMappingW
mov dword [ebp - 0x160], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x158], eax
push 0
push 0
push 0
push 0xf001f
mov eax, dword [ebp - 0x160]
push eax
call sub.kernel32.dll_MapViewOfFile
mov dword [ebp - 0x154], eax
cmp dword [ebp - 0x154], 0
je 0x4a69cf75
mov edx, dword [ebp - 0x154]
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
call fcn.4a604a4c
mov eax, dword [ebp - 0x154]
push eax
call sub.kernel32.dll_UnmapViewOfFile
xor eax, eax
mov dword [ebp - 0x154], eax
mov dword [ebp - 0x170], 0xc
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x16c], eax
lea eax, [ebp - 0x164]
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x170]
mov dword [ebp - 0x24], eax
jmp 0x4a69cfb7
lea edx, [ebp - 0x138]
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
call fcn.4a604a4c
xor eax, eax
mov dword [ebp - 0x20], eax
xor eax, eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x18], 0x104
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14c]
push eax
push 0
mov eax, dword [ebp - 0x24]
push eax
mov eax, dword [ebp - 0x20]
push eax
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0xc]
push eax
call dword [0x4a6d5264]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x4a69cff7
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_CloseHandle_1
mov eax, dword [ebp - 0x160]
test eax, eax
je 0x4a69d007
push eax
call sub.kernel32.dll_CloseHandle_1
cmp dword [ebp - 0x14c], 0
je 0x4a69d01d
call sub.kernel32.dll_GetCurrentProcessId
cmp eax, dword [ebp - 0x14c]
jne 0x4a69d021
xor eax, eax
jmp 0x4a69d023
mov al, 1
neg al
sbb eax, eax
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x4a69d201
cmp dword [ebp + 0x18], 0
je 0x4a69d201
mov eax, dword [ebp - 0x14c]
dec eax
push eax
push 0
push 0x100000
call sub.kernel32.dll_OpenProcess
mov edi, eax
jmp 0x4a69d201
push 0
lea eax, [ebp - 0x2cc]
mov edx, dword [ebp + 8]
mov ecx, 0
call fcn.4a607c04
mov eax, dword [ebp - 0x2cc]
lea ecx, [ebp - 0x28]
lea edx, [ebp - 0x2c0]
call fcn.4a69b504
mov ebx, eax
test bl, bl
je 0x4a69d201
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x17c], eax
push 0
lea eax, [ebp - 0x184]
push eax
push 0
lea eax, [ebp - 0x2d0]
mov edx, dword [ebp + 8]
mov ecx, 0
call fcn.4a607c04
mov edx, dword [ebp - 0x2d0]
mov ecx, dword [ebp - 0x190]
mov al, 1
call fcn.4a69b090
mov ebx, eax
test bl, bl
je 0x4a69d1ef
mov eax, dword [ebp - 0x2bc]
push eax
push 0
push 0x100040
call sub.kernel32.dll_OpenProcess
mov edi, eax
test edi, edi
je 0x4a69d1ef
push 2
push 0
push 0
lea eax, [ebp - 0x2b4]
push eax
call sub.kernel32.dll_GetCurrentProcess
push eax
mov eax, dword [ebp - 0x2b4]
push eax
push edi
call sub.kernel32.dll_DuplicateHandle
test eax, eax
je 0x4a69d1ef
call fcn.4a69a9a4
mov dword [ebp - 0x2c], eax
push 0
lea eax, [ebp - 0x1c]
push eax
push 4
lea eax, [ebp + 0x10]
push eax
mov eax, dword [ebp - 0x2b4]
push eax
call sub.kernel32.dll_WriteFile_1
test eax, eax
je 0x4a69d1d6
cmp dword [ebp - 0x1c], 4
jne 0x4a69d1d6
push 0
lea eax, [ebp - 0x1c]
push eax
push 4
lea eax, [ebp - 0x190]
push eax
mov eax, dword [ebp - 0x2b4]
push eax
call sub.kernel32.dll_WriteFile_1
test eax, eax
je 0x4a69d1d6
cmp dword [ebp - 0x1c], 4
jne 0x4a69d1d6
push 0
lea eax, [ebp - 0x1c]
push eax
push 4
lea eax, [ebp - 0x2c]
push eax
mov eax, dword [ebp - 0x2b4]
push eax
call sub.kernel32.dll_WriteFile_1
test eax, eax
je 0x4a69d1d6
cmp dword [ebp - 0x1c], 4
jne 0x4a69d1d6
push 0
lea eax, [ebp - 0x1c]
push eax
push 4
lea eax, [ebp + 0x18]
push eax
mov eax, dword [ebp - 0x2b4]
push eax
call sub.kernel32.dll_WriteFile_1
test eax, eax
je 0x4a69d1d6
cmp dword [ebp - 0x1c], 4
jne 0x4a69d1d6
push 0
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp - 0x2b4]
push eax
call sub.kernel32.dll_WriteFile_1
test eax, eax
je 0x4a69d1d6
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp + 0x10]
je 0x4a69d1da
xor eax, eax
jmp 0x4a69d1dc
mov al, 1
neg al
sbb eax, eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x2b4]
push eax
call sub.kernel32.dll_CloseHandle_1
mov eax, dword [ebp - 0x28]
push eax
call sub.kernel32.dll_ReleaseMutex
mov eax, dword [ebp - 0x28]
push eax
call sub.kernel32.dll_CloseHandle_1
test edi, edi
je 0x4a69d265
cmp dword [ebp - 8], 0
je 0x4a69d25f
cmp dword [ebp + 0x18], 0
je 0x4a69d25f
push ebp
mov ecx, dword [0x4a6cc070]
mov edx, edi
mov eax, dword [ebp - 0x178]
call fcn.4a69cb74
pop ecx
test al, al
je 0x4a69d25a
push ebp
mov ecx, dword [ebp + 0x1c]
mov edx, edi
mov eax, dword [ebp - 0x174]
call fcn.4a69cb74
pop ecx
test al, al
je 0x4a69d253
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp - 0x180]
mov ecx, dword [ebp + 0x18]
call fcn.4a604a4c
jmp 0x4a69d25f
xor eax, eax
mov dword [ebp - 8], eax
jmp 0x4a69d25f
xor eax, eax
mov dword [ebp - 8], eax
push edi
call sub.kernel32.dll_CloseHandle_1
test bl, bl
je 0x4a69d274
lea eax, [ebp - 0x184]
call fcn.4a69ae90
xor eax, eax
mov dword [ebp - 0x30], eax
push esi
call sub.kernel32.dll_SetLastError
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4a69d2ac
lea eax, [ebp - 0x2d0]
mov edx, 4
call fcn.4a607618
lea eax, [ebp - 4]
call fcn.4a6075ac
ret