Function at 0x499560
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, ecx
test esi, esi
je 0x49975d
cmp byte [esi + 0x5c], 0x72
jne 0x49975d
mov eax, dword [esi + 0x38]
cmp eax, 0xfffffffd
je 0x499754
cmp eax, 0xffffffff
je 0x499754
cmp eax, 1
jne 0x4995a2
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
push ebx
mov ebx, dword [ebp + 0x10]
mov dword [ebp - 4], ecx
mov dword [esi + 0xc], ecx
mov dword [esi + 0x10], ebx
test ebx, ebx
je 0x4996b9
jmp 0x4995c0
cmp dword [esi + 0x58], 0
jne 0x4996db
cmp dword [esi + 4], 0
jne 0x49961f
cmp dword [esi + 0x3c], 0
jne 0x49961f
call fcn.004cfb1b
mov dword [eax], 0
mov eax, dword [esi + 0x40]
mov ecx, dword [esi + 0x44]
push eax
push 0x4000
push 1
push ecx
call fcn.004d2bc4
add esp, 0x10
mov dword [esi + 4], eax
test eax, eax
jne 0x49961a
mov edx, dword [esi + 0x40]
push edx
mov dword [esi + 0x3c], 1
call fcn.004d2952
add esp, 4
test eax, eax
jne 0x499748
mov eax, dword [esi + 0x44]
mov dword [esi], eax
push 0
push esi
call fcn.00499910
add esp, 8
mov dword [esi + 0x38], eax
cmp eax, 1
jne 0x499697
mov ecx, dword [esi + 0xc]
mov edx, dword [esi + 0x4c]
sub ecx, edi
push ecx
push edi
push edx
call fcn.0049af30
mov dword [esi + 0x4c], eax
mov eax, dword [esi + 0xc]
mov dword [ebp + 8], eax
add esp, 0xc
mov eax, esi
call fcn.00499250
cmp eax, dword [esi + 0x4c]
jne 0x4996af
mov eax, esi
call fcn.00499250
mov eax, esi
call fcn.00498f20
cmp dword [esi + 0x38], 0
jne 0x4996b6
mov edi, dword [esi + 8]
mov ebx, dword [esi + 0x14]
push esi
call fcn.00499770
push 0
push 0
push 0
mov dword [esi + 8], edi
mov dword [esi + 0x14], ebx
call fcn.0049af30
mov edi, dword [ebp + 8]
mov ebx, dword [ebp + 0x10]
add esp, 0x10
mov dword [esi + 0x4c], eax
cmp dword [esi + 0x38], 0
jne 0x4996b9
cmp dword [esi + 0x3c], 0
jne 0x4996b9
cmp dword [esi + 0x10], 0
jne 0x4995c0
jmp 0x4996b9
mov dword [esi + 0x38], 0xfffffffd
mov edi, dword [ebp + 8]
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 0x4c]
sub eax, edi
push eax
push edi
push ecx
call fcn.0049af30
add esp, 0xc
mov dword [esi + 0x4c], eax
mov eax, ebx
sub eax, dword [esi + 0x10]
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov edi, dword [esi + 4]
mov eax, dword [esi + 0x10]
cmp edi, eax
jbe 0x4996e7
mov edi, eax
test edi, edi
je 0x49970e
mov ecx, dword [esi]
mov edx, dword [esi + 0xc]
push edi
push ecx
push edx
call fcn.004ca090
mov eax, dword [ebp + 0xc]
add dword [esi], edi
sub dword [esi + 0x10], edi
add eax, edi
add esp, 0xc
sub dword [esi + 4], edi
mov dword [ebp - 4], eax
mov dword [esi + 0xc], eax
mov eax, dword [esi + 0x10]
test eax, eax
je 0x49972b
mov ecx, dword [esi + 0x40]
mov edx, dword [ebp - 4]
push ecx
push eax
push 1
push edx
call fcn.004d2bc4
add esp, 0x10
sub dword [esi + 0x10], eax
sub ebx, dword [esi + 0x10]
add dword [esi + 8], ebx
add dword [esi + 0x14], ebx
test ebx, ebx
jne 0x49973f
mov dword [esi + 0x3c], 1
mov eax, ebx
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov dword [esi + 0x38], 0xffffffff
jmp 0x4996b9
pop edi
or eax, 0xffffffff
pop esi
mov esp, ebp
pop ebp
ret
pop edi
mov eax, 0xfffffffe
pop esi
mov esp, ebp
pop ebp
ret