Function at 0x30613d10
Capabilities:
Read file on windows

Disassembly:
mov eax, dword [esp + 8]
push esi
mov esi, dword [esp + 8]
mov dword [esp + 0xc], eax
test esi, esi
je 0x30613f64
cmp byte [esi + 0x5c], 0x72
jne 0x30613f64
mov ecx, dword [esi + 0x38]
cmp ecx, 0xfffffffd
je 0x30613f5f
or edx, 0xffffffff
cmp ecx, edx
je 0x30613f5f
push edi
mov edi, 1
cmp ecx, edi
jne 0x30613d55
pop edi
xor eax, eax
pop esi
ret
mov ecx, dword [esp + 0x14]
push ebp
mov ebp, eax
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], ecx
test ecx, ecx
je 0x30613d92
cmp dword [esi + 0x6c], edx
je 0x30613d92
mov cl, byte [esi + 0x6c]
mov byte [eax], cl
add dword [esi + 0xc], edi
add dword [esi + 0x10], edx
add dword [esi + 0x68], edi
cmp dword [esi + 0x70], 0
lea ebp, [eax + 1]
mov dword [esi + 0x6c], edx
mov dword [esp + 0x14], ebp
je 0x30613d92
pop ebp
mov dword [esi + 0x38], edi
mov eax, edi
pop edi
pop esi
ret
cmp dword [esi + 0x10], 0
push ebx
je 0x30613f1e
mov ebx, dword [sym.imp.MSVCR90.dll_fread]
mov edi, dword [sym.imp.MSVCR90.dll__errno]
lea esp, [esp]
cmp dword [esi + 0x58], 0
jne 0x30613eb6
cmp dword [esi + 4], 0
jne 0x30613e0a
cmp dword [esi + 0x3c], 0
jne 0x30613e0a
call edi
mov dword [eax], 0
mov edx, dword [esi + 0x40]
mov eax, dword [esi + 0x44]
push edx
push 0x4000
push 1
push eax
call ebx
add esp, 0x10
mov dword [esi + 4], eax
test eax, eax
jne 0x30613e05
mov ecx, dword [esi + 0x40]
push ecx
mov dword [esi + 0x3c], 1
call dword [sym.imp.MSVCR90.dll_ferror]
add esp, 4
test eax, eax
jne 0x30613f17
mov edx, dword [esi + 0x44]
mov dword [esi], edx
mov eax, dword [esi + 4]
mov ecx, dword [esi + 0x10]
add dword [esi + 0x64], eax
add dword [esi + 0x68], ecx
push 0
push esi
call sym.zlib1.dll_inflate
mov edx, dword [esi + 4]
mov ecx, dword [esi + 0x10]
sub dword [esi + 0x64], edx
sub dword [esi + 0x68], ecx
add esp, 8
mov dword [esi + 0x38], eax
cmp eax, 1
jne 0x30613e91
mov eax, dword [esp + 0x18]
mov edx, dword [esi + 0xc]
sub edx, eax
push edx
push eax
mov eax, dword [esi + 0x4c]
push eax
call sym.zlib1.dll_crc32
mov ecx, dword [esi + 0xc]
mov dword [esi + 0x4c], eax
add esp, 0xc
mov eax, esi
mov dword [esp + 0x18], ecx
call fcn.30613820
cmp eax, dword [esi + 0x4c]
jne 0x30613ead
mov eax, esi
call fcn.30613820
mov eax, esi
call fcn.30613230
cmp dword [esi + 0x38], 0
jne 0x30613f1e
push esi
call sym.zlib1.dll_inflateReset
push 0
push 0
push 0
call sym.zlib1.dll_crc32
add esp, 0x10
mov dword [esi + 0x4c], eax
cmp dword [esi + 0x38], 0
jne 0x30613f1e
cmp dword [esi + 0x3c], 0
jne 0x30613f1e
cmp dword [esi + 0x10], 0
jne 0x30613db0
jmp 0x30613f1e
mov dword [esi + 0x38], 0xfffffffd
jmp 0x30613f1e
mov edi, dword [esi + 4]
mov eax, dword [esi + 0x10]
cmp edi, eax
jbe 0x30613ec2
mov edi, eax
test edi, edi
jbe 0x30613ee3
mov edx, dword [esi]
mov eax, dword [esi + 0xc]
push edi
push edx
push eax
call sub.MSVCR90.dll_memcpy
add dword [esi], edi
sub dword [esi + 0x10], edi
add ebp, edi
add esp, 0xc
sub dword [esi + 4], edi
mov dword [esi + 0xc], ebp
mov eax, dword [esi + 0x10]
test eax, eax
jbe 0x30613efa
mov ecx, dword [esi + 0x40]
push ecx
push eax
push 1
push ebp
call ebx
add esp, 0x10
sub dword [esi + 0x10], eax
mov eax, dword [esp + 0x1c]
sub eax, dword [esi + 0x10]
add dword [esi + 0x64], eax
add dword [esi + 0x68], eax
test eax, eax
jne 0x30613f12
mov dword [esi + 0x3c], 1
pop ebx
pop ebp
pop edi
pop esi
ret
mov dword [esi + 0x38], 0xffffffff
mov eax, dword [esp + 0x18]
mov edx, dword [esi + 0xc]
sub edx, eax
push edx
push eax
mov eax, dword [esi + 0x4c]
push eax
call sym.zlib1.dll_crc32
mov ecx, dword [esi + 0x10]
mov dword [esi + 0x4c], eax
mov eax, dword [esp + 0x28]
add esp, 0xc
cmp eax, ecx
jne 0x30613f58
mov esi, dword [esi + 0x38]
cmp esi, 0xfffffffd
je 0x30613f50
cmp esi, 0xffffffff
jne 0x30613f58
pop ebx
pop ebp
pop edi
or eax, 0xffffffff
pop esi
ret
pop ebx
pop ebp
pop edi
sub eax, ecx
pop esi
ret
or eax, 0xffffffff
pop esi
ret
mov eax, 0xfffffffe
pop esi
ret