Function at 0x40023d54
Capabilities:
Read file on windows

Disassembly:
mov eax, dword [esp + 8]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x10]
test esi, esi
push edi
mov dword [esp + 0x18], eax
je 0x40023f74
cmp byte [esi + 0x5c], 0x72
jne 0x40023f74
mov ecx, dword [esi + 0x38]
cmp ecx, 0xfffffffd
je 0x40023f69
cmp ecx, 0xffffffff
je 0x40023f69
xor edx, edx
inc edx
cmp ecx, edx
jne 0x40023d99
xor eax, eax
jmp 0x40023f77
mov ebp, dword [esp + 0x1c]
test ebp, ebp
mov ebx, eax
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], ebp
je 0x40023dd8
cmp dword [esi + 0x6c], 0xffffffff
je 0x40023dd8
mov cl, byte [esi + 0x6c]
mov byte [eax], cl
inc dword [esi + 0xc]
dec dword [esi + 0x10]
or dword [esi + 0x6c], 0xffffffff
inc dword [esi + 0x68]
cmp dword [esi + 0x70], 0
lea ebx, [eax + 1]
mov dword [esp + 0x18], ebx
je 0x40023dd8
mov dword [esi + 0x38], edx
mov eax, edx
jmp 0x40023f77
cmp dword [esi + 0x10], 0
je 0x40023f3b
xor ecx, ecx
cmp dword [esi + 0x58], ecx
jne 0x40023eda
cmp dword [esi + 4], ecx
jne 0x40023e34
cmp dword [esi + 0x3c], ecx
jne 0x40023e34
call dword [sym.imp.MSVCRT.dll__errno]
and dword [eax], 0
push dword [esi + 0x40]
xor edi, edi
push 0x4000
inc edi
push edi
push dword [esi + 0x44]
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
test eax, eax
mov dword [esi + 4], eax
jne 0x40023e2f
mov eax, dword [esi + 0x40]
mov dword [esi + 0x3c], edi
test byte [eax + 0xc], 0x20
jne 0x40023f37
mov eax, dword [esi + 0x44]
mov dword [esi], eax
mov eax, dword [esi + 4]
add dword [esi + 0x64], eax
mov eax, dword [esi + 0x10]
add dword [esi + 0x68], eax
push 0
push esi
call sym.xprt6.dll_inflate
pop ecx
pop ecx
mov ecx, dword [esi + 4]
sub dword [esi + 0x64], ecx
mov ecx, dword [esi + 0x10]
sub dword [esi + 0x68], ecx
cmp eax, 1
mov dword [esi + 0x38], eax
jne 0x40023eba
mov eax, dword [esi + 0xc]
sub eax, dword [esp + 0x18]
push eax
push dword [esp + 0x1c]
push dword [esi + 0x4c]
call sym.xprt6.dll_crc32
mov dword [esi + 0x4c], eax
mov eax, dword [esi + 0xc]
mov dword [esp + 0x24], eax
add esp, 0xc
mov eax, esi
call fcn.4002399a
cmp eax, dword [esi + 0x4c]
jne 0x40023ed1
mov eax, esi
call fcn.4002399a
mov eax, esi
call fcn.400234d8
xor edi, edi
cmp dword [esi + 0x38], edi
jne 0x40023f3b
push esi
call sym.xprt6.dll_inflateReset
push edi
push edi
push edi
call sym.xprt6.dll_crc32
add esp, 0x10
mov dword [esi + 0x4c], eax
jmp 0x40023ebc
xor edi, edi
cmp dword [esi + 0x38], edi
jne 0x40023f3b
cmp dword [esi + 0x3c], edi
jne 0x40023f3b
cmp dword [esi + 0x10], edi
jne 0x40023de2
jmp 0x40023f3b
mov dword [esi + 0x38], 0xfffffffd
jmp 0x40023f3b
mov edi, dword [esi + 4]
mov eax, dword [esi + 0x10]
cmp edi, eax
jbe 0x40023ee6
mov edi, eax
cmp edi, ecx
jbe 0x40023f05
push edi
push dword [esi]
push dword [esi + 0xc]
call sub.MSVCRT.dll_memcpy
add dword [esi], edi
sub dword [esi + 0x10], edi
add ebx, edi
add esp, 0xc
sub dword [esi + 4], edi
mov dword [esi + 0xc], ebx
mov eax, dword [esi + 0x10]
test eax, eax
jbe 0x40023f1f
push dword [esi + 0x40]
push eax
push 1
push ebx
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
sub dword [esi + 0x10], eax
sub ebp, dword [esi + 0x10]
add dword [esi + 0x64], ebp
add dword [esi + 0x68], ebp
test ebp, ebp
jne 0x40023f33
mov dword [esi + 0x3c], 1
mov eax, ebp
jmp 0x40023f77
or dword [esi + 0x38], 0xffffffff
mov eax, dword [esi + 0xc]
sub eax, dword [esp + 0x18]
push eax
push dword [esp + 0x1c]
push dword [esi + 0x4c]
call sym.xprt6.dll_crc32
mov ecx, dword [esi + 0x10]
add esp, 0xc
cmp ebp, ecx
mov dword [esi + 0x4c], eax
jne 0x40023f6e
mov esi, dword [esi + 0x38]
cmp esi, 0xfffffffd
je 0x40023f69
cmp esi, 0xffffffff
jne 0x40023f6e
or eax, 0xffffffff
jmp 0x40023f77
mov eax, ebp
sub eax, ecx
jmp 0x40023f77
push 0xfffffffffffffffe
pop eax
pop edi
pop esi
pop ebp
pop ebx
ret