Function at 0x5d5e70
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff960
push esi
push edi
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov esi, 0x6ad651
lea edi, [ebp - 0x264]
mov ecx, 0x82
rep movsd dword es:[edi], dword [esi]
mov esi, 0x6ad85a
lea edi, [ebp - 0x46c]
mov ecx, 0x82
rep movsd dword es:[edi], dword [esi]
cmp dword [0x6cb42c], 0
je 0x5d5f6d
mov word [ebp - 0x4e], 0x231
mov byte [ebp - 0x6a0], 0xa
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_lstrlenA_1
inc eax
push eax
mov edx, dword [ebp - 4]
push edx
lea ecx, [ebp - 0x69f]
push ecx
call fcn.005cc0fc
add esp, 0xc
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_lstrlenA_1
inc eax
push eax
mov edx, dword [ebp - 8]
push edx
lea ecx, [ebp - 0x68b]
push ecx
call fcn.005cc0fc
add esp, 0xc
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_lstrlenA_1
inc eax
push eax
mov edx, dword [ebp - 0xc]
push edx
lea ecx, [ebp - 0x677]
push ecx
call fcn.005cc0fc
add esp, 0xc
mov eax, dword [ebp + 0xc]
push eax
call sub.kernel32.dll_lstrlenA_1
inc eax
push eax
mov edx, dword [ebp + 0xc]
push edx
lea ecx, [ebp - 0x573]
push ecx
call fcn.005cc0fc
add esp, 0xc
lea ecx, [ebp - 0x52]
lea eax, [ebp - 0x6a0]
push 2
mov dx, word [ebp - 0x4e]
call fcn.005d85c4
mov word [ebp - 0x50], ax
push 2
lea eax, [ebp - 0x52]
push eax
lea edx, [ebp - 0x50]
push edx
call fcn.005cc0fc
movsx eax, word [ebp - 0x50]
add esp, 0xc
jmp 0x5d61cd
lea eax, [ebp - 0x264]
mov edx, dword [ebp - 0xc]
call fcn.005d7af8
lea eax, [ebp - 0x46c]
mov edx, dword [ebp + 0xc]
call fcn.005d7af8
mov eax, dword [ebp - 4]
call fcn.005d4220
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 8]
call fcn.005d4220
mov dword [ebp - 0x4c], eax
xor edx, edx
mov dword [ebp - 0x2c], edx
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x58], ecx
mov ecx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x48]
shl ecx, 3
mov edx, dword [ebp - 0x58]
shl eax, cl
shr eax, 0x18
mov byte [edx], al
inc dword [ebp - 0x2c]
inc dword [ebp - 0x58]
cmp dword [ebp - 0x2c], 3
jbe 0x5d5faa
xor eax, eax
lea edx, [ebp - 0x14]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x5c], edx
mov ecx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x4c]
shl ecx, 3
mov edx, dword [ebp - 0x5c]
shl eax, cl
shr eax, 0x18
mov byte [edx], al
inc dword [ebp - 0x2c]
inc dword [ebp - 0x5c]
cmp dword [ebp - 0x2c], 3
jbe 0x5d5fd4
push 0
push 0
push 3
push 0
push 3
push 0x80000000
lea ecx, [ebp - 0x264]
push ecx
call sub.kernel32.dll_CreateFileA_1
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0xffffffff
jne 0x5d6021
mov eax, 0xffffff37
jmp 0x5d61cd
lea eax, [ebp - 0x46c]
call fcn.005d8188
push 0
push 0
push 2
push 0
push 3
push 0x40000000
lea edx, [ebp - 0x46c]
push edx
call sub.kernel32.dll_CreateFileA_1
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0xffffffff
jne 0x5d6063
mov ecx, dword [ebp - 0x30]
push ecx
call sub.kernel32.dll_CloseHandle_1
mov eax, 0xffffff32
jmp 0x5d61cd
lea edx, [ebp - 0x38]
push edx
mov ecx, dword [ebp - 0x30]
push ecx
call sub.kernel32.dll_GetFileSize_1
mov dword [ebp - 0x38], eax
push 0x6aecca
push 1
push 1
push 0
call sub.kernel32.dll_CreateSemaphoreA
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x2c], 1
jmp 0x5d61a1
lea eax, [ebp - 0x40]
push 0
push eax
lea edx, [ebp - 0x20]
push 8
push edx
mov ecx, dword [ebp - 0x30]
push ecx
call sub.kernel32.dll_ReadFile_1
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
jne 0x5d60d5
mov eax, dword [ebp - 0x30]
push eax
call sub.kernel32.dll_CloseHandle_1
mov edx, dword [ebp - 0x34]
push edx
call sub.kernel32.dll_CloseHandle_1
mov ecx, dword [ebp - 0x10]
push ecx
call sub.kernel32.dll_CloseHandle_1
mov eax, 0xffffff34
jmp 0x5d61cd
push 0xffffffffffffffff
mov edx, dword [ebp - 0x10]
push edx
call sub.kernel32.dll_WaitForSingleObject
mov ecx, dword [ebp + 8]
lea edx, [ebp - 0x20]
push ecx
lea ecx, [ebp - 0x28]
lea eax, [ebp - 0x18]
call fcn.005cfb30
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x44], 0
je 0x5d612b
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x28]
push eax
lea eax, [ebp - 0x18]
lea edx, [ebp - 0x20]
call fcn.005cfb30
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x44], 0
je 0x5d612b
mov edx, dword [ebp + 8]
lea ecx, [ebp - 0x28]
push edx
lea edx, [ebp - 0x20]
lea eax, [ebp - 0x18]
call fcn.005cfb30
mov dword [ebp - 0x44], eax
push 0
push 1
mov ecx, dword [ebp - 0x10]
push ecx
call sub.kernel32.dll_ReleaseSemaphore
cmp dword [ebp - 0x44], 0
je 0x5d615e
mov eax, dword [ebp - 0x30]
push eax
call sub.kernel32.dll_CloseHandle_1
mov edx, dword [ebp - 0x34]
push edx
call sub.kernel32.dll_CloseHandle_1
mov ecx, dword [ebp - 0x10]
push ecx
call sub.kernel32.dll_CloseHandle_1
mov eax, dword [ebp - 0x44]
jmp 0x5d61cd
lea edx, [ebp - 0x40]
push 0
push edx
lea ecx, [ebp - 0x28]
push 8
push ecx
mov eax, dword [ebp - 0x34]
push eax
call sub.kernel32.dll_WriteFile_1
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
jne 0x5d619e
mov edx, dword [ebp - 0x30]
push edx
call sub.kernel32.dll_CloseHandle_1
mov ecx, dword [ebp - 0x34]
push ecx
call sub.kernel32.dll_CloseHandle_1
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_CloseHandle_1
mov eax, 0xffffff33
jmp 0x5d61cd
inc dword [ebp - 0x2c]
mov edx, dword [ebp - 0x38]
shr edx, 3
cmp edx, dword [ebp - 0x2c]
jae 0x5d6092
mov ecx, dword [ebp - 0x30]
push ecx
call sub.kernel32.dll_CloseHandle_1
mov eax, dword [ebp - 0x34]
push eax
call sub.kernel32.dll_CloseHandle_1
mov edx, dword [ebp - 0x10]
push edx
call sub.kernel32.dll_CloseHandle_1
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8