Function at 0x6e7cd8
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff88
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.0040573c
xor eax, eax
push ebp
push 0x6e801d
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0x10], 1
mov byte [ebp - 0x29], 0
mov dword [ebp - 0x28], 1
push 0
push 0x40000000
push 3
push 0
push 3
push 0xc0000000
mov eax, dword [ebp - 4]
call fcn.0040574c
push eax
call sub.kernel32.dll_CreateFileA_1
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x44], 0xffffffff
je 0x6e7d8c
push 0
lea eax, [ebp - 0x1c]
push eax
push 5
lea eax, [ebp - 0x49]
push eax
push 0x10
push 0x8908ec
push 0x8000e004
mov eax, dword [ebp - 0x44]
push eax
call sub.kernel32.dll_DeviceIoControl
test eax, eax
je 0x6e7d83
cmp dword [ebp - 0x1c], 5
jne 0x6e7d7a
lea eax, [ebp - 0x49]
cmp dword [eax], 0
je 0x6e7d71
mov byte [ebp - 0x29], 1
jmp 0x6e7da7
mov dword [ebp - 0x10], 8
jmp 0x6e7d93
mov dword [ebp - 0x10], 7
jmp 0x6e7d93
mov dword [ebp - 0x10], 6
jmp 0x6e7d93
mov dword [ebp - 0x10], 2
push 0x64
call sub.kernel32.dll_Sleep_1
inc dword [ebp - 0x28]
cmp dword [ebp - 0x28], 6
jne 0x6e7d0f
cmp byte [ebp - 0x29], 0
je 0x6e8007
lea eax, [ebp - 0x49]
mov eax, dword [eax]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
push eax
push 0x40
call sub.kernel32.dll_LocalAlloc_2
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
je 0x6e7ff7
push 0
push 0
push 0
push 0
call sub.kernel32.dll_CreateEventA
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
je 0x6e7fe5
xor eax, eax
mov dword [ebp - 0x64], eax
xor eax, eax
mov dword [ebp - 0x60], eax
xor eax, eax
mov dword [ebp - 0x5c], eax
xor eax, eax
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x54], eax
lea eax, [ebp - 0x64]
push eax
push 0
mov eax, dword [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x30]
push eax
mov eax, dword [ebp - 0x44]
push eax
call sub.kernel32.dll_ReadFile_2
test eax, eax
je 0x6e7e26
mov byte [ebp - 0x29], 1
jmp 0x6e7e34
call sub.kernel32.dll_GetLastError_1
cmp eax, 0x3e5
sete byte [ebp - 0x29]
cmp byte [ebp - 0x29], 0
je 0x6e7fd3
push 0
push 0
push 0
push 0
call sub.kernel32.dll_CreateEventA
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0
je 0x6e7fca
xor eax, eax
mov dword [ebp - 0x78], eax
xor eax, eax
mov dword [ebp - 0x74], eax
xor eax, eax
mov dword [ebp - 0x70], eax
xor eax, eax
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x68], eax
lea eax, [ebp - 0x78]
push eax
push 0
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp - 0x44]
push eax
call sub.kernel32.dll_WriteFile_2
test eax, eax
je 0x6e7e93
mov byte [ebp - 0x29], 1
jmp 0x6e7eae
call sub.kernel32.dll_GetLastError_1
cmp eax, 0x3e5
sete byte [ebp - 0x29]
cmp byte [ebp - 0x29], 0
je 0x6e7eae
push 5
call sub.kernel32.dll_Sleep_1
cmp byte [ebp - 0x29], 0
je 0x6e7fb8
push 0x64
mov eax, dword [ebp - 0x68]
push eax
call sub.kernel32.dll_WaitForSingleObject
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x6e7ed9
cmp dword [ebp - 0x14], 0x80
jne 0x6e7faf
push 1
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x78]
push eax
mov eax, dword [ebp - 0x44]
push eax
call sub.kernel32.dll_GetOverlappedResult
test eax, eax
je 0x6e7fa6
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0xc]
jne 0x6e7f9d
push 0x64
mov eax, dword [ebp - 0x54]
push eax
call sub.kernel32.dll_WaitForSingleObject
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x6e7f1d
cmp dword [ebp - 0x14], 0x80
jne 0x6e7f94
push 1
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x64]
push eax
mov eax, dword [ebp - 0x44]
push eax
call sub.kernel32.dll_GetOverlappedResult
test eax, eax
je 0x6e7f8b
cmp dword [ebp - 0x20], 0
je 0x6e7f82
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp + 8]
ja 0x6e7f82
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x20]
dec eax
test eax, eax
jb 0x6e7f7b
inc eax
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x14], 0
mov eax, dword [ebp - 0x34]
mov edx, dword [ebp - 0x14]
mov al, byte [eax + edx]
mov edx, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x14]
mov byte [edx + ecx], al
inc dword [ebp - 0x14]
dec dword [ebp - 0x50]
jne 0x6e7f61
xor eax, eax
mov dword [ebp - 0x10], eax
jmp 0x6e7fbf
mov dword [ebp - 0x10], 0xf
jmp 0x6e7fbf
mov dword [ebp - 0x10], 0xd
jmp 0x6e7fbf
mov dword [ebp - 0x10], 0xb
jmp 0x6e7fbf
mov dword [ebp - 0x10], 0x10
jmp 0x6e7fbf
mov dword [ebp - 0x10], 0xe
jmp 0x6e7fbf
mov dword [ebp - 0x10], 0xc
jmp 0x6e7fbf
mov dword [ebp - 0x10], 4
mov eax, dword [ebp - 0x40]
push eax
call sub.kernel32.dll_CloseHandle_1
jmp 0x6e7fda
mov dword [ebp - 0x10], 0xa
jmp 0x6e7fda
mov dword [ebp - 0x10], 9
mov eax, dword [ebp - 0x3c]
push eax
call sub.kernel32.dll_CloseHandle_1
jmp 0x6e7fec
mov dword [ebp - 0x10], 3
mov eax, dword [ebp - 0x30]
push eax
call sub.kernel32.dll_LocalFree_1
jmp 0x6e7ffe
mov dword [ebp - 0x10], 5
mov eax, dword [ebp - 0x44]
push eax
call sub.kernel32.dll_CloseHandle_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x6e8024
lea eax, [ebp - 4]
call fcn.0040528c
ret