Function at 0x41a598
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
push esi
mov esi, ecx
or ebx, 0xffffffff
push edi
cmp dword [esi], ebx
je 0x41a5b1
xor eax, eax
jmp 0x41a7ab
mov ecx, dword [esi + 0xc]
and dword [ebp - 4], 0
and dword [ebp - 0x20], 0
call fcn.0041e96b
mov edi, eax
mov ecx, edi
call fcn.004462f9
test al, al
jne 0x41a5d9
call dword [sym.imp.KERNEL32.DLL_GetLastError]
jmp 0x41a798
push 6
pop edx
mov ecx, edi
call fcn.004454b8
cmp eax, ebx
jne 0x41a5f5
push 5
pop edx
mov ecx, edi
call fcn.004454b8
cmp eax, ebx
je 0x41a5ce
lea ecx, [ebp - 0x28]
push ecx
push eax
mov dword [esi], eax
call dword [sym.imp.KERNEL32.DLL_GetFileSize]
mov dword [ebp - 0x2c], eax
cmp eax, ebx
jne 0x41a61f
mov edi, dword [sym.imp.KERNEL32.DLL_GetLastError]
call edi
test eax, eax
je 0x41a61c
call edi
jmp 0x41a798
mov eax, dword [ebp - 0x2c]
mov ecx, dword [esi + 0xc]
mov ebx, dword [ecx + 0x14]
mov ecx, dword [ecx + 0x18]
mov edx, 0xffff
add ebx, edx
adc ecx, 0
shrd ebx, ecx, 0x10
shr ecx, 0x10
mov ecx, ebx
shl ecx, 2
sub eax, ecx
add eax, edx
sar eax, 0x10
cmp ebx, eax
mov dword [ebp - 0x1c], ebx
mov dword [esi + 4], ecx
jge 0x41a651
mov eax, ebx
test eax, eax
jle 0x41a65a
mov dword [ebp - 0x14], eax
jmp 0x41a65e
and dword [ebp - 0x14], 0
lea edi, [ebx + 7]
shr edi, 3
mov eax, edi
call section..text
mov dword [ebp - 0x18], esp
push edi
xor edi, edi
push edi
push dword [ebp - 0x18]
call sub.MSVCRT.dll_memset
add esp, 0xc
mov dword [esi + 8], edi
mov dword [ebp - 0x10], edi
cmp ebx, edi
je 0x41a7a8
mov dword [ebp - 8], edi
mov ecx, dword [esi]
xor edi, edi
push edi
push dword [ebp - 8]
lea edx, [ebp - 0xc]
push 4
call fcn.004455d8
cmp eax, 0x490
jne 0x41a6ed
mov ecx, dword [esi]
and dword [ebp - 0xc], edi
push edi
push dword [ebp - 8]
lea edx, [ebp - 0xc]
push 4
call fcn.00445621
mov dword [ebp - 0x24], eax
test eax, eax
je 0x41a75d
push 0xffffffffffffff9d
push 4
push edi
push dword [ebp - 8]
push 0xffffffffffffff9d
push 0x754
push eax
push str.IO_Error:_d_line:_d_align:_d_pos:_Ld_count:_d_actual:_d
call fcn.004891ee
mov eax, dword [ebp - 0x24]
add esp, 0x20
mov dword [ebp - 4], eax
jmp 0x41a791
test eax, eax
jne 0x41a6e5
mov edi, dword [ebp - 0xc]
test edi, edi
je 0x41a75d
cmp edi, dword [ebp - 0x14]
ja 0x41a72b
mov ecx, dword [ebp - 0x18]
lea eax, [edi - 1]
shr eax, 3
add eax, ecx
mov bl, byte [eax]
lea edx, [edi - 1]
and edx, 7
mov cl, dl
shr bl, cl
test bl, 1
jne 0x41a728
mov bl, 1
mov ecx, edx
shl bl, cl
or bl, byte [eax]
mov byte [eax], bl
mov ebx, dword [ebp - 0x1c]
jmp 0x41a751
mov ebx, dword [ebp - 0x1c]
mov ecx, dword [esi]
and dword [ebp - 0xc], 0
xor eax, eax
push eax
push dword [ebp - 8]
lea edx, [ebp - 0xc]
push 4
call fcn.00445621
mov edi, eax
test edi, edi
jne 0x41a76f
mov edi, dword [ebp - 0xc]
mov dword [ebp - 0x20], 0xd
mov eax, dword [esi + 8]
cmp edi, eax
ja 0x41a75a
mov edi, eax
mov dword [esi + 8], edi
inc dword [ebp - 0x10]
add dword [ebp - 8], 4
cmp dword [ebp - 0x10], ebx
jne 0x41a68e
jmp 0x41a791
push 0xffffffffffffff9d
push 4
xor eax, eax
push eax
push dword [ebp - 8]
push 0xffffffffffffff9d
push 0x75e
push edi
push str.IO_Error:_d_line:_d_align:_d_pos:_Ld_count:_d_actual:_d
call fcn.004891ee
add esp, 0x20
mov dword [ebp - 4], edi
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x41a79b
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x41a7a8
mov ecx, esi
call fcn.00445554
mov eax, dword [ebp - 4]
lea esp, [ebp - 0x38]
pop edi
pop esi
pop ebx
leave
ret