Function at 0x49c0b0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
mov eax, dword [ebp + 8]
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x10], ecx
cmp dword [ebp + 0x10], 0
je 0x49c0ce
cmp dword [ebp + 0x14], 0
jne 0x49c0d5
xor eax, eax
jmp 0x49c683
xor edx, edx
cmp dword [ebp + 8], 0
setne dl
mov dword [ebp - 0x24], edx
cmp dword [ebp - 0x24], 0
jne 0x49c108
push str._buffer___NULL_
push 0
push 0x93
push str.fread.c
push 2
call fcn.0049cef0
add esp, 0x14
cmp eax, 1
jne 0x49c108
int3
cmp dword [ebp - 0x24], 0
jne 0x49c13e
call fcn.00482806
mov dword [eax], 0x16
push 0
push 0x93
push str.fread.c
push str._fread_nolock_s
push str._buffer___NULL_
call fcn.004862fe
add esp, 0x14
xor eax, eax
jmp 0x49c683
cmp dword [ebp + 0x18], 0
je 0x49c155
or eax, 0xffffffff
xor edx, edx
div dword [ebp + 0x10]
cmp dword [ebp + 0x14], eax
jbe 0x49c245
cmp dword [ebp + 0xc], 0xffffffff
je 0x49c170
mov ecx, dword [ebp + 0xc]
push ecx
push 0xfd
mov edx, dword [ebp + 8]
push edx
call fcn.0047ec20
add esp, 0xc
xor eax, eax
cmp dword [ebp + 0x18], 0
setne al
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jne 0x49c1a3
push str._stream___NULL_
push 0
push 0x9b
push str.fread.c
push 2
call fcn.0049cef0
add esp, 0x14
cmp eax, 1
jne 0x49c1a3
int3
cmp dword [ebp - 0x28], 0
jne 0x49c1d9
call fcn.00482806
mov dword [eax], 0x16
push 0
push 0x9b
push str.fread.c
push str._fread_nolock_s
push str._stream___NULL_
call fcn.004862fe
add esp, 0x14
xor eax, eax
jmp 0x49c683
or eax, 0xffffffff
xor edx, edx
div dword [ebp + 0x10]
cmp eax, dword [ebp + 0x14]
sbb edx, edx
add edx, 1
mov dword [ebp - 0x2c], edx
jne 0x49c20f
push str.num____SIZE_MAX___elementSize_
push 0
push 0x9c
push str.fread.c
push 2
call fcn.0049cef0
add esp, 0x14
cmp eax, 1
jne 0x49c20f
int3
cmp dword [ebp - 0x2c], 0
jne 0x49c245
call fcn.00482806
mov dword [eax], 0x16
push 0
push 0x9c
push str.fread.c
push str._fread_nolock_s
push str.num____SIZE_MAX___elementSize_
call fcn.004862fe
add esp, 0x14
xor eax, eax
jmp 0x49c683
mov ecx, dword [ebp + 0x10]
imul ecx, dword [ebp + 0x14]
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 0xc]
mov dword [ebp - 4], edx
mov eax, dword [ebp + 0x18]
mov ecx, dword [eax + 0xc]
and ecx, 0x10c
je 0x49c26e
mov edx, dword [ebp + 0x18]
mov eax, dword [edx + 0x18]
mov dword [ebp - 8], eax
jmp 0x49c275
mov dword [ebp - 8], 0x1000
cmp dword [ebp - 4], 0
je 0x49c680
mov ecx, dword [ebp + 0x18]
mov edx, dword [ecx + 0xc]
and edx, 0x10c
je 0x49c406
mov eax, dword [ebp + 0x18]
cmp dword [eax + 4], 0
je 0x49c406
mov ecx, dword [ebp + 0x18]
cmp dword [ecx + 4], 0
jge 0x49c2f0
mov edx, dword [ebp + 0x18]
cmp dword [edx + 4], 0
jge 0x49c2d1
push str.__Inconsistent_Stream_Count._Flush_between_consecutive_read_and_write___stream___cnt___0_
push 0
push 0xb5
push str.fread.c
push 2
call fcn.0049cef0
add esp, 0x14
cmp eax, 1
jne 0x49c2d1
int3
mov ecx, dword [ebp + 0x18]
mov edx, dword [ecx + 0xc]
or edx, 0x20
mov eax, dword [ebp + 0x18]
mov dword [eax + 0xc], edx
mov eax, dword [ebp - 0xc]
sub eax, dword [ebp - 4]
xor edx, edx
div dword [ebp + 0x10]
jmp 0x49c683
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp - 4]
cmp edx, dword [ecx + 4]
jae 0x49c303
mov eax, dword [ebp - 4]
mov dword [ebp - 0x3c], eax
jmp 0x49c30c
mov ecx, dword [ebp + 0x18]
mov edx, dword [ecx + 4]
mov dword [ebp - 0x3c], edx
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x18]
cmp ecx, dword [ebp - 0x10]
jbe 0x49c3b0
cmp dword [ebp + 0xc], 0xffffffff
je 0x49c339
mov edx, dword [ebp + 0xc]
push edx
push 0xfd
mov eax, dword [ebp + 8]
push eax
call fcn.0047ec20
add esp, 0xc
xor ecx, ecx
je 0x49c346
mov dword [ebp - 0x40], 1
jmp 0x49c34d
mov dword [ebp - 0x40], 0
mov edx, dword [ebp - 0x40]
mov dword [ebp - 0x30], edx
cmp dword [ebp - 0x30], 0
jne 0x49c37a
push str.__buffer_too_small___0_
push 0
push 0xc2
push str.fread.c
push 2
call fcn.0049cef0
add esp, 0x14
cmp eax, 1
jne 0x49c37a
int3
cmp dword [ebp - 0x30], 0
jne 0x49c3b0
call fcn.00482806
mov dword [eax], 0x22
push 0
push 0xc2
push str.fread.c
push str._fread_nolock_s
push str.__buffer_too_small___0_
call fcn.004862fe
add esp, 0x14
xor eax, eax
jmp 0x49c683
mov ecx, dword [ebp - 0x18]
push ecx
mov edx, dword [ebp + 0x18]
mov eax, dword [edx]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
mov edx, dword [ebp - 0x1c]
push edx
call fcn.0047debc
add esp, 0x10
mov eax, dword [ebp - 4]
sub eax, dword [ebp - 0x18]
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0x18]
mov edx, dword [ecx + 4]
sub edx, dword [ebp - 0x18]
mov eax, dword [ebp + 0x18]
mov dword [eax + 4], edx
mov ecx, dword [ebp + 0x18]
mov edx, dword [ecx]
add edx, dword [ebp - 0x18]
mov eax, dword [ebp + 0x18]
mov dword [eax], edx
mov ecx, dword [ebp - 0x1c]
add ecx, dword [ebp - 0x18]
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 0x10]
sub edx, dword [ebp - 0x18]
mov dword [ebp - 0x10], edx
jmp 0x49c67b
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 8]
jb 0x49c591
cmp dword [ebp - 8], 0
je 0x49c449
cmp dword [ebp - 4], 0x7fffffff
jbe 0x49c437
mov eax, SysReAllocString
xor edx, edx
div dword [ebp - 8]
mov ecx, SysReAllocString
sub ecx, edx
mov dword [ebp - 0x18], ecx
jmp 0x49c447
mov eax, dword [ebp - 4]
xor edx, edx
div dword [ebp - 8]
mov eax, dword [ebp - 4]
sub eax, edx
mov dword [ebp - 0x18], eax
jmp 0x49c467
cmp dword [ebp - 4], 0x7fffffff
jbe 0x49c45b
mov dword [ebp - 0x44], SysReAllocString
jmp 0x49c461
mov ecx, dword [ebp - 4]
mov dword [ebp - 0x44], ecx
mov edx, dword [ebp - 0x44]
mov dword [ebp - 0x18], edx
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x10]
jbe 0x49c505
cmp dword [ebp + 0xc], 0xffffffff
je 0x49c48e
mov ecx, dword [ebp + 0xc]
push ecx
push 0xfd
mov edx, dword [ebp + 8]
push edx
call fcn.0047ec20
add esp, 0xc
xor eax, eax
je 0x49c49b
mov dword [ebp - 0x48], 1
jmp 0x49c4a2
mov dword [ebp - 0x48], 0
mov ecx, dword [ebp - 0x48]
mov dword [ebp - 0x34], ecx
cmp dword [ebp - 0x34], 0
jne 0x49c4cf
push str.__buffer_too_small___0_
push 0
push 0xf4
push str.fread.c
push 2
call fcn.0049cef0
add esp, 0x14
cmp eax, 1
jne 0x49c4cf
int3
cmp dword [ebp - 0x34], 0
jne 0x49c505
call fcn.00482806
mov dword [eax], 0x22
push 0
push 0xf4
push str.fread.c
push str._fread_nolock_s
push str.__buffer_too_small___0_
call fcn.004862fe
add esp, 0x14
xor eax, eax
jmp 0x49c683
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
mov edx, dword [ebp + 0x18]
push edx
call fcn.0048bbc8
add esp, 4
push eax
call fcn.00495155
add esp, 0xc
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x49c54c
mov eax, dword [ebp + 0x18]
mov ecx, dword [eax + 0xc]
or ecx, 0x10
mov edx, dword [ebp + 0x18]
mov dword [edx + 0xc], ecx
mov eax, dword [ebp - 0xc]
sub eax, dword [ebp - 4]
xor edx, edx
div dword [ebp + 0x10]
jmp 0x49c683
cmp dword [ebp - 0x14], 0xffffffff
jne 0x49c571
mov eax, dword [ebp + 0x18]
mov ecx, dword [eax + 0xc]
or ecx, 0x20
mov edx, dword [ebp + 0x18]
mov dword [edx + 0xc], ecx
mov eax, dword [ebp - 0xc]
sub eax, dword [ebp - 4]
xor edx, edx
div dword [ebp + 0x10]
jmp 0x49c683
mov eax, dword [ebp - 4]
sub eax, dword [ebp - 0x14]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 0x1c]
add ecx, dword [ebp - 0x14]
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 0x10]
sub edx, dword [ebp - 0x14]
mov dword [ebp - 0x10], edx
jmp 0x49c67b
mov eax, dword [ebp + 0x18]
push eax
call fcn.00492554
add esp, 4
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0xffffffff
jne 0x49c5b6
mov eax, dword [ebp - 0xc]
sub eax, dword [ebp - 4]
xor edx, edx
div dword [ebp + 0x10]
jmp 0x49c683
cmp dword [ebp - 0x10], 0
jne 0x49c64f
cmp dword [ebp + 0xc], 0xffffffff
je 0x49c5db
mov ecx, dword [ebp + 0xc]
push ecx
push 0xfd
mov edx, dword [ebp + 8]
push edx
call fcn.0047ec20
add esp, 0xc
xor eax, eax
je 0x49c5e8
mov dword [ebp - 0x4c], 1
jmp 0x49c5ef
mov dword [ebp - 0x4c], 0
mov ecx, dword [ebp - 0x4c]
mov dword [ebp - 0x38], ecx
cmp dword [ebp - 0x38], 0
jne 0x49c61c
push str.__buffer_too_small___0_
push 0
push 0x118
push str.fread.c
push 2
call fcn.0049cef0
add esp, 0x14
cmp eax, 1
jne 0x49c61c
int3
cmp dword [ebp - 0x38], 0
jne 0x49c64f
call fcn.00482806
mov dword [eax], 0x22
push 0
push 0x118
push str.fread.c
push str._fread_nolock_s
push str.__buffer_too_small___0_
call fcn.004862fe
add esp, 0x14
xor eax, eax
jmp 0x49c683
mov eax, dword [ebp - 0x1c]
mov cl, byte [ebp - 0x20]
mov byte [eax], cl
mov edx, dword [ebp - 0x1c]
add edx, 1
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 4]
sub eax, 1
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 0x10]
sub ecx, 1
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp + 0x18]
mov eax, dword [edx + 0x18]
mov dword [ebp - 8], eax
jmp 0x49c275
mov eax, dword [ebp + 0x14]
mov esp, ebp
pop ebp
ret