Function at 0x5d64ac
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffc80
push esi
push edi
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
xor eax, eax
mov dword [ebp - 0x20], eax
xor edx, edx
mov dword [ebp - 0x24], edx
lea edi, [ebp - 0x260]
mov ecx, 0x82
mov esi, 0x6ada8d
rep movsd dword es:[edi], dword [esi]
xor edx, edx
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x48], edx
cmp dword [0x6cb42c], 0
je 0x5d662d
mov word [ebp - 0x4e], 0x10f
mov byte [ebp - 0x380], 9
mov ecx, dword [ebp - 4]
push ecx
call sub.kernel32.dll_lstrlenA_1
inc eax
push eax
mov eax, dword [ebp - 4]
push eax
lea edx, [ebp - 0x37f]
push edx
call fcn.005cc0fc
add esp, 0xc
push 2
lea ecx, [ebp - 8]
push ecx
lea eax, [ebp - 0x27b]
push eax
call fcn.005cc0fc
add esp, 0xc
push 2
lea edx, [ebp - 0xc]
push edx
lea ecx, [ebp - 0x279]
push ecx
call fcn.005cc0fc
add esp, 0xc
push 1
mov eax, dword [ebp + 0x1c]
push eax
lea edx, [ebp - 0x277]
push edx
call fcn.005cc0fc
add esp, 0xc
push 1
mov ecx, dword [ebp + 0x18]
push ecx
lea eax, [ebp - 0x276]
push eax
call fcn.005cc0fc
add esp, 0xc
push 1
mov edx, dword [ebp + 0x14]
push edx
lea ecx, [ebp - 0x275]
push ecx
call fcn.005cc0fc
add esp, 0xc
push 1
mov eax, dword [ebp + 0x10]
push eax
lea edx, [ebp - 0x274]
push edx
call fcn.005cc0fc
add esp, 0xc
push 2
lea ecx, [ebp + 8]
push ecx
lea eax, [ebp - 0x273]
push eax
call fcn.005cc0fc
add esp, 0xc
lea ecx, [ebp - 0x58]
lea eax, [ebp - 0x380]
push 6
mov dx, word [ebp - 0x4e]
call fcn.005d85c4
mov word [ebp - 0x50], ax
push 2
lea ecx, [ebp - 0x58]
push ecx
lea eax, [ebp - 0x50]
push eax
call fcn.005cc0fc
add esp, 0xc
lea edx, [ebp - 0x56]
push 1
push edx
mov ecx, dword [ebp + 0x1c]
push ecx
call fcn.005cc0fc
add esp, 0xc
lea eax, [ebp - 0x55]
push 1
push eax
mov edx, dword [ebp + 0x18]
push edx
call fcn.005cc0fc
add esp, 0xc
lea ecx, [ebp - 0x54]
push 1
push ecx
mov eax, dword [ebp + 0x14]
push eax
call fcn.005cc0fc
add esp, 0xc
lea edx, [ebp - 0x53]
push 1
push edx
mov ecx, dword [ebp + 0x10]
push ecx
call fcn.005cc0fc
movsx eax, word [ebp - 0x50]
add esp, 0xc
jmp 0x5d6955
mov edx, dword [ebp - 0x40]
test edx, edx
jns 0x5d6637
add edx, 0xf
sar edx, 4
mov dword [ebp - 0x40], edx
lea eax, [ebp - 0x260]
mov edx, dword [ebp - 4]
call fcn.005d7af8
push 0
push 0
push 3
push 0
push 3
push 0x80000000
lea ecx, [ebp - 0x260]
push ecx
call sub.kernel32.dll_CreateFileA_1
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x44], 0xffffffff
jne 0x5d6679
mov eax, 0xffffff37
jmp 0x5d6955
push 0x6aecca
push 1
push 1
push 0
call sub.kernel32.dll_CreateSemaphoreA
mov dword [ebp - 0x3c], eax
xor edx, edx
mov dword [ebp - 0x10], edx
mov ecx, dword [ebp - 0x10]
cmp ecx, dword [ebp - 0x40]
jge 0x5d6941
push 0
push 0
mov eax, dword [ebp - 0x10]
shl eax, 4
add eax, dword [ebp - 8]
push eax
mov edx, dword [ebp - 0x44]
push edx
call sub.kernel32.dll_SetFilePointer_1
lea ecx, [ebp - 0x18]
push 0
push ecx
lea eax, [ebp - 0x270]
push 0x10
push eax
mov edx, dword [ebp - 0x44]
push edx
call sub.kernel32.dll_ReadFile_1
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x5d66f1
mov ecx, dword [ebp - 0x44]
push ecx
call sub.kernel32.dll_CloseHandle_1
mov eax, dword [ebp - 0x3c]
push eax
call sub.kernel32.dll_CloseHandle_1
mov eax, 0xffffff34
jmp 0x5d6955
inc dword [ebp - 0x48]
mov edx, dword [ebp - 0x48]
cmp edx, dword [ebp + 8]
jle 0x5d671e
cmp dword [ebp + 8], 0
je 0x5d671e
mov ecx, dword [ebp - 0x44]
push ecx
call sub.kernel32.dll_CloseHandle_1
mov eax, dword [ebp - 0x3c]
push eax
call sub.kernel32.dll_CloseHandle_1
mov eax, 0xfffffb77
jmp 0x5d6955
push 0xffffffffffffffff
mov edx, dword [ebp - 0x3c]
push edx
call sub.kernel32.dll_WaitForSingleObject
cmp dword [ebp - 0x24], 0
jne 0x5d67d8
mov ecx, dword [ebp + 0x14]
push ecx
mov eax, dword [ebp + 0x10]
push eax
mov edx, dword [ebp + 0xc]
push edx
lea eax, [ebp - 0x270]
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x1c]
call fcn.005cfcc4
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x5d68a5
mov eax, dword [ebp + 0x14]
push eax
mov edx, dword [ebp + 0x10]
push edx
mov ecx, dword [ebp + 0xc]
push ecx
lea eax, [ebp - 0x270]
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x1c]
call fcn.005cfcc4
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x5d68a5
mov eax, dword [ebp + 0x14]
push eax
mov edx, dword [ebp + 0x10]
push edx
mov ecx, dword [ebp + 0xc]
push ecx
lea eax, [ebp - 0x270]
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x1c]
call fcn.005cfcc4
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x5d68a5
push 0
push 1
mov eax, dword [ebp - 0x3c]
push eax
call sub.kernel32.dll_ReleaseSemaphore
mov edx, dword [ebp - 0x3c]
push edx
call sub.kernel32.dll_CloseHandle_1
mov ecx, dword [ebp - 0x44]
push ecx
call sub.kernel32.dll_CloseHandle_1
mov eax, dword [ebp - 0x14]
jmp 0x5d6955
mov edx, dword [ebp + 0x14]
push edx
mov ecx, dword [ebp + 0x10]
push ecx
lea ecx, [ebp - 0x34]
mov eax, dword [ebp + 0xc]
push eax
lea eax, [ebp - 0x35]
mov dl, byte [ebp - 0x20]
push edx
push ecx
push eax
lea edx, [ebp - 0x36]
push edx
lea eax, [ebp - 0x270]
mov edx, dword [ebp + 0x1c]
mov ecx, dword [ebp + 0x18]
call fcn.005cfe6c
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x5d68a5
mov eax, dword [ebp + 0x14]
push eax
mov edx, dword [ebp + 0x10]
push edx
lea edx, [ebp - 0x34]
mov ecx, dword [ebp + 0xc]
push ecx
lea ecx, [ebp - 0x35]
mov al, byte [ebp - 0x20]
push eax
push edx
push ecx
lea eax, [ebp - 0x36]
push eax
lea eax, [ebp - 0x270]
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x1c]
call fcn.005cfe6c
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x5d68a5
mov eax, dword [ebp + 0x14]
push eax
mov edx, dword [ebp + 0x10]
push edx
lea edx, [ebp - 0x34]
mov ecx, dword [ebp + 0xc]
push ecx
lea ecx, [ebp - 0x35]
mov al, byte [ebp - 0x20]
push eax
push edx
push ecx
lea eax, [ebp - 0x36]
push eax
lea eax, [ebp - 0x270]
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x1c]
call fcn.005cfe6c
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x5d68a5
push 0
push 1
mov eax, dword [ebp - 0x3c]
push eax
call sub.kernel32.dll_ReleaseSemaphore
mov edx, dword [ebp - 0x3c]
push edx
call sub.kernel32.dll_CloseHandle_1
mov ecx, dword [ebp - 0x44]
push ecx
call sub.kernel32.dll_CloseHandle_1
mov eax, dword [ebp - 0x14]
jmp 0x5d6955
push 0
push 1
mov edx, dword [ebp - 0x3c]
push edx
call sub.kernel32.dll_ReleaseSemaphore
cmp dword [ebp - 0x34], 0
je 0x5d6932
cmp dword [ebp - 0x24], 0
je 0x5d6932
cmp dword [ebp - 0x34], 2
je 0x5d6941
xor ecx, ecx
mov cl, byte [ebp - 0x36]
dec ecx
sar ecx, 1
jns 0x5d68d1
adc ecx, 0
mov byte [ebp - 0x36], cl
xor edx, edx
mov eax, dword [ebp - 0x10]
mov dl, byte [ebp - 0x36]
shl eax, 3
xor ecx, ecx
mov cl, byte [ebp - 0x35]
add eax, edx
add eax, ecx
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x4c]
cmp eax, dword [ebp - 0xc]
jg 0x5d68f9
cmp dword [ebp - 0x4c], 0
jge 0x5d6909
mov edx, dword [ebp - 0x44]
push edx
call sub.kernel32.dll_CloseHandle_1
mov eax, 0xfffffc17
jmp 0x5d6955
mov edx, dword [ebp - 0x4c]
test edx, edx
jns 0x5d6913
add edx, 7
sar edx, 3
dec edx
mov dword [ebp - 0x10], edx
mov ecx, dword [ebp - 0x4c]
test ecx, ecx
jns 0x5d6924
add ecx, 7
sar ecx, 3
shl ecx, 3
mov eax, dword [ebp - 0x4c]
sub eax, ecx
mov dword [ebp - 0x20], eax
inc dword [ebp - 0x10]
mov edx, dword [ebp - 0x10]
cmp edx, dword [ebp - 0x40]
jl 0x5d669d
mov ecx, dword [ebp - 0x3c]
push ecx
call sub.kernel32.dll_CloseHandle_1
mov eax, dword [ebp - 0x44]
push eax
call sub.kernel32.dll_CloseHandle_1
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0x18