Function at 0x41094c
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, ecx
test esi, esi
push edi
mov dword [ebp - 4], eax
je 0x410b57
cmp byte [esi + 0x5c], 0x72
jne 0x410b57
mov ecx, dword [esi + 0x38]
cmp ecx, 0xfffffffd
je 0x410b52
cmp ecx, 0xffffffff
je 0x410b52
xor edx, edx
inc edx
cmp ecx, edx
jne 0x41098d
xor eax, eax
jmp 0x410b5a
mov ecx, dword [ebp + 8]
test ecx, ecx
mov ebx, eax
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], ecx
je 0x4109ca
cmp dword [esi + 0x6c], 0xffffffff
je 0x4109ca
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 [ebp - 4], ebx
je 0x4109ca
mov dword [esi + 0x38], edx
mov eax, edx
jmp 0x410b5a
cmp dword [esi + 0x10], 0
je 0x410b1f
xor ecx, ecx
cmp dword [esi + 0x58], ecx
jne 0x410abe
cmp dword [esi + 4], ecx
jne 0x410a28
cmp dword [esi + 0x3c], ecx
jne 0x410a28
call sub.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 sub.msvcrt.dll_fread
add esp, 0x10
test eax, eax
mov dword [esi + 4], eax
jne 0x410a23
push dword [esi + 0x40]
mov dword [esi + 0x3c], edi
call sub.msvcrt.dll_ferror
test eax, eax
pop ecx
jne 0x410b1b
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 esi
call fcn.00410e1d
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 0x410a9e
mov eax, dword [esi + 0xc]
sub eax, dword [ebp - 4]
push eax
push dword [ebp - 4]
push dword [esi + 0x4c]
call fcn.00412c07
mov dword [esi + 0x4c], eax
mov eax, dword [esi + 0xc]
mov dword [ebp - 4], eax
add esp, 0xc
mov eax, esi
call fcn.00410b5f
cmp eax, dword [esi + 0x4c]
jne 0x410ab5
mov eax, esi
call fcn.00410b5f
mov eax, esi
call fcn.00410769
xor edi, edi
cmp dword [esi + 0x38], edi
jne 0x410b1f
mov ecx, esi
call fcn.00410bb0
mov dword [esi + 0x4c], edi
jmp 0x410aa0
xor edi, edi
cmp dword [esi + 0x38], edi
jne 0x410b1f
cmp dword [esi + 0x3c], edi
jne 0x410b1f
cmp dword [esi + 0x10], edi
jne 0x4109d4
jmp 0x410b1f
mov dword [esi + 0x38], 0xfffffffd
jmp 0x410b1f
mov edi, dword [esi + 4]
mov eax, dword [esi + 0x10]
cmp edi, eax
jbe 0x410aca
mov edi, eax
cmp edi, ecx
jbe 0x410ae9
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 0x410b02
push dword [esi + 0x40]
push eax
push 1
push ebx
call sub.msvcrt.dll_fread
add esp, 0x10
sub dword [esi + 0x10], eax
mov eax, dword [ebp + 8]
sub eax, dword [esi + 0x10]
add dword [esi + 0x64], eax
add dword [esi + 0x68], eax
test eax, eax
jne 0x410b5a
mov dword [esi + 0x3c], 1
jmp 0x410b5a
or dword [esi + 0x38], 0xffffffff
mov eax, dword [esi + 0xc]
sub eax, dword [ebp - 4]
push eax
push dword [ebp - 4]
push dword [esi + 0x4c]
call fcn.00412c07
mov ecx, dword [esi + 0x10]
mov dword [esi + 0x4c], eax
mov eax, dword [ebp + 8]
add esp, 0xc
cmp eax, ecx
jne 0x410b4e
mov esi, dword [esi + 0x38]
cmp esi, 0xfffffffd
je 0x410b52
cmp esi, 0xffffffff
je 0x410b52
sub eax, ecx
jmp 0x410b5a
or eax, 0xffffffff
jmp 0x410b5a
push 0xfffffffffffffffe
pop eax
pop edi
pop esi
pop ebx
leave
ret