Function at 0x50d900
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x565ea6
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x118
mov eax, dword [ebp + 0x14]
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
mov esi, ecx
push 1
push eax
mov dword [ebp - 0x18], esi
mov dword [ebp - 4], 0
call fcn.0050d370
test al, al
je 0x50da51
mov eax, dword [esi + 0x1c]
mov ebx, dword [esi + 0x18]
test eax, eax
jg 0x50d957
jl 0x50d95c
cmp ebx, 0x2da0
jb 0x50d95c
mov ebx, 0x2da0
mov edx, dword [esi + 0xc]
mov ecx, ebx
push 2
push 0
neg ecx
push ecx
push edx
mov dword [ebp - 0x14], ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x50d993
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x50d993
push eax
push str.SetFilePointer___error__ld_in_CFormatParsing::FillZipFormatStruct___r_n
mov ecx, esi
call fcn.0050d7b0
jmp 0x50da51
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
test edi, edi
mov dword [ebp - 0x1c], edi
jne 0x50d9bd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.LocalAlloc_error__ld_in_CFormatParsing::FillZipFormatStruct___r_n
mov ecx, esi
call fcn.0050d7b0
jmp 0x50da51
mov ecx, dword [esi + 0xc]
lea eax, [ebp + 0x14]
push 0
push eax
push ebx
push edi
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x50dd7f
cmp dword [ebp + 0x14], ebx
jb 0x50dd7f
mov ebx, dword [ebp + 8]
mov ecx, dword [ebx]
test ecx, ecx
je 0x50da0b
mov edx, dword [ecx]
push 1
mov byte [ebp - 4], 1
call dword [edx]
jmp 0x50da04
mov dword [ebp - 4], 0
push 0x58
call fcn.0054276d
mov ecx, eax
add esp, 4
mov dword [ebp + 8], ecx
test ecx, ecx
mov byte [ebp - 4], 3
je 0x50da2b
call fcn.0050ed10
mov ecx, eax
jmp 0x50da2d
xor ecx, ecx
test ecx, ecx
mov byte [ebp - 4], 0
mov dword [ebx], ecx
jne 0x50da69
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.new_operator_error__ld_in_CFormatParsing::FillZipFormatStruct___r_n
mov ecx, esi
call fcn.0050d7b0
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, 6
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov eax, dword [ebp - 0x14]
push eax
push edi
call fcn.0050ee30
cmp eax, 0xc8
je 0x50dabe
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error__ld__ECDR_32___Process_ECDR____in_CFormatParsing::FillZipFormatStruct___r_n
mov ecx, esi
call fcn.0050d7b0
mov ecx, dword [ebx]
test ecx, ecx
je 0x50da99
mov edx, dword [ecx]
push 1
call dword [edx]
push edi
mov dword [ebx], 0
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov eax, dword [ebx]
push edi
mov ecx, dword [eax + 0x38]
mov dword [eax + 0xc], ecx
mov eax, dword [ebx]
mov edx, dword [eax + 0x34]
mov dword [eax + 0x10], edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebx]
mov ecx, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
xor edx, edx
mov eax, dword [eax + 0x38]
sub ecx, eax
mov eax, edi
sbb eax, edx
mov edx, dword [esi + 0x1c]
cmp edx, eax
jg 0x50db17
jl 0x50daf8
mov eax, dword [esi + 0x18]
cmp eax, ecx
jae 0x50db17
mov eax, dword [ebp + 0x18]
test eax, eax
jne 0x50db17
mov eax, 7
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov eax, dword [ebx]
mov ecx, dword [eax + 0x10]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
test eax, eax
mov dword [ebp - 0x14], eax
jne 0x50db56
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.LocalAlloc_error__ld_in_CFormatParsing::FillZipFormatStruct___r_n
mov ecx, esi
call fcn.0050d7b0
mov ecx, dword [ebx]
test ecx, ecx
je 0x50db4b
mov edx, dword [ecx]
push 1
call dword [edx]
mov dword [ebx], 0
jmp 0x50da51
mov eax, dword [ebx]
xor edx, edx
mov ecx, dword [eax + 0x38]
mov eax, dword [ebp + 0xc]
sub eax, ecx
mov ecx, dword [esi + 0x1c]
sbb edi, edx
cmp ecx, edi
jl 0x50dbf6
jg 0x50db78
mov edx, dword [esi + 0x18]
cmp edx, eax
jb 0x50dbf6
mov eax, dword [ebx]
mov ecx, dword [ebp + 0xc]
push 2
push 0
mov eax, dword [eax + 0xc]
sub eax, ecx
mov ecx, dword [esi + 0xc]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x50dbb2
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x50dbb2
push eax
push str.SetFilePointer___error__ld_in_CFormatParsing::FillZipFormatStruct___r_n
mov ecx, esi
call fcn.0050d7b0
jmp 0x50dd42
mov eax, dword [ebx]
lea edx, [ebp + 0x14]
push 0
push edx
mov ecx, dword [eax + 0x10]
mov edx, dword [ebp - 0x14]
mov eax, dword [esi + 0xc]
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x50dbde
mov ecx, dword [ebx]
mov edx, dword [ebp + 0x14]
cmp edx, dword [ecx + 0x10]
je 0x50dd03
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ReadFile___error__ld_in_CFormatParsing::FillZipFormatStruct___r_n
mov ecx, esi
call fcn.0050d7b0
jmp 0x50dd42
mov edi, dword [ebp + 0x18]
mov dword [ebp + 8], 0
test edi, edi
je 0x50dd03
mov eax, dword [esi + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [edi + 0x10]
push 1
push ecx
mov ecx, esi
call fcn.0050d370
test al, al
je 0x50dd42
cmp edi, dword [ebp + 0x18]
jne 0x50dc99
mov edx, dword [ebx]
xor ecx, ecx
mov eax, dword [edx + 0xc]
mov edx, dword [edi + 0xc]
cmp edx, ecx
jg 0x50dc99
jl 0x50dc43
mov ecx, dword [edi + 8]
cmp ecx, eax
jae 0x50dc99
mov edx, dword [edi + 8]
push 0
sub eax, edx
mov edx, dword [esi + 0xc]
push 0
push eax
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x50dc78
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x50dc78
push eax
push str.SetFilePointer___error__ld_in_CFormatParsing::FillZipFormatStruct___r_n
mov ecx, esi
call fcn.0050d7b0
jmp 0x50dd42
mov eax, dword [ebx]
xor edx, edx
mov ecx, dword [eax + 0xc]
mov eax, dword [edi + 8]
sub eax, ecx
mov ecx, dword [edi + 0xc]
sbb ecx, edx
mov edx, dword [esi + 0x18]
add edx, eax
mov dword [esi + 0x18], edx
mov eax, dword [esi + 0x1c]
adc eax, ecx
mov dword [esi + 0x1c], eax
mov edx, dword [ebx]
mov ecx, dword [ebp + 8]
mov eax, dword [edx + 0x10]
mov edx, dword [esi + 0x1c]
sub eax, ecx
xor ecx, ecx
cmp edx, ecx
jg 0x50dcbd
jl 0x50dcb5
mov ecx, dword [esi + 0x18]
cmp ecx, eax
jae 0x50dcbd
mov edx, dword [esi + 0x18]
mov dword [ebp + 0x10], edx
jmp 0x50dcc0
mov dword [ebp + 0x10], eax
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 8]
lea eax, [ebp + 0x14]
push 0
push eax
mov eax, dword [ebp - 0x14]
push ecx
mov ecx, dword [esi + 0xc]
add edx, eax
push edx
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x50dbde
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0x14]
cmp ecx, eax
jne 0x50dbde
mov ecx, dword [ebp + 8]
mov edi, dword [edi + 0x1c]
add ecx, eax
mov dword [ebp + 8], ecx
jmp 0x50dc00
mov esi, dword [ebp - 0x14]
mov ecx, dword [ebx]
push esi
call fcn.0050ee70
test eax, eax
jne 0x50dd5d
lea ecx, [ebp - 0x124]
call fcn.0045eaa0
push 1
push str.ParseCentralDir_failed_in_CFormatParsing::FillZipFormatStruct___r_n
lea ecx, [ebp - 0x124]
mov byte [ebp - 4], 4
call fcn.0045eb80
lea ecx, [ebp - 0x124]
mov byte [ebp - 4], 0
call fcn.0045eb70
mov ecx, dword [ebx]
test ecx, ecx
je 0x50dd4e
mov edx, dword [ecx]
push 1
call dword [edx]
mov eax, dword [ebp - 0x14]
mov dword [ebx], 0
push eax
jmp 0x50da4b
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, dword [ebx]
mov byte [ecx + 8], 1
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
xor eax, eax
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 0x14
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ReadFile___error__ld_in_CFormatParsing::FillZipFormatStruct___r_n
jmp 0x50da43