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

Disassembly:
push esi
push edi
add esp, 0xfffffc4c
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
mov esi, 0x6ab9b7
lea edi, [esp + 0x84]
mov ecx, 0x40
rep movsd dword es:[edi], dword [esi]
mov esi, 0x6abab7
lea edi, [esp + 0x184]
mov ecx, 0x40
rep movsd dword es:[edi], dword [esi]
cmp dword [0x6cb42c], 0
je 0x5d2cd6
mov word [esp + 0x78], 0x12d
mov byte [esp + 0x284], 0x18
mov eax, dword [esp]
push eax
call sub.kernel32.dll_lstrlenA_1
inc eax
push eax
mov edx, dword [esp + 4]
push edx
lea ecx, [esp + 0x28d]
push ecx
call fcn.005cc0fc
add esp, 0xc
mov eax, dword [esp + 4]
push eax
call sub.kernel32.dll_lstrlenA_1
inc eax
push eax
mov edx, dword [esp + 8]
push edx
lea ecx, [esp + 0x2a1]
push ecx
call fcn.005cc0fc
add esp, 0xc
mov eax, dword [esp + 8]
push eax
call sub.kernel32.dll_lstrlenA_1
inc eax
push eax
mov edx, dword [esp + 0xc]
push edx
lea ecx, [esp + 0x2b5]
push ecx
call fcn.005cc0fc
add esp, 0xc
push 2
lea ecx, [esp + 0x80]
lea eax, [esp + 0x288]
mov dx, word [esp + 0x7c]
call fcn.005d85c4
mov word [esp + 0x7a], ax
push 2
lea eax, [esp + 0x80]
push eax
lea edx, [esp + 0x82]
push edx
call fcn.005cc0fc
add esp, 0xc
movsx eax, word [esp + 0x7a]
jmp 0x5d36cc
mov eax, dword [esp]
call fcn.005d4220
mov dword [esp + 0x34], eax
mov eax, dword [esp + 4]
call fcn.005d4220
mov dword [esp + 0x38], eax
xor edx, edx
mov dword [esp + 0x3c], edx
lea ecx, [esp + 0xc]
mov dword [esp + 0x80], ecx
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x34]
shl ecx, 3
mov edx, dword [esp + 0x80]
shl eax, cl
shr eax, 0x18
mov byte [edx], al
inc dword [esp + 0x3c]
inc dword [esp + 0x80]
cmp dword [esp + 0x3c], 3
jle 0x5d2d00
xor eax, eax
lea edx, [esp + 0x10]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x80], edx
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x38]
shl ecx, 3
mov edx, dword [esp + 0x80]
shl eax, cl
shr eax, 0x18
mov byte [edx], al
inc dword [esp + 0x3c]
inc dword [esp + 0x80]
cmp dword [esp + 0x3c], 3
jle 0x5d2d3c
mov ecx, dword [esp + 8]
push ecx
call sub.kernel32.dll_lstrlenA_1
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x40]
inc eax
push eax
push 2
call sub.kernel32.dll_GlobalAlloc
mov dword [esp + 0x48], eax
mov edx, dword [esp + 0x48]
push edx
call sub.kernel32.dll_GlobalLock
mov dword [esp + 0x4c], eax
mov ecx, dword [esp + 8]
push ecx
mov eax, dword [esp + 0x50]
push eax
call sub.kernel32.dll_lstrcpyA
push 0x6aecca
push 1
push 1
push 0
call sub.kernel32.dll_CreateSemaphoreA
mov dword [esp + 0x44], eax
lea edx, [esp + 0x84]
push edx
call sub.kernel32.dll_lstrlenA_1
push eax
push 0
lea ecx, [esp + 0x8c]
push ecx
call fcn.005cc0e4
add esp, 0xc
lea eax, [esp + 0x184]
push eax
call sub.kernel32.dll_lstrlenA_1
push eax
push 0
lea edx, [esp + 0x18c]
push edx
call fcn.005cc0e4
add esp, 0xc
mov edx, 0x2f
mov eax, dword [esp + 0x4c]
call fcn.005cf6ec
mov dword [esp + 0x50], eax
cmp dword [esp + 0x50], 0
jne 0x5d2e2c
mov ecx, dword [esp + 0x4c]
push ecx
lea eax, [esp + 0x188]
push eax
call sub.kernel32.dll_lstrcpyA
mov dword [esp + 0x3c], 0xffffffff
jmp 0x5d2e58
mov edx, dword [esp + 0x50]
sub edx, dword [esp + 0x4c]
inc edx
push edx
mov ecx, dword [esp + 0x50]
push ecx
lea eax, [esp + 0x18c]
push eax
call sub.kernel32.dll_lstrcpynA_1
mov edx, dword [esp + 0x50]
inc edx
push edx
mov ecx, dword [esp + 0x50]
push ecx
call sub.kernel32.dll_lstrcpyA
lea eax, [esp + 0x184]
call fcn.005d416c
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x54]
call fcn.005d41a0
mov edx, dword [esp + 0x54]
push edx
call sub.kernel32.dll_lstrlenA_1
mov dword [esp + 0x40], eax
mov ecx, dword [esp + 0x54]
add ecx, dword [esp + 0x40]
add ecx, 0xfffffffe
mov dword [esp + 0x58], ecx
push 0
push 0
push 3
push 0
push 3
push 0x80000000
mov eax, dword [esp + 0x6c]
push eax
call sub.kernel32.dll_CreateFileA_1
mov dword [esp + 0x5c], eax
cmp dword [esp + 0x5c], 0xffffffff
jne 0x5d2ed0
mov edx, dword [esp + 0x48]
push edx
call sub.kernel32.dll_GlobalFree
mov ecx, dword [esp + 0x44]
push ecx
call sub.kernel32.dll_CloseHandle_1
mov eax, 0xffffff37
jmp 0x5d36cc
push 0
lea edx, [esp + 0x6c]
push edx
push 8
lea ecx, [esp + 0x20]
push ecx
mov eax, dword [esp + 0x6c]
push eax
call sub.kernel32.dll_ReadFile_1
mov dword [esp + 0x64], eax
cmp dword [esp + 0x64], 0
jne 0x5d2f1b
mov edx, dword [esp + 0x48]
push edx
call sub.kernel32.dll_GlobalFree
mov ecx, dword [esp + 0x5c]
push ecx
call sub.kernel32.dll_CloseHandle_1
mov eax, dword [esp + 0x44]
push eax
call sub.kernel32.dll_CloseHandle_1
mov eax, 0xffffff34
jmp 0x5d36cc
push 0
lea edx, [esp + 0x6c]
push edx
push 8
lea ecx, [esp + 0x28]
push ecx
mov eax, dword [esp + 0x6c]
push eax
call sub.kernel32.dll_ReadFile_1
mov dword [esp + 0x64], eax
cmp dword [esp + 0x64], 0
jne 0x5d2f66
mov edx, dword [esp + 0x48]
push edx
call sub.kernel32.dll_GlobalFree
mov ecx, dword [esp + 0x5c]
push ecx
call sub.kernel32.dll_CloseHandle_1
mov eax, dword [esp + 0x44]
push eax
call sub.kernel32.dll_CloseHandle_1
mov eax, 0xffffff34
jmp 0x5d36cc
mov edx, dword [esp + 0x5c]
push edx
call sub.kernel32.dll_CloseHandle_1
push 0xffffffffffffffff
mov ecx, dword [esp + 0x48]
push ecx
call sub.kernel32.dll_WaitForSingleObject
push 0x6aecb1
lea ecx, [esp + 0x28]
lea edx, [esp + 0x18]
lea eax, [esp + 0x10]
call fcn.005cfb30
mov dword [esp + 0x74], eax
cmp dword [esp + 0x74], 0
je 0x5d2fd8
push 0x6aecb1
lea ecx, [esp + 0x28]
lea edx, [esp + 0x18]
lea eax, [esp + 0x10]
call fcn.005cfb30
mov dword [esp + 0x74], eax
cmp dword [esp + 0x74], 0
je 0x5d2fd8
push 0x6aecb1
lea ecx, [esp + 0x28]
lea edx, [esp + 0x18]
lea eax, [esp + 0x10]
call fcn.005cfb30
mov dword [esp + 0x74], eax
push 0
push 1
mov eax, dword [esp + 0x4c]
push eax
call sub.kernel32.dll_ReleaseSemaphore
cmp dword [esp + 0x74], 0
je 0x5d300a
mov edx, dword [esp + 0x48]
push edx
call sub.kernel32.dll_GlobalFree
mov ecx, dword [esp + 0x44]
push ecx
call sub.kernel32.dll_CloseHandle_1
mov eax, dword [esp + 0x74]
jmp 0x5d36cc
push 0xffffffffffffffff
mov edx, dword [esp + 0x48]
push edx
call sub.kernel32.dll_WaitForSingleObject
push 0x6aecb1
lea ecx, [esp + 0x30]
lea edx, [esp + 0x20]
lea eax, [esp + 0x10]
call fcn.005cfb30
mov dword [esp + 0x74], eax
cmp dword [esp + 0x74], 0
je 0x5d3072
push 0x6aecb1
lea ecx, [esp + 0x30]
lea edx, [esp + 0x20]
lea eax, [esp + 0x10]
call fcn.005cfb30
mov dword [esp + 0x74], eax
cmp dword [esp + 0x74], 0
je 0x5d3072
push 0x6aecb1
lea ecx, [esp + 0x30]
lea edx, [esp + 0x20]
lea eax, [esp + 0x10]
call fcn.005cfb30
mov dword [esp + 0x74], eax
push 0
push 1
mov ecx, dword [esp + 0x4c]
push ecx
call sub.kernel32.dll_ReleaseSemaphore
cmp dword [esp + 0x74], 0
je 0x5d30a4
mov eax, dword [esp + 0x48]
push eax
call sub.kernel32.dll_GlobalFree
mov edx, dword [esp + 0x44]
push edx
call sub.kernel32.dll_CloseHandle_1
mov eax, dword [esp + 0x74]
jmp 0x5d36cc
push 0x6aecd2
mov edx, dword [esp + 0x5c]
push edx
call sub.kernel32.dll_lstrcmpiA
test eax, eax
jne 0x5d31dc
mov ecx, dword [esp + 0x54]
push ecx
call sub.kernel32.dll_lstrlenA_1
dec eax
push eax
mov eax, dword [esp + 0x58]
push eax
lea edx, [esp + 0x8c]
push edx
call sub.kernel32.dll_lstrcpynA_1
push 0x6aecd5
lea ecx, [esp + 0x88]
push ecx
call sub.kernel32.dll_lstrcatA
lea eax, [esp + 0x84]
call fcn.005d8188
push 0
push 0
push 2
push 0
push 3
push 0x40000000
lea edx, [esp + 0x9c]
push edx
call sub.kernel32.dll_CreateFileA_1
mov dword [esp + 0x5c], eax
cmp dword [esp + 0x5c], 0xffffffff
jne 0x5d313c
mov ecx, dword [esp + 0x48]
push ecx
call sub.kernel32.dll_GlobalFree
mov eax, dword [esp + 0x44]
push eax
call sub.kernel32.dll_CloseHandle_1
mov eax, 0xffffff37
jmp 0x5d36cc
push 0
lea edx, [esp + 0x6c]
push edx
push 8
lea ecx, [esp + 0x30]
push ecx
mov eax, dword [esp + 0x6c]
push eax
call sub.kernel32.dll_WriteFile_1
mov dword [esp + 0x64], eax
cmp dword [esp + 0x64], 0
jne 0x5d3187
mov edx, dword [esp + 0x48]
push edx
call sub.kernel32.dll_GlobalFree
mov ecx, dword [esp + 0x5c]
push ecx
call sub.kernel32.dll_CloseHandle_1
mov eax, dword [esp + 0x44]
push eax
call sub.kernel32.dll_CloseHandle_1
mov eax, 0xffffff33
jmp 0x5d36cc
push 0
lea edx, [esp + 0x6c]
push edx
push 8
lea ecx, [esp + 0x38]
push ecx
mov eax, dword [esp + 0x6c]
push eax
call sub.kernel32.dll_WriteFile_1
mov dword [esp + 0x64], eax
cmp dword [esp + 0x64], 0
jne 0x5d31d2
mov edx, dword [esp + 0x48]
push edx
call sub.kernel32.dll_GlobalFree
mov ecx, dword [esp + 0x5c]
push ecx
call sub.kernel32.dll_CloseHandle_1
mov eax, dword [esp + 0x44]
push eax
call sub.kernel32.dll_CloseHandle_1
mov eax, 0xffffff33
jmp 0x5d36cc
mov edx, dword [esp + 0x5c]
push edx
call sub.kernel32.dll_CloseHandle_1
push 0x6aecd9
mov ecx, dword [esp + 0x5c]
push ecx
call sub.kernel32.dll_lstrcmpiA
test eax, eax
jne 0x5d3445
mov eax, dword [esp + 0x54]
push eax
call sub.kernel32.dll_lstrlenA_1
dec eax
push eax
mov edx, dword [esp + 0x58]
push edx
lea ecx, [esp + 0x8c]
push ecx
call sub.kernel32.dll_lstrcpynA_1
push 0x6aecdc
lea eax, [esp + 0x88]
push eax
call sub.kernel32.dll_lstrcatA
lea eax, [esp + 0x84]
call fcn.005d8188
push 0
push 0
push 2
push 0
push 3
push 0x40000000
lea edx, [esp + 0x9c]
push edx
call sub.kernel32.dll_CreateFileA_1
mov dword [esp + 0x5c], eax
cmp dword [esp + 0x5c], 0xffffffff
jne 0x5d3274
mov ecx, dword [esp + 0x48]
push ecx
call sub.kernel32.dll_GlobalFree
mov eax, dword [esp + 0x44]
push eax
call sub.kernel32.dll_CloseHandle_1
mov eax, 0xffffff37
jmp 0x5d36cc
push 0
lea edx, [esp + 0x6c]
push edx
push 8
lea ecx, [esp + 0x30]
push ecx
mov eax, dword [esp + 0x6c]
push eax
call sub.kernel32.dll_WriteFile_1
mov dword [esp + 0x64], eax
cmp dword [esp + 0x64], 0
jne 0x5d32bf
mov edx, dword [esp + 0x48]
push edx
call sub.kernel32.dll_GlobalFree
mov ecx, dword [esp + 0x5c]
push ecx
call sub.kernel32.dll_CloseHandle_1
mov eax, dword [esp + 0x44]
push eax
call sub.kernel32.dll_CloseHandle_1
mov eax, 0xffffff33
jmp 0x5d36cc
push 0
lea edx, [esp + 0x6c]
push edx
push 8
lea ecx, [esp + 0x38]
push ecx
mov eax, dword [esp + 0x6c]
push eax
call sub.kernel32.dll_WriteFile_1
mov dword [esp + 0x64], eax
cmp dword [esp + 0x64], 0
jne 0x5d330a
mov edx, dword [esp + 0x48]
push edx
call sub.kernel32.dll_GlobalFree
mov ecx, dword [esp + 0x5c]
push ecx
call sub.kernel32.dll_CloseHandle_1
mov eax, dword [esp + 0x44]
push eax
call sub.kernel32.dll_CloseHandle_1
mov eax, 0xffffff33
jmp 0x5d36cc
push 0
push 0
push 3
push 0
push 3
push 0x80000000
mov edx, dword [esp + 0x6c]
push edx
call sub.kernel32.dll_CreateFileA_1
mov dword [esp + 0x60], eax
cmp dword [esp + 0x60], 0xffffffff
jne 0x5d3356
mov ecx, dword [esp + 0x48]
push ecx
call sub.kernel32.dll_GlobalFree
mov eax, dword [esp + 0x5c]
push eax
call sub.kernel32.dll_CloseHandle_1
mov edx, dword [esp + 0x44]
push edx
call sub.kernel32.dll_CloseHandle_1
mov eax, 0xffffff37
jmp 0x5d36cc
push 0
push 0
push 0x10
mov edx, dword [esp + 0x6c]
push edx
call sub.kernel32.dll_SetFilePointer_1
mov dword [esp + 0x6c], 1
push 0
lea ecx, [esp + 0x6c]
push ecx
push 1
lea eax, [esp + 0x7c]
push eax
mov edx, dword [esp + 0x70]
push edx
call sub.kernel32.dll_ReadFile_1
mov dword [esp + 0x64], eax
cmp dword [esp + 0x64], 0
jne 0x5d33c3
mov ecx, dword [esp + 0x48]
push ecx
call sub.kernel32.dll_GlobalFree
mov eax, dword [esp + 0x60]
push eax
call sub.kernel32.dll_CloseHandle_1
mov edx, dword [esp + 0x5c]
push edx
call sub.kernel32.dll_CloseHandle_1
mov ecx, dword [esp + 0x44]
push ecx
call sub.kernel32.dll_CloseHandle_1
mov eax, 0xffffff35
jmp 0x5d36cc
cmp dword [esp + 0x68], 0
je 0x5d3431
push 0
lea edx, [esp + 0x6c]
push edx
push 1
lea ecx, [esp + 0x7c]
push ecx
mov eax, dword [esp + 0x6c]
push eax
call sub.kernel32.dll_WriteFile_1
mov dword [esp + 0x64], eax
cmp dword [esp + 0x64], 0
jne 0x5d341f
mov edx, dword [esp + 0x48]
push edx
call sub.kernel32.dll_GlobalFree
mov ecx, dword [esp + 0x60]
push ecx
call sub.kernel32.dll_CloseHandle_1
mov eax, dword [esp + 0x5c]
push eax
call sub.kernel32.dll_CloseHandle_1
mov edx, dword [esp + 0x44]
push edx
call sub.kernel32.dll_CloseHandle_1
mov eax, 0xffffff33
jmp 0x5d36cc
inc dword [esp + 0x6c]
cmp dword [esp + 0x6c], 0x100
jle 0x5d336e
mov edx, dword [esp + 0x60]
push edx
call sub.kernel32.dll_CloseHandle_1
mov ecx, dword [esp + 0x5c]
push ecx
call sub.kernel32.dll_CloseHandle_1
push 0x6aece0
mov eax, dword [esp + 0x5c]
push eax
call sub.kernel32.dll_lstrcmpiA
test eax, eax
jne 0x5d36ab
mov edx, dword [esp + 0x54]
push edx
call sub.kernel32.dll_lstrlenA_1
dec eax
push eax
mov ecx, dword [esp + 0x58]
push ecx
lea eax, [esp + 0x8c]
push eax
call sub.kernel32.dll_lstrcpynA_1
push 0x6aece3
lea edx, [esp + 0x88]
push edx
call sub.kernel32.dll_lstrcatA
lea eax, [esp + 0x84]
call fcn.005d8188
push 0
push 0
push 2
push 0
push 3
push 0x40000000
lea edx, [esp + 0x9c]
push edx
call sub.kernel32.dll_CreateFileA_1
mov dword [esp + 0x5c], eax
cmp dword [esp + 0x5c], 0xffffffff
jne 0x5d34dd
mov ecx, dword [esp + 0x48]
push ecx
call sub.kernel32.dll_GlobalFree
mov eax, dword [esp + 0x44]
push eax
call sub.kernel32.dll_CloseHandle_1
mov eax, 0xffffff37
jmp 0x5d36cc
push 0
lea edx, [esp + 0x6c]
push edx
push 8
lea ecx, [esp + 0x30]
push ecx
mov eax, dword [esp + 0x6c]
push eax
call sub.kernel32.dll_WriteFile_1
mov dword [esp + 0x64], eax
cmp dword [esp + 0x64], 0
jne 0x5d3528
mov edx, dword [esp + 0x48]
push edx
call sub.kernel32.dll_GlobalFree
mov ecx, dword [esp + 0x5c]
push ecx
call sub.kernel32.dll_CloseHandle_1
mov eax, dword [esp + 0x44]
push eax
call sub.kernel32.dll_CloseHandle_1
mov eax, 0xffffff33
jmp 0x5d36cc
push 0
lea edx, [esp + 0x6c]
push edx
push 8
lea ecx, [esp + 0x38]
push ecx
mov eax, dword [esp + 0x6c]
push eax
call sub.kernel32.dll_WriteFile_1
mov dword [esp + 0x64], eax
cmp dword [esp + 0x64], 0
jne 0x5d3573
mov edx, dword [esp + 0x48]
push edx
call sub.kernel32.dll_GlobalFree
mov ecx, dword [esp + 0x5c]
push ecx
call sub.kernel32.dll_CloseHandle_1
mov eax, dword [esp + 0x44]
push eax
call sub.kernel32.dll_CloseHandle_1
mov eax, 0xffffff33
jmp 0x5d36cc
push 0
push 0
push 3
push 0
push 3
push 0x80000000
mov edx, dword [esp + 0x6c]
push edx
call sub.kernel32.dll_CreateFileA_1
mov dword [esp + 0x60], eax
cmp dword [esp + 0x5c], 0xffffffff
jne 0x5d35bf
mov ecx, dword [esp + 0x48]
push ecx
call sub.kernel32.dll_GlobalFree
mov eax, dword [esp + 0x5c]
push eax
call sub.kernel32.dll_CloseHandle_1
mov edx, dword [esp + 0x44]
push edx
call sub.kernel32.dll_CloseHandle_1
mov eax, 0xffffff37
jmp 0x5d36cc
push 0
push 0
push 0x10
mov edx, dword [esp + 0x6c]
push edx
call sub.kernel32.dll_SetFilePointer_1
mov dword [esp + 0x6c], 1
push 0
lea ecx, [esp + 0x6c]
push ecx
push 1
lea eax, [esp + 0x7c]
push eax
mov edx, dword [esp + 0x70]
push edx
call sub.kernel32.dll_ReadFile_1
mov dword [esp + 0x64], eax
cmp dword [esp + 0x64], 0
jne 0x5d362c
mov ecx, dword [esp + 0x48]
push ecx
call sub.kernel32.dll_GlobalFree
mov eax, dword [esp + 0x60]
push eax
call sub.kernel32.dll_CloseHandle_1
mov edx, dword [esp + 0x5c]
push edx
call sub.kernel32.dll_CloseHandle_1
mov ecx, dword [esp + 0x44]
push ecx
call sub.kernel32.dll_CloseHandle_1
mov eax, 0xffffff35
jmp 0x5d36cc
cmp dword [esp + 0x68], 0
je 0x5d3697
push 0
lea edx, [esp + 0x6c]
push edx
push 1
lea ecx, [esp + 0x7c]
push ecx
mov eax, dword [esp + 0x6c]
push eax
call sub.kernel32.dll_WriteFile_1
mov dword [esp + 0x64], eax
cmp dword [esp + 0x64], 0
jne 0x5d3685
mov edx, dword [esp + 0x48]
push edx
call sub.kernel32.dll_GlobalFree
mov ecx, dword [esp + 0x60]
push ecx
call sub.kernel32.dll_CloseHandle_1
mov eax, dword [esp + 0x5c]
push eax
call sub.kernel32.dll_CloseHandle_1
mov edx, dword [esp + 0x44]
push edx
call sub.kernel32.dll_CloseHandle_1
mov eax, 0xffffff33
jmp 0x5d36cc
inc dword [esp + 0x6c]
cmp dword [esp + 0x6c], 0x100
jle 0x5d35d7
mov edx, dword [esp + 0x60]
push edx
call sub.kernel32.dll_CloseHandle_1
mov ecx, dword [esp + 0x5c]
push ecx
call sub.kernel32.dll_CloseHandle_1
cmp dword [esp + 0x3c], 0xffffffff
jne 0x5d2db7
mov eax, dword [esp + 0x48]
push eax
call sub.kernel32.dll_GlobalFree
mov edx, dword [esp + 0x44]
push edx
call sub.kernel32.dll_CloseHandle_1
xor eax, eax
add esp, 0x3b4
pop edi
pop esi
ret